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.
Reassigning back to herd since Stefan has been retired as a Gentoo developer (#27693).
Since LIBSPEEX has that "+=" the following should work: emake LIBSPEEX=-lspeexdsp <blah>
(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.
(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
Simply use workaround from http://bugs.gentoo.org/show_bug.cgi?id=206463 Try: LIBSPEEX="-lspeexdsp" emerge -v asterisk
(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 ;)
*** This bug has been marked as a duplicate of bug 206463 ***