From: Andrea S. <si...@op...> - 2008-04-16 13:23:39
|
Hi all, I was playing with music on hold through tcl extension placed in contrib/tcl, I was able to successfully hold a call but while trying to unhold my application simply die (segfault). Fortunately a similar case came to my mind while debugging that issue, see this thread to get an idea: http://sourceforge.net/mailarchive/message.php?msg_name=472846D8.3010405%40opinioni.net After applying the same cure to contrib/tcl/iaxclient.c I was able to unhold a call without having my app segfaulting. that's the patch against current trunk sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$svn diff -x '-bwu' iaxclient.c Index: iaxclient.c =================================================================== --- iaxclient.c (revision 1412) +++ iaxclient.c (working copy) @@ -696,7 +696,7 @@ } if ( result == TCL_OK ) { iaxc_quelch(selected, 1); - iaxc_select_call(-1); + //iaxc_select_call(-1); } return result; } @@ -1089,7 +1089,7 @@ } if (result == TCL_OK) { iaxc_unquelch(selected); - iaxc_select_call(selected); + //iaxc_select_call(selected); } return result; } Andrea |
From: Mats B. <ma...@gm...> - 2008-04-16 14:32:17
|
Many Thanks for this. I don't think the hold/unhold commands got tested at all. Now committed to svn. /Mats On Wed, Apr 16, 2008 at 3:23 PM, Andrea Suisani <si...@op...> wrote: > Hi all, > > I was playing with music on hold through tcl extension > placed in contrib/tcl, I was able to successfully hold a > call but while trying to unhold my application simply > die (segfault). > |
From: Andrea S. <si...@op...> - 2008-04-16 14:36:46
|
Mats Bengtsson wrote: > Many Thanks for this. you're welcome > I don't think the hold/unhold commands got tested at all. > Now committed to svn. perfect Andrea |
From: Mats B. <ma...@gm...> - 2008-04-17 06:46:51
|
Andrea, Perhaps you have any tips for building my tcl package on linux. I have made a memo of my procedures in contrib/tcl/build-iaxclient.txt but when I try to load it into tcl it complains about missing speex symbol speex_preprocess_ctl Also, it is just about 280k which seems way too small, so I suspect some missing code there. When I run make the link command is: gcc -pipe -shared -o libtcliaxclient0.2.so iaxclient.o tones.o XThreadUtil.o -lportaudio -lspeexdsp -lspeex -liaxclient -lpthread -lasound -L/usr/local/lib -ltclstub8.5 and I don't have any libspeex.so etc. installed on my box as far as I can see. Mats |
From: Andrea S. <si...@op...> - 2008-04-17 08:33:48
|
Hi Mats Mats Bengtsson wrote: > Andrea, > > Perhaps you have any tips for building my tcl package on linux. hopefully ;) > I have made a memo of my procedures in > contrib/tcl/build-iaxclient.txt > but when I try to load it into tcl it complains about missing speex symbol > speex_preprocess_ctl > Also, it is just about 280k which seems way too small, so I suspect some > missing code there. I've compiled required libs a month ago so take the following with a grain of salt regarding lib speex that's what I've done so far: download speex 1.2beta3 (http://downloads.xiph.org/releases/speex/speex-1.2beta3.tar.gz) ./configure && make && sudo make install as you can see I ran ./configure with default values and the default --prefix value is /usr/local so you've everything installed in /usr/local/lib that's what I've got sickpig@suino:~$ls -lhct /usr/local/lib/ | grep speex -rw-r--r-- 1 root root 221K 2008-02-18 10:26 libspeexdsp.a -rwxr-xr-x 1 root root 840 2008-02-18 10:26 libspeexdsp.la lrwxrwxrwx 1 root root 20 2008-02-18 10:26 libspeexdsp.so -> libspeexdsp.so.1.4.0 lrwxrwxrwx 1 root root 20 2008-02-18 10:26 libspeexdsp.so.1 -> libspeexdsp.so.1.4.0 -rwxr-xr-x 1 root root 181K 2008-02-18 10:26 libspeexdsp.so.1.4.0 -rw-r--r-- 1 root root 336K 2008-02-18 10:26 libspeex.a -rwxr-xr-x 1 root root 819 2008-02-18 10:26 libspeex.la lrwxrwxrwx 1 root root 17 2008-02-18 10:26 libspeex.so -> libspeex.so.1.4.0 lrwxrwxrwx 1 root root 17 2008-02-18 10:26 libspeex.so.1 -> libspeex.so.1.4.0 -rwxr-xr-x 1 root root 244K 2008-02-18 10:26 libspeex.so.1.4.0 whereas I've built iaxclient lib using this configure option: ./configure --disable-video --enable-clients=testcall --with-local-gsm make sudo make install result: sickpig@suino:~$ls -lcht /usr/lib/tcliaxclient0.2/ total 48K -rw-r--r-- 1 root root 5.9K 2008-04-17 10:28 iaxclient.tcl -rw-r--r-- 1 root root 185 2008-04-17 10:28 pkgIndex.tcl -rwxr-xr-x 1 root root 34K 2008-04-17 10:28 libtcliaxclient0.2.so Andrea |
From: Mats B. <ma...@gm...> - 2008-04-18 07:23:43
|
Andrea, >From what I can see it looks that your libtcliaxclient0.2.so links to the shared libs only since it is just 34k. It works on your box but the libs need to go with it. I need a more selfcontained libtcliaxclient0.2.so with speex and portaudio statically linked in. I have on my box: linux:~/C/voip/iaxclient/trunk/contrib/tcl # ls -lhct | grep speex -rw-r--r-- 1 root root 212K Apr 16 16:04 libspeexdsp.a -rwxr-xr-x 1 root root 772 Apr 16 16:04 libspeexdsp.la -rw-r--r-- 1 root root 314K Apr 16 16:04 libspeex.a -rwxr-xr-x 1 root root 763 Apr 16 16:04 libspeex.la and my libtcliaxclient0.2.so is 289k when it used to be with the old build system where all was built at the same time 445k. Seems something is missing. Mats On Thu, Apr 17, 2008 at 10:32 AM, Andrea Suisani <si...@op...> wrote: > > > I have made a memo of my procedures in > > contrib/tcl/build-iaxclient.txt > > but when I try to load it into tcl it complains about missing speex symbol > > speex_preprocess_ctl > > Also, it is just about 280k which seems way too small, so I suspect some > > missing code there. > > > > I've compiled required libs a month ago > so take the following with a grain of salt > > regarding lib speex that's what I've done so far: > > download speex 1.2beta3 > (http://downloads.xiph.org/releases/speex/speex-1.2beta3.tar.gz) > ./configure && make && sudo make install > > as you can see I ran ./configure with default values > and the default --prefix value is /usr/local > so you've everything installed in /usr/local/lib > > that's what I've got > > sickpig@suino:~$ls -lhct /usr/local/lib/ | grep speex > -rw-r--r-- 1 root root 221K 2008-02-18 10:26 libspeexdsp.a > -rwxr-xr-x 1 root root 840 2008-02-18 10:26 libspeexdsp.la > lrwxrwxrwx 1 root root 20 2008-02-18 10:26 libspeexdsp.so -> > libspeexdsp.so.1.4.0 > lrwxrwxrwx 1 root root 20 2008-02-18 10:26 libspeexdsp.so.1 -> > libspeexdsp.so.1.4.0 > -rwxr-xr-x 1 root root 181K 2008-02-18 10:26 libspeexdsp.so.1.4.0 > -rw-r--r-- 1 root root 336K 2008-02-18 10:26 libspeex.a > -rwxr-xr-x 1 root root 819 2008-02-18 10:26 libspeex.la > lrwxrwxrwx 1 root root 17 2008-02-18 10:26 libspeex.so -> > libspeex.so.1.4.0 > lrwxrwxrwx 1 root root 17 2008-02-18 10:26 libspeex.so.1 -> > libspeex.so.1.4.0 > -rwxr-xr-x 1 root root 244K 2008-02-18 10:26 libspeex.so.1.4.0 > > > whereas I've built iaxclient lib using this configure option: > > ./configure --disable-video --enable-clients=testcall --with-local-gsm > make > sudo make install > > result: > > sickpig@suino:~$ls -lcht /usr/lib/tcliaxclient0.2/ > total 48K > -rw-r--r-- 1 root root 5.9K 2008-04-17 10:28 iaxclient.tcl > -rw-r--r-- 1 root root 185 2008-04-17 10:28 pkgIndex.tcl > -rwxr-xr-x 1 root root 34K 2008-04-17 10:28 libtcliaxclient0.2.so > |
From: Andrea S. <si...@op...> - 2008-04-18 11:41:32
|
Mats Bengtsson wrote: > Andrea, > >>From what I can see it looks that your libtcliaxclient0.2.so links to the shared > libs only since it is just 34k. It works on your box but the libs need > to go with it. yeah you're right, I just don't need to a static compiled libtcliaxclient0.2.so In fact this morning while reading build-iaxclient.txt I wonder why you use --disable-shared both in speex and portaudio configure... after reading your post I figured out... I will try to build iaxclient without runtime linked library and I'll let you know > I need a more selfcontained libtcliaxclient0.2.so with speex and > portaudio statically linked in. > I have on my box: > > linux:~/C/voip/iaxclient/trunk/contrib/tcl # ls -lhct | grep speex > -rw-r--r-- 1 root root 212K Apr 16 16:04 libspeexdsp.a > -rwxr-xr-x 1 root root 772 Apr 16 16:04 libspeexdsp.la > -rw-r--r-- 1 root root 314K Apr 16 16:04 libspeex.a > -rwxr-xr-x 1 root root 763 Apr 16 16:04 libspeex.la > > and my libtcliaxclient0.2.so is 289k when it used to be with the old > build system > where all was built at the same time 445k. Seems something is missing. > > Mats Andrea PS I needed to convert build-iaxclient.txt to being able to read it because of CR line terminators. I used this command tr '\015' '\012' < build-iaxclient.txt > new-build-iaxclient.txt |
From: Andrea S. <si...@op...> - 2008-04-18 12:55:39
|
Mats Bengtsson wrote: > Andrea, > > Perhaps you have any tips for building my tcl package on linux. > I have made a memo of my procedures in > contrib/tcl/build-iaxclient.txt > but when I try to load it into tcl it complains about missing speex symbol > speex_preprocess_ctl some here :( sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ tclsh % package require iaxclient couldn't load file "/usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so": /usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so: undefined symbol: speex_preprocess_ctl % exit I've follow the instructions that I've found in build-iaxclient.txt (also setting LDFLAGS env var to "-Wl,-static") that's the size sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ls -lh libtcliaxclient0.2.so -rwxr-xr-x 1 sickpig sickpig 320K 2008-04-18 14:34 libtcliaxclient0.2.so that's lib dep sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ldd libtcliaxclient0.2.so linux-gate.so.1 => (0xffffe000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7efe000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7db4000) /lib/ld-linux.so.2 (0x80000000) they looks good, no external lib deps beside the usual suspects it seems to me that at compile time it fails to bundle external libs... but I'm far from being an expert in this stuff.... P.S. I've to append --without-gsm flag to iaxclient configure otherwise, tcliaxclient complains also about "undefined symbol: gsm_create" maybe that's a symptom |
From: Andrea S. <si...@op...> - 2008-04-21 13:55:20
|
Hi mats, any news ? andrea Andrea Suisani wrote: > Mats Bengtsson wrote: >> Andrea, >> >> Perhaps you have any tips for building my tcl package on linux. >> I have made a memo of my procedures in >> contrib/tcl/build-iaxclient.txt >> but when I try to load it into tcl it complains about missing speex symbol >> speex_preprocess_ctl > > some here :( > > sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ tclsh > % package require iaxclient > couldn't load file "/usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so": /usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so: undefined symbol: speex_preprocess_ctl > % exit > > I've follow the instructions that I've found in build-iaxclient.txt > (also setting LDFLAGS env var to "-Wl,-static") > > > that's the size > > sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ls -lh libtcliaxclient0.2.so > -rwxr-xr-x 1 sickpig sickpig 320K 2008-04-18 14:34 libtcliaxclient0.2.so > > that's lib dep > > sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ldd libtcliaxclient0.2.so > linux-gate.so.1 => (0xffffe000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7efe000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7db4000) > /lib/ld-linux.so.2 (0x80000000) > > they looks good, no external lib deps beside the usual suspects > it seems to me that at compile time it fails to bundle external > libs... but I'm far from being an expert in this stuff.... |
From: Mats B. <ma...@gm...> - 2008-04-22 06:05:15
|
On Mon, Apr 21, 2008 at 3:54 PM, Andrea Suisani <si...@op...> wrote: > Hi mats, > > any news ? > No. I have absolutely no idea what is going wrong. The very same build system (configure && make, not Xcode) on MacOSX works OK. I have: Macintosh:build mats$ ll /usr/local/lib/ | grep speex -rw-r--r-- 1 root wheel 375056 14 Mar 08:21 libspeex.a -rwxr-xr-x 1 root wheel 763 14 Mar 08:21 libspeex.la -rw-r--r-- 1 root wheel 278032 14 Mar 08:21 libspeexdsp.a -rwxr-xr-x 1 root wheel 772 14 Mar 08:21 libspeexdsp.la and the actual link stage reads: gcc -pipe -dynamiclib -Os -Wall -Wno-implicit-int -fno-common -prebind -headerpad_max_install_names -Wl,-search_paths_first -Wl,-single_module -o libtcliaxclient0.2.dylib iaxclient.o tones.o XThreadUtil.o -lportaudio -lspeexdsp -lspeex -liaxclient -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework CoreServices -L/Library/Frameworks/Tcl.framework -ltclstub8.5 Excluding the Mac specific stuff, this looks the same as on linux. There are a few switches I don't know: -Wl,-search_paths_first Also, the dylib is larger (352k) than on linux (280k). I also explicitly checked that the missing symbol on linux is there: nm libtcliaxclient0.2.dylib |grep speex_preprocess_ctl 00012be0 T _speex_preprocess_ctl Mats the clueless... |
From: Andrea S. <si...@op...> - 2008-04-22 09:59:32
|
Hi all, tclers on that list will really appreciate if someone with a better knowledge of iaxclient building system help us to get rid of that annoying problem :) let me summarize: - goal: build a "self-contained" libtcliaxclient0.2.so with speex and portaudio statically linked in. - building iaxclient and tcl extensions (placed in contrib/tcl) the usual way lead me to a working .so file of 34 KB with this dependencies sickpig@suino:/usr/lib/tcliaxclient0.2$ldd libtcliaxclient0.2.so linux-gate.so.1 => (0xffffe000) libspeexdsp.so.1 => /usr/local/lib/libspeexdsp.so.1 (0xb7f5a000) libspeex.so.1 => /usr/local/lib/libspeex.so.1 (0xb7f43000) libiaxclient.so.1 => /usr/local/lib/libiaxclient.so.1 (0xb7f1c000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f04000) libasound.so.2 => /usr/lib/libasound.so.2 (0xb7e3e000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cf4000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7cce000) libportaudio.so.2 => /usr/local/lib/libportaudio.so.2 (0xb7ca7000) libgsm.so.1 => /usr/lib/libgsm.so.1 (0xb7c97000) /lib/ld-linux.so.2 (0x80000000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7c93000) libjack.so.0 => /usr/lib/libjack.so.0 (0xb7c7a000) librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7c70000) - building the bit following instructions contained in contrib/tcl/build-iaxclient.txt, trying to get a tcl extensions with speex and portaudio linked statically, give me a not working library due to: sickpig@suino:~$ tclsh % package require iaxclient couldn't load file "/usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so": /usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so: undefined symbol: speex_preprocess_ctl size of tcl extensions is bigger but still... sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ls -lh libtcliaxclient0.2.so -rwxr-xr-x 1 sickpig sickpig 320K 2008-04-18 14:34 libtcliaxclient0.2.so with those shared library dependencies sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ldd libtcliaxclient0.2.so linux-gate.so.1 => (0xffffe000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7efe000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7db4000) /lib/ld-linux.so.2 (0x80000000) any hints? am I missing something obvious? thanks andrea Mats Bengtsson wrote: > On Mon, Apr 21, 2008 at 3:54 PM, Andrea Suisani <si...@op...> wrote: >> Hi mats, >> >> any news ? >> > > No. I have absolutely no idea what is going wrong. > The very same build system (configure && make, not Xcode) on MacOSX > works OK. I have: > > Macintosh:build mats$ ll /usr/local/lib/ | grep speex > -rw-r--r-- 1 root wheel 375056 14 Mar 08:21 libspeex.a > -rwxr-xr-x 1 root wheel 763 14 Mar 08:21 libspeex.la > -rw-r--r-- 1 root wheel 278032 14 Mar 08:21 libspeexdsp.a > -rwxr-xr-x 1 root wheel 772 14 Mar 08:21 libspeexdsp.la > > and the actual link stage reads: > > gcc -pipe -dynamiclib -Os -Wall -Wno-implicit-int -fno-common -prebind > -headerpad_max_install_names -Wl,-search_paths_first > -Wl,-single_module -o libtcliaxclient0.2.dylib iaxclient.o tones.o > XThreadUtil.o -lportaudio -lspeexdsp -lspeex -liaxclient -framework > CoreAudio -framework AudioToolbox -framework AudioUnit -framework > CoreServices -L/Library/Frameworks/Tcl.framework -ltclstub8.5 > > Excluding the Mac specific stuff, this looks the same as on linux. > There are a few switches I don't know: -Wl,-search_paths_first > Also, the dylib is larger (352k) than on linux (280k). > > I also explicitly checked that the missing symbol on linux is there: > nm libtcliaxclient0.2.dylib |grep speex_preprocess_ctl > 00012be0 T _speex_preprocess_ctl > > Mats the clueless... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Iaxclient-devel mailing list > Iax...@li... > https://lists.sourceforge.net/lists/listinfo/iaxclient-devel > |
From: Peter G. <jpg...@gm...> - 2008-04-22 14:19:02
|
On Tue, Apr 22, 2008 at 5:58 AM, Andrea Suisani <si...@op...> wrote: > Hi all, > > tclers on that list will really appreciate if someone > with a better knowledge of iaxclient building system help > us to get rid of that annoying problem :) > > let me summarize: > > - goal: build a "self-contained" libtcliaxclient0.2.so with speex and > portaudio statically linked in. > > - building iaxclient and tcl extensions (placed in contrib/tcl) > the usual way lead me to a working .so file of 34 KB with this > dependencies > > sickpig@suino:/usr/lib/tcliaxclient0.2$ldd libtcliaxclient0.2.so > linux-gate.so.1 => (0xffffe000) > libspeexdsp.so.1 => /usr/local/lib/libspeexdsp.so.1 (0xb7f5a000) > libspeex.so.1 => /usr/local/lib/libspeex.so.1 (0xb7f43000) > libiaxclient.so.1 => /usr/local/lib/libiaxclient.so.1 (0xb7f1c000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7f04000) > libasound.so.2 => /usr/lib/libasound.so.2 (0xb7e3e000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7cf4000) > libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7cce000) > libportaudio.so.2 => /usr/local/lib/libportaudio.so.2 (0xb7ca7000) > libgsm.so.1 => /usr/lib/libgsm.so.1 (0xb7c97000) > /lib/ld-linux.so.2 (0x80000000) > libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7c93000) > libjack.so.0 => /usr/lib/libjack.so.0 (0xb7c7a000) > librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7c70000) > > - building the bit following instructions contained in contrib/tcl/build-iaxclient.txt, > trying to get a tcl extensions with speex and portaudio linked statically, > give me a not working library due to: > > sickpig@suino:~$ tclsh > % package require iaxclient > couldn't load file "/usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so": /usr/lib/tcliaxclient0.2/libtcliaxclient0.2.so: undefined symbol: speex_preprocess_ctl > > size of tcl extensions is bigger but still... > > sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ls -lh libtcliaxclient0.2.so > -rwxr-xr-x 1 sickpig sickpig 320K 2008-04-18 14:34 libtcliaxclient0.2.so > > with those shared library dependencies > > sickpig@suino:~/src/iaxclient-svn-tree/trunk/contrib/tcl$ ldd libtcliaxclient0.2.so > linux-gate.so.1 => (0xffffe000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7efe000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7db4000) > /lib/ld-linux.so.2 (0x80000000) > > > any hints? am I missing something obvious? 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? 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? Pete |
From: Andrea S. <si...@op...> - 2008-04-22 15:59:03
|
Peter Grayson wrote: > 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 you're right sorry :) Now I'm in a hurry I'll submit something more detailed tomorrow, only if mats doesn't beat me > dependencies get installed? /usr/local? Do you have different versions > of speex, portaudio, etc. installed in /usr/lib? > 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? > > Pete > |
From: Mats B. <ma...@gm...> - 2008-04-23 06:07:55
|
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 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} 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) > 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. Mats |
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 |
From: Mats B. <ma...@gm...> - 2008-04-23 12:41:14
|
On Wed, Apr 23, 2008 at 2:12 PM, Peter Grayson <jpg...@gm...> wrote: > > 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 I just use the Tcl standard build system TEA without knowing much... > 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. > I had absolutely no idea this mattered. Now I know. Many Thanks. This puts us much further and I don't get complaints about missing speex symbols. The link stage now reads: gcc -pipe -shared -o libtcliaxclient0.2.so iaxclient.o tones.o XThreadUtil.o -liaxclient -lportaudio -lspeex -lspeexdsp -lpthread -lasound -L/usr/local/lib -ltclstub8.5 However, I get undefined symbol: clock_gettime which seems to have something to do with my old linux kernel: http://ussg.iu.edu/hypermail/linux/net/0304.1/0007.html Maybe Andrea gets lucky? svn updated. Mats |
From: Andrea S. <si...@op...> - 2008-04-23 13:16:17
|
Mats Bengtsson wrote: [cut] > I had absolutely no idea this mattered. Now I know. > Many Thanks. This puts us much further and I don't get > complaints about missing speex symbols. > The link stage now reads: > gcc -pipe -shared -o libtcliaxclient0.2.so iaxclient.o tones.o > XThreadUtil.o -liaxclient -lportaudio -lspeex -lspeexdsp -lpthread > -lasound -L/usr/local/lib -ltclstub8.5 > > However, I get > undefined symbol: clock_gettime > > which seems to have something to do with my old linux kernel: > http://ussg.iu.edu/hypermail/linux/net/0304.1/0007.html > Maybe Andrea gets lucky? it seems to me that I'd got that error while trying to reproduce your problem, rebuilding iaxclient from scratch does the trick for me.... but I'm not 100% sure, I'll try to investigate but don't hold your breath I'm quite busy lately ;) > svn updated. many thanks ! andrea |
From: Andrea S. <si...@op...> - 2008-04-23 13:44:35
|
Andrea Suisani wrote: > Mats Bengtsson wrote: [cut] >> However, I get >> undefined symbol: clock_gettime >> >> which seems to have something to do with my old linux kernel: >> http://ussg.iu.edu/hypermail/linux/net/0304.1/0007.html >> Maybe Andrea gets lucky? > > it seems to me that I'd got that error while trying to reproduce > your problem, rebuilding iaxclient from scratch does the trick for me.... > but I'm not 100% sure, I'll try to investigate but don't hold your > breath I'm quite busy lately ;) mmm.... maybe the problem has been gone 'cause I've dropped --disable-shared from iaxclient configure.... andrea |
From: Mats B. <ma...@gm...> - 2008-04-23 14:32:52
|
On Wed, Apr 23, 2008 at 3:03 PM, Peter Grayson <jpg...@gm...> wrote: > > > > > > The TEA_ADD_LIBS line should list the libraries in this order: > > > -liaxclient -lportaudio -lspeex -lspeexdsp. > > > > > > > I had absolutely no idea this mattered. Now I know. > > Many Thanks. This puts us much further and I don't get > > complaints about missing speex symbols. > > The link stage now reads: > > gcc -pipe -shared -o libtcliaxclient0.2.so iaxclient.o tones.o > > XThreadUtil.o -liaxclient -lportaudio -lspeex -lspeexdsp -lpthread > > -lasound -L/usr/local/lib -ltclstub8.5 > > > > However, I get > > undefined symbol: clock_gettime > > > > which seems to have something to do with my old linux kernel: > > http://ussg.iu.edu/hypermail/linux/net/0304.1/0007.html > > This symbol comes from librt (-lrt). > I added this to configure.in, did autoconf, and rebuilt. Linkage looks like: gcc -pipe -shared -o libtcliaxclient0.2.so iaxclient.o tones.o XThreadUtil.o -liaxclient -lportaudio -lspeex -lspeexdsp -lrt -lpthread -lasound -L/usr/local/lib -ltclstub8.5 So this time I got even further. At least I'm on the right track, but now... This is at least a runtime error. % load /root/C/voip/iaxclient/trunk/contrib/tcl/libtcliaxclient0.2.so Expression 'GetExactSampleRate( hwParams, &defaultSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 379 Expression '*idev = open( idevName, flags )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 810 Expression 'OpenDevices( idevName, odevName, &idev, &odev )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 864 Expression 'PaOssStream_Initialize( stream, inputParameters, outputParameters, streamCallback, userData, streamFlags, ossHostApi )' failed in 'src/hostapi/oss/pa_unix_oss.c', line: 1239 PortAudio error at Unable to open streams: Invalid error code (value greater than zero) % svn updated Mats |