Bug 463259 - /usr/lib/tcl8.5/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
/usr/lib/tcl8.5/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: tcl-snack (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-22 14:39 EDT by Mikhail Kalenkov
Modified: 2008-10-30 08:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-30 08:48:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of the strace command (64.00 KB, application/octet-stream)
2008-09-25 05:35 EDT, Mikhail Kalenkov
no flags Details
output of the "strace/usr/bin/ play ex1.wav" command (31.50 KB, text/plain)
2008-09-26 12:22 EDT, Mikhail Kalenkov
no flags Details

  None (edit)
Description Mikhail Kalenkov 2008-09-22 14:39:04 EDT
It seems to me that tcl-snack module doesn't work.

[mkalenkov@sadki ~]$ tclsh
% package require snack 2.2
couldn't load file "/usr/lib/tcl8.5/snack2.2/libsnack.so":
/usr/lib/tcl8.5/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
% 

additional info

[mkalenkov@sadki ~]$ LANG=C; rpm -qi tcl-snack
Name        : tcl-snack                    Relocations: (not relocatable)
Version     : 2.2.10                            Vendor: Fedora Project
Release     : 2.fc9                         Build Date: Sat Sep 13 06:17:58
2008
Install Date: Sun Sep 21 19:43:22 2008         Build Host:
x86-5.fedora.phx.redhat.com
Group       : System Environment/Libraries   Source RPM:
tcl-snack-2.2.10-2.fc9.src.rpm
Size        : 740007                           License: GPLv2+
Signature   : DSA/SHA1, Tue Sep 16 00:14:20 2008, Key ID 62aec3dc6df2196f
Packager    : Fedora Project
URL         : http://www.speech.kth.se/snack/
Summary     : Sound toolkit

[mkalenkov@sadki ~]$ uname -a
Linux sadki 2.6.26.3-29.fc9.i686 #1 SMP Wed Sep 3 03:42:27 EDT 2008 i686 athlon i386 GNU/Linux
Comment 1 Tom "spot" Callaway 2008-09-22 14:50:25 EDT
Fixed in -5, which is building right this second.
Comment 2 Mikhail Kalenkov 2008-09-23 14:09:25 EDT
Unfortunately new package doesn't work for me. I use snack module in the scid application (http://sourceforge.net/projects/scid/) for the move announcements, but it doesn't work.

Early I used snack module built by myself (http://katrine.lpi.ru/kalenkov/libsnack-2.2.10-3.i386.rpm) and it worked fine! Unfortunately I am not a tcl programmer and I haven't ideas how to locate the problem.
Comment 3 Tom "spot" Callaway 2008-09-23 15:50:47 EDT
Can you give details on what doesn't work, or even better, a testcase? The testfiles in the snack directory all seem to work for me.

I downloaded scim, and wow, that code is... well, its not pretty. I had to patch it quite a bit just to get it to build (wholly unrelated to snack).

When I got it built, it did make sounds, albeit, they sound a bit clipped.
Comment 4 Tom "spot" Callaway 2008-09-23 15:51:30 EDT
(In reply to comment #3)

> I downloaded scid, not scim. :)
Comment 5 Mikhail Kalenkov 2008-09-24 04:51:41 EDT
Probably I found a testcase. I took play.tcl file from the snack distribution and slightly modified it

=========play.tcl============
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh8.5 "$0" "$@"

package require -exact sound 2.2

if {[llength $argv] == 0} {
  puts {Usage: play.tcl file}
  exit
} else {
  set file [lindex $argv 0]
}

snack::sound s -file $file
s play -block 1
=============================

when I execute from console with tcl-snack-2.2.10-5.fc9.i386.rpm installed

[kalenkov@katrine Desktop]$ ./play.tcl ex1.wav 

I don't hear any sound, but when I use package http://katrine.lpi.ru/kalenkov/libsnack-2.2.10-3.i386.rpm I hear the sound. Where is the problem?

PS Sound file ex1.wav was also borrowed from snack tarball.
Comment 6 Tom "spot" Callaway 2008-09-24 11:30:56 EDT
That test script works fine for me, I hear the sound.

The differences between your libsnack package and my tcl-snack package seems to be:

1. I stripped out the MP3 support, because I had to for Fedora.
2. You've got a "snack-pkgIndex.patch" applied. I suspect this might be why we're getting different behavior.
3. I'm patching mine to work with modern ALSA. This should be necessary in your package too, because the code is calling "_snd_pcm_mmap_hw_ptr" but the alsa libraries in F-9 aren't exporting that old function.
4. I'm compiling with the full Fedora optflags, your package isn't. Shouldn't affect the functionality though.
5. I'm building and packaging the python bits, your package isn't. Again, shouldn't affect the functionality.
6. You're on i386, i'm testing on x86_64. It's possible this is an arch specific bug.

Looking at the pkgIndex.patch, you're installing these files into %{_libdir}/ as opposed to %{tcl_sitedir}/snack2.2 . This isn't the correct behavior, as documented here: http://fedoraproject.org/wiki/Packaging/Tcl

So, my thought is that perhaps your tcl isn't looking in %{tcl_sitedir}/snack2.2 for those .so files, but in that case, it should throw an error like this:

[spot@localhost ~]$ ./newplay.tcl /usr/share/sounds/KDE_Startup.wav 
couldn't load file "libsound.so": libsound.so: cannot open shared object file: No such file or directory
    while executing
"load libsound.so"
    ("package ifneeded sound 2.2" script)
    invoked from within
"package require -exact sound 2.2"
    (file "./newplay.tcl" line 5)

If you change your package to not apply that pkgindex.patch and instead install the .so files into %{tcl_sitedir}/snack2.2/ , does it stop working?
Comment 7 Mikhail Kalenkov 2008-09-25 05:33:31 EDT
I tried to reduce differences between our packages step by step and found that all mentioned above items were irrelevant. But finally I found crucial point. It is  "--enable-alsa" option in configure script. I took your package  tcl-snack-2.2.10-5.fc9.src.rpm, removed "--enable-alsa" option and rebuilt and install it. I heard the sound after that!

If I used original package tcl-snack-2.2.10-5.fc9.i386.rpm then command 

[kalenkov@katrine Desktop]$ ./play.tcl ex1.wav 

doesn't produce any sound, doesn't finish and consume 100% CPU. 

I attached the output of the strace comand 

[kalenkov@katrine Desktop]$strace ./play.tcl ex1.wav
Comment 8 Mikhail Kalenkov 2008-09-25 05:35:04 EDT
Created attachment 317666 [details]
output of the strace command

output of the strace comand 

[kalenkov@katrine Desktop]$strace ./play.tcl ex1.wav
Comment 9 Tom "spot" Callaway 2008-09-25 09:51:58 EDT
OK... thats very weird. Do you not have an ALSA driver in use?
Comment 10 Mikhail Kalenkov 2008-09-25 10:08:42 EDT
(In reply to comment #9)
> OK... thats very weird. Do you not have an ALSA driver in use?

I don't know. How can I find out it?

[kalenkov@katrine ~]$ rpm -qa | grep alsa
alsa-plugins-pulseaudio-1.0.16-4.fc9.i386
alsa-lib-devel-1.0.17-2.fc9.i386
alsa-lib-1.0.17-2.fc9.i386
alsa-utils-1.0.17-2.fc9.i386

I never had problems with sound. It simply works out of box. The only exception is snack. I have standard AC'97 on-board chip (ADI AD1888).
Comment 11 Mikhail Kalenkov 2008-09-25 14:09:45 EDT
(In reply to comment #9)
> OK... thats very weird. Do you not have an ALSA driver in use?

Several lines from strace output

stat64("/etc/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=8974, ...}) = 0
open("/etc/alsa/alsa.conf", O_RDONLY)   = 4
...
access("/etc/alsa/pulse-default.conf", R_OK) = 0
open("/etc/alsa/pulse-default.conf", O_RDONLY) = 4
...
read(4, "# PulseAudio plugin configuratio"..., 4096) = 537
...
access("/etc/asound.conf", R_OK)        = 0
open("/etc/asound.conf", O_RDONLY)      = 4
...
access("/home/kalenkov/.asoundrc", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/alsa-lib/libasound_module_pcm_pulse.so", O_RDONLY) = 4

So I guess I use alsa.
Comment 12 Mikhail Kalenkov 2008-09-26 12:20:28 EDT
Yet another test

[mkalenkov@sadki Desktop]$ type play
play is hashed (/usr/bin/play)
[mkalenkov@sadki Desktop]$ rpm -qf  /usr/bin/play
sox-14.0.1-1.fc9.i386
[mkalenkov@sadki Desktop]$ strace /usr/bin/play ex1.wav  2> strace.play.out
[mkalenkov@sadki Desktop]$
I heard the sound. strace output shows that I used alsa without any problem.

Several lines from strace output

stat64("/etc/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=8974, ...}) = 0
open("/etc/alsa/alsa.conf", O_RDONLY)   = 4
...
access("/etc/alsa/pulse-default.conf", R_OK) = 0
open("/etc/alsa/pulse-default.conf", O_RDONLY) = 4
...
read(4, "# PulseAudio plugin configuratio"..., 4096) = 537
...
access("/etc/asound.conf", R_OK)        = 0
open("/etc/asound.conf", O_RDONLY)      = 4
...
access("/home/mkalenkov/.asoundrc", R_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/alsa-lib/libasound_module_pcm_pulse.so", O_RDONLY) = 4

Can somebody test tcl-snack package on the i386 box?
Comment 13 Mikhail Kalenkov 2008-09-26 12:22:24 EDT
Created attachment 317810 [details]
output of the "strace/usr/bin/ play ex1.wav" command
Comment 14 Tom "spot" Callaway 2008-10-22 14:27:13 EDT
Well, since I can't determine why it doesn't work for you (and it still works for me with alsa disabled), -6 will have ALSA disabled. Please test and confirm that -6 works for you.
Comment 15 Fedora Update System 2008-10-22 14:46:27 EDT
tcl-snack-2.2.10-6.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/tcl-snack-2.2.10-6.fc9
Comment 16 Fedora Update System 2008-10-22 14:46:30 EDT
tcl-snack-2.2.10-6.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/tcl-snack-2.2.10-6.fc8
Comment 17 Fedora Update System 2008-10-23 12:41:01 EDT
tcl-snack-2.2.10-6.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tcl-snack'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-9087
Comment 18 Fedora Update System 2008-10-23 12:41:04 EDT
tcl-snack-2.2.10-6.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tcl-snack'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-9088
Comment 19 Mikhail Kalenkov 2008-10-23 14:00:00 EDT
Last build tcl-snack-2.2.10-6.fc9 works fine. Thanks.
Comment 20 Fedora Update System 2008-10-30 08:48:55 EDT
tcl-snack-2.2.10-6.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2008-10-30 08:49:33 EDT
tcl-snack-2.2.10-6.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.