List Info

Thread: contrib/tcl music on hold patch




contrib/tcl music on hold patch
country flaguser name
Italy
2008-04-16 08:23:09
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/ma
ilarchive/message.php?msg_name=472846D8.3010405%40opinioni.n
et

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

sickpigsuino:~/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

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: contrib/tcl music on hold patch
user name
2008-04-16 09:32:15
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
<sickpigopinioni.net> 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).
>

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: contrib/tcl music on hold patch
country flaguser name
Italy
2008-04-16 09:36:04
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



------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: contrib/tcl music on hold patch
user name
2008-04-17 01:46:58
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

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: contrib/tcl music on hold patch
user name
2008-04-18 02:23:45
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
<sickpigopinioni.net> 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.2
beta3.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
>
>  sickpigsuino:~$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:
>
>  sickpigsuino:~$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
>

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: contrib/tcl music on hold patch
user name
2008-04-22 01:05:19
On Mon, Apr 21, 2008 at 3:54 PM, Andrea Suisani
<sickpigopinioni.net> 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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: static build issue (was: Re: contrib/tcl music on hold patch)
user name
2008-04-22 09:18:58
On Tue, Apr 22, 2008 at 5:58 AM, Andrea Suisani
<sickpigopinioni.net> 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
>
>   sickpigsuino:/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:
>
>    sickpigsuino:~$ 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...
>
>    sickpigsuino:~/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
>
>    sickpigsuino:~/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

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: static build issue
country flaguser name
Italy
2008-04-22 10:57:37
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
> 



------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: static build issue (was: Re: contrib/tcl music on hold patch)
user name
2008-04-23 01:08:03
On Tue, Apr 22, 2008 at 4:18 PM, Peter Grayson
<jpgraysongmail.com> 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/pk
gconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/kde3/li
b/pkgconfig:/opt/gnome/lib/pkgconfig:/opt/gnome/lib/pkgconfi
g:/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=$
libdir=$/lib
includedir=$/include

Name: iaxclient
Description: Inter-Asterisk eXchange Client Library
Version: 2.x-trunk
Libs: -L$ -liaxclient
Libs.private:
Cflags: -I$
Requires.private: portaudio-2.0 speex

prefix=/usr/local
exec_prefix=$
libdir=$/lib
includedir=$/include

Name: PortAudio
Description: Portable audio I/O
Requires:
Version: 19

Libs: -L$ -lportaudio  -lm -lpthread
Cflags: -I$ -pthread
# libspeex pkg-config source file

prefix=/usr/local
exec_prefix=$
libdir=$/lib
includedir=$/include

Name: speex
Description: Speex is an audio codec tuned for speech
Version: 1.2beta3
Requires:
Conflicts:
Libs: -L$ -lspeex -lm
Cflags: -I$
# libspeexdsp pkg-config source file

prefix=/usr/local
exec_prefix=$
libdir=$/lib
includedir=$/include

Name: speexdsp
Description: Speexdsp is a speech processing library that
goes along
with the Speex codec
Version: 1.2beta3
Requires:
Conflicts:
Libs: -L$ -lspeexdsp -lm
Cflags: -I$

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

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

Re: static build issue (was: Re: contrib/tcl music on hold patch)
user name
2008-04-23 07:12:31
On Wed, Apr 23, 2008 at 2:08 AM, Mats Bengtsson
<matsbengmail.com> wrote:
> On Tue, Apr 22, 2008 at 4:18 PM, Peter Grayson
<jpgraysongmail.com> 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/pk
gconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/kde3/li
b/pkgconfig:/opt/gnome/lib/pkgconfig:/opt/gnome/lib/pkgconfi
g:/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=$
>  libdir=$/lib
>  includedir=$/include
>
>  Name: iaxclient
>  Description: Inter-Asterisk eXchange Client Library
>  Version: 2.x-trunk
>  Libs: -L$ -liaxclient
>  Libs.private:
>  Cflags: -I$
>  Requires.private: portaudio-2.0 speex
>
>  prefix=/usr/local
>  exec_prefix=$
>  libdir=$/lib
>  includedir=$/include
>
>  Name: PortAudio
>  Description: Portable audio I/O
>  Requires:
>  Version: 19
>
>  Libs: -L$ -lportaudio  -lm -lpthread
>  Cflags: -I$ -pthread
>  # libspeex pkg-config source file
>
>  prefix=/usr/local
>  exec_prefix=$
>  libdir=$/lib
>  includedir=$/include
>
>  Name: speex
>  Description: Speex is an audio codec tuned for speech
>  Version: 1.2beta3
>  Requires:
>  Conflicts:
>  Libs: -L$ -lspeex -lm
>  Cflags: -I$
>  # libspeexdsp pkg-config source file
>
>  prefix=/usr/local
>  exec_prefix=$
>  libdir=$/lib
>  includedir=$/include
>
>  Name: speexdsp
>  Description: Speexdsp is a speech processing library
that goes along
>  with the Speex codec
>  Version: 1.2beta3
>  Requires:
>  Conflicts:
>  Libs: -L$ -lspeexdsp -lm
>  Cflags: -I$

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

------------------------------------------------------------
-------------
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;1987
57673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Iaxclient-devel mailing list
Iaxclient-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iaxclie
nt-devel

[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )