Bug 463259 - /usr/lib/tcl8.5/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
Summary: /usr/lib/tcl8.5/snack2.2/libsnack.so: undefined symbol: _snd_pcm_mmap_hw_ptr
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: tcl-snack
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-22 18:39 UTC by Mikhail Kalenkov
Modified: 2008-10-30 12:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-30 12:48:58 UTC
Type: ---
Embargoed:


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

Description Mikhail Kalenkov 2008-09-22 18:39:04 UTC
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 18:50:25 UTC
Fixed in -5, which is building right this second.

Comment 2 Mikhail Kalenkov 2008-09-23 18:09:25 UTC
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 19:50:47 UTC
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 19:51:30 UTC
(In reply to comment #3)

> I downloaded scid, not scim. :)

Comment 5 Mikhail Kalenkov 2008-09-24 08:51:41 UTC
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 15:30:56 UTC
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 09:33:31 UTC
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 09:35:04 UTC
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 13:51:58 UTC
OK... thats very weird. Do you not have an ALSA driver in use?

Comment 10 Mikhail Kalenkov 2008-09-25 14:08:42 UTC
(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 18:09:45 UTC
(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 16:20:28 UTC
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 16:22:24 UTC
Created attachment 317810 [details]
output of the "strace/usr/bin/ play ex1.wav" command

Comment 14 Tom "spot" Callaway 2008-10-22 18:27:13 UTC
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 18:46:27 UTC
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 18:46:30 UTC
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 16:41:01 UTC
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 16:41:04 UTC
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 18:00:00 UTC
Last build tcl-snack-2.2.10-6.fc9 works fine. Thanks.

Comment 20 Fedora Update System 2008-10-30 12:48:55 UTC
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 12:49:33 UTC
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.