Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223633 - net-misc/asterisk-1.2.27 generates "undefined symbol: speex_preprocess_ctl" message with speex use flag and media-libs/speex-1.2_beta3_p2
Summary: net-misc/asterisk-1.2.27 generates "undefined symbol: speex_preprocess_ctl" m...
Status: RESOLVED DUPLICATE of bug 206463
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: voip herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-26 02:12 UTC by Brendan Kirby
Modified: 2009-02-26 13:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Kirby 2008-05-26 02:12:22 UTC
After upgrading speex and re-installing asterisk, my asterisk server wouldn't start.  I was seeing the following in the /var/log/asterisk/messages log file:
May 25 17:59:36 WARNING[29211] loader.c: /usr/lib/asterisk/modules/codec_speex.so: undefined symbol: speex_preprocess_ctl
May 25 17:59:36 WARNING[29211] loader.c: Loading module codec_speex.so failed!

I read forum post http://forums.gentoo.org/viewtopic-t-641408.html which said to add -lspeexdsp to a configure file.  I sort of did that by running the command:
ebuild /afs/is/portage/tree/net-misc/asterisk/asterisk-1.2.27.ebuild unpack 

Changing the asterisk source with the following patch:
diff -ru asterisk-1.2.27-orig/codecs/Makefile asterisk-1.2.27/codecs/Makefile
--- asterisk-1.2.27-orig/codecs/Makefile        2007-01-31 09:28:15.000000000 -0800
+++ asterisk-1.2.27/codecs/Makefile     2008-05-25 18:56:08.000000000 -0700
@@ -47,24 +47,24 @@
 ULIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/speex/speex.h)
 ifneq (${UI_SPEEX},)
   MODSPEEX=codec_speex.so
-  LIBSPEEX+=-lspeex -lm
+  LIBSPEEX+=-lspeex -lspeexdsp -lm
 endif
 ifneq (${UIS_SPEEX},)
   MODSPEEX=codec_speex.so
   CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/include/speex
-  LIBSPEEX+=-lspeex -lm
+  LIBSPEEX+=-lspeex -lspeexdsp -lm
 endif
 ifneq (${ULI_SPEEX},)
   MODSPEEX=codec_speex.so
   CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include
   LIBSPEEX=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
-  LIBSPEEX+=-lspeex -lm
+  LIBSPEEX+=-lspeex -lspeexdsp -lm
 endif
 ifneq (${ULIS_SPEEX},)
   MODSPEEX=codec_speex.so
   CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include/speex
   LIBSPEEX=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
-  LIBSPEEX+=-lspeex -lm
+  LIBSPEEX+=-lspeex -lspeexdsp -lm
 endif
 
 ifneq ($(wildcard ilbc/iLBC_decode.h),)


Then, re-compiling asterisk.  After doing that, it starts correctly.
Comment 1 Łukasz Damentko (RETIRED) gentoo-dev 2008-08-11 00:40:51 UTC
Reassigning back to herd since Stefan has been retired as a Gentoo developer (#27693).
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-10-10 20:14:51 UTC
Since LIBSPEEX has that "+=" the following should work:

emake LIBSPEEX=-lspeexdsp <blah>
Comment 3 Daniel Savard 2009-01-15 15:35:34 UTC
(In reply to comment #2)
> Since LIBSPEEX has that "+=" the following should work:
> 
> emake LIBSPEEX=-lspeexdsp <blah>
> 

Anyone is patching the ebuild to make it working out-of-the-box? This problem is still present and should be corrected into the ebuild. I don't think I have enough skills on ebuild to do it myself. It would be greatly appreciated if someone would care about it.
Comment 4 Francesc Romà i Frigolé 2009-02-13 18:33:33 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Since LIBSPEEX has that "+=" the following should work:
> > 
> > emake LIBSPEEX=-lspeexdsp <blah>
> > 
> 
> Anyone is patching the ebuild to make it working out-of-the-box? This problem
> is still present and should be corrected into the ebuild. I don't think I have
> enough skills on ebuild to do it myself. It would be greatly appreciated if
> someone would care about it.
> 

Daniel, 
I don't know how to use emake either but I could figure out how to solve the problem from the first comment and the ebuild manual here: 

http://www.gentoo.org/doc/en/handbook/2004.2/handbook-sparc.xml?part=3&chap=6

These are the steps I took

0) find where the file asterisk-1.2.27.ebuild is in your system (usually is in 
usr/portage/net-misc/asterisk/ otherwise replace it's path below accordingly)

1) ebuild /usr/portage/net-misc/asterisk/asterisk-1.2.27.ebuild unpack 

2) fix the file /var/tmp/portage/net-misc/asterisk-1.2.27/work/asterisk-1.2.27/codecs/Makefile by either applying the patch above or simply editing it and replacing each instance of the line 
   LIBSPEEX+=-lspeex -lm
with this line
   LIBSPEEX+=-lspeex -lspeexdsp -lm


3) ebuild /usr/portage/net-misc/asterisk/asterisk-1.2.27.ebuild compile 

4) ebuild /usr/portage/net-misc/asterisk/asterisk-1.2.27.ebuild install

5) ebuild /usr/portage/net-misc/asterisk/asterisk-1.2.27.ebuild qmerge

6) ebuild /usr/portage/net-misc/asterisk/asterisk-1.2.27.ebuild clean


After this 6 steps now asterisks starts. Hope that helps

Francesc

Comment 5 Regin 2009-02-23 21:34:19 UTC
Simply use workaround from http://bugs.gentoo.org/show_bug.cgi?id=206463 

Try:

LIBSPEEX="-lspeexdsp" emerge -v asterisk     
Comment 6 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2009-02-26 06:31:50 UTC
(In reply to comment #5)
> Simply use workaround from http://bugs.gentoo.org/show_bug.cgi?id=206463 
> 
> Try:
> 
> LIBSPEEX="-lspeexdsp" emerge -v asterisk     
> 

So this bug should be marked as duplicate of bug #206463 ;)
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-02-26 13:58:30 UTC

*** This bug has been marked as a duplicate of bug 206463 ***