From: Peter G. <jpg...@gm...> - 2008-04-23 12:12:26
|
On Wed, Apr 23, 2008 at 2:08 AM, Mats Bengtsson <ma...@gm...> wrote: > On Tue, Apr 22, 2008 at 4:18 PM, Peter Grayson <jpg...@gm...> wrote: > > <snip> > > > > > You don't give many clues as to what might be going wrong. Do you set > > the PKG_CONFIG_PATH when you configure iaxclient? Where do iaxclient's > > dependencies get installed? /usr/local? Do you have different versions > > of speex, portaudio, etc. installed in /usr/lib? > > > > Perhaps I can provide some detailed info of the current state of the > build environment. > Note that I did 'updatedb' to get fresh 'locate' results. > > linux:/usr/local/lib/pkgconfig # env | grep PKG > PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/opt/gnome/lib/pkgconfig:/opt/gnome/share/pkgconfig > linux:/usr/local/lib/pkgconfig # ll | grep speex > -rw-r--r-- 1 root root 321210 Apr 16 16:04 libspeex.a > -rwxr-xr-x 1 root root 763 Apr 16 16:04 libspeex.la > -rw-r--r-- 1 root root 217008 Apr 16 16:04 libspeexdsp.a > -rwxr-xr-x 1 root root 772 Apr 16 16:04 libspeexdsp.la > linux:/usr/local/lib/pkgconfig # locate libspeex > /usr/local/lib/libspeex.a > /usr/local/lib/libspeex.la > /usr/local/lib/libspeexdsp.a > /usr/local/lib/libspeexdsp.la > linux:/usr/local/lib/pkgconfig # locate portaudio > /usr/lib/ooo-2.0/program/libportaudio.so > /usr/lib/ooo-2.0/program/libportaudio.so.0 > /usr/lib/ooo-2.0/program/libportaudio.so.0.0.18 > /usr/local/include/portaudio.h > /usr/local/lib/libportaudio.a > /usr/local/lib/libportaudio.la > /usr/local/lib/pkgconfig/portaudio-2.0.pc Okay, so you've got just the static libraries installed in /usr/local -- that's good. > linux:/usr/local/lib/pkgconfig # cat * > prefix=/usr/local > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: iaxclient > Description: Inter-Asterisk eXchange Client Library > Version: 2.x-trunk > Libs: -L${libdir} -liaxclient > Libs.private: > Cflags: -I${includedir} > Requires.private: portaudio-2.0 speex > > prefix=/usr/local > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: PortAudio > Description: Portable audio I/O > Requires: > Version: 19 > > Libs: -L${libdir} -lportaudio -lm -lpthread > Cflags: -I${includedir} -pthread > # libspeex pkg-config source file > > prefix=/usr/local > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: speex > Description: Speex is an audio codec tuned for speech > Version: 1.2beta3 > Requires: > Conflicts: > Libs: -L${libdir} -lspeex -lm > Cflags: -I${includedir} > # libspeexdsp pkg-config source file > > prefix=/usr/local > exec_prefix=${prefix} > libdir=${exec_prefix}/lib > includedir=${prefix}/include > > Name: speexdsp > Description: Speexdsp is a speech processing library that goes along > with the Speex codec > Version: 1.2beta3 > Requires: > Conflicts: > Libs: -L${libdir} -lspeexdsp -lm > Cflags: -I${includedir} And the .pc files are in their correct place too. Looking at contrib/tcl/configure.in, I notice three things: 1) There is no use of the PKG_CHECK_MODULES macro 2) The library dependencies are hardcoded (portaudio, speex, speexdsp, and iaxclient) 3) The libraries are listed in the opposite order that they should be -- this could lead to missing symbols. The TEA_ADD_LIBS line should list the libraries in this order: -liaxclient -lportaudio -lspeex -lspeexdsp. > It seems that speex is indeed statically linked but still missing (at > least) one speex symbol: > > linux:~/C/voip/iaxclient/trunk/contrib/tcl # ldd libtcliaxclient0.2.so > > linux-gate.so.1 => (0xffffe000) > libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40052000) > libasound.so.2 => /usr/lib/libasound.so.2 (0x40065000) > libc.so.6 => /lib/tls/libc.so.6 (0x40123000) > > /lib/ld-linux.so.2 (0x80000000) > libm.so.6 => /lib/tls/libm.so.6 (0x40242000) > libdl.so.2 => /lib/libdl.so.2 (0x40268000) > libresmgr.so.1 => /lib/libresmgr.so.1 (0x4026c000) I am assuming that you are missing the same symbol Andrea mentioned in his last email: speex_preprocess_ctl. > > You should know that this whole exercise of building a shared object > > with no shared object dependencies is much like swimming upstream. The > > build tools are all geared towards either building things statically > > or building things shared, but not mixing the two in this way. I am > > curious as to why it is so important to avoid these dynamic link > > dependencies -- especially on linux? > > > > We must be sure of which versions of speex and portaudio we are using > to avoid the "dll hell". > This is not so strange since it is exactly how it worked with the old > iaxclient build system > where speex and portaudio were compiled together with iaxclient code. I don't think it's so strange to want to statically link like this. However, this static linking paradigm conflicts with what a downstream distribution packager would need to ship this package with a Linux distribution. I didn't know if you were concerned about helping potential downstream packagers. Pete |