[asterisk-bugs] [Asterisk 0017162]: missing libs in link command of chan_h323.so: module fails to load
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Apr 26 13:03:18 CDT 2010
The following issue has been set as RELATED TO issue 0017226.
======================================================================
https://issues.asterisk.org/view.php?id=17162
======================================================================
Reported By: tzafrir
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 17162
Category: Channels/chan_h323
Reproducibility: always
Severity: major
Priority: normal
Status: feedback
Asterisk Version: SVN
JIRA: SWP-1280
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2
SVN Revision (number only!): 256483
Request Review:
======================================================================
Date Submitted: 2010-04-10 11:58 CDT
Last Modified: 2010-04-26 13:03 CDT
======================================================================
Summary: missing libs in link command of chan_h323.so: module
fails to load
Description:
It used to be that when building with chan_h323 enabled, asterisk would
fail the build after generating channels/h323/Makefile.ast . Now it
doesn't. However values from it don't seem to be used when linking
channels/chan_h323.so .
$ make clean
$ make NOISY_BUILD=1
...
gcc -o chan_gtalk.o -c chan_gtalk.c -MD -MT chan_gtalk.o -MF
.chan_gtalk.o.d -MP -pthread
-I/home/tzafrir/Proj/Asterisk/Git/asterisk/include -I/usr/include/libxml2
-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-g3 -march=k8 -O0 -fPIC -DAST_MODULE=\"chan_gtalk\"
gcc -o chan_gtalk.so -pthread -shared chan_gtalk.o -liksemel
-lssl -lcrypto
gcc -o chan_h323.o -c chan_h323.c -MD -MT chan_h323.o -MF .chan_h323.o.d
-MP -pthread -I/home/tzafrir/Proj/Asterisk/Git/asterisk/include
-I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -g3 -march=k8 -O0 -fPIC -DAST_MODULE=\"chan_h323\"
make -C h323 Makefile.ast
make[2]: Entering directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
g++ -DNDEBUG -I../../include -include ../../include/asterisk/autoconfig.h
-fPIC -D_REENTRANT -Wall -DP_64BIT -fPIC -DPIC -I/usr/share/pwlib//include
-DPTRACING -I/usr/share/openh323/include -M ast_h323.cxx >> *.dep
make[2]: Leaving directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
make[2]: Entering directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
make[2]: Leaving directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
make -C h323 libchanh323.a
make[2]: Entering directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
g++ -DNDEBUG -I../../include -include ../../include/asterisk/autoconfig.h
-fPIC -D_REENTRANT -Wall -DP_64BIT -fPIC -DPIC
-I/usr/share/pwlib//include -DPTRACING -I/usr/share/openh323/include -O2
-pipe -c ast_h323.cxx -o ast_h323.o
g++ -DNDEBUG -I../../include -include ../../include/asterisk/autoconfig.h
-fPIC -D_REENTRANT -Wall -DP_64BIT -fPIC -DPIC
-I/usr/share/pwlib//include -DPTRACING -I/usr/share/openh323/include -O2
-pipe -c compat_h323.cxx -o compat_h323.o
g++ -DNDEBUG -I../../include -include ../../include/asterisk/autoconfig.h
-fPIC -D_REENTRANT -Wall -DP_64BIT -fPIC -DPIC
-I/usr/share/pwlib//include -DPTRACING -I/usr/share/openh323/include -O2
-pipe -c cisco-h225.cxx -o cisco-h225.o
g++ -DNDEBUG -I../../include -include ../../include/asterisk/autoconfig.h
-fPIC -D_REENTRANT -Wall -DP_64BIT -fPIC -DPIC
-I/usr/share/pwlib//include -DPTRACING -I/usr/share/openh323/include -O2
-pipe -c caps_h323.cxx -o caps_h323.o
ar crv libchanh323.a ./ast_h323.o ./compat_h323.o ./cisco-h225.o
./caps_h323.o
a - ./ast_h323.o
a - ./compat_h323.o
a - ./cisco-h225.o
a - ./caps_h323.o
make[2]: Leaving directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels/h323'
g++ -pthread -shared -o chan_h323.so chan_h323.o h323/libchanh323.a
...
$ ldd channels/chan_h323.so
linux-vdso.so.1 => (0x00007fffc9bff000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f32f9a65000)
libm.so.6 => /lib/libm.so.6 (0x00007f32f97e3000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f32f95cc000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f32f93b0000)
libc.so.6 => /lib/libc.so.6 (0x00007f32f905c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f32fa015000)
If I try to load that module it would fail, due to missing symbols that
appear to come from openh323.
Now let's rebuild:
$ rm channels/chan_h323.so
$ make NOISY_BUILD=1
...
make[1]: Entering directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels'
g++ -pthread -shared -o chan_h323.so chan_h323.o h323/libchanh323.a
-lopenh323 -lresolv -lpt -lldap -llber -lldap_r -lpthread -lsasl2 -lssl
-lcrypto -lexpat -lresolv -ldl
make[1]: Leaving directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels'
...
$ ldd channels/chan_h323.so
linux-vdso.so.1 => (0x00007fffad5ff000)
libopenh323.so.1.18.0 => /usr/lib/libopenh323.so.1.18.0
(0x00007f5d2d492000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007f5d2d27c000)
libpt.so.1.10.10 => /usr/lib/libpt.so.1.10.10 (0x00007f5d2cc7f000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2
(0x00007f5d2ca34000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007f5d2c825000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f5d2c608000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007f5d2c3ef000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x00007f5d2c19a000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8
(0x00007f5d2bdf9000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f5d2bbd1000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f5d2b9cd000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f5d2b6bc000)
libm.so.6 => /lib/libm.so.6 (0x00007f5d2b43a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f5d2b224000)
libc.so.6 => /lib/libc.so.6 (0x00007f5d2aecf000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007f5d2ac2c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5d2e189000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f5d2aa14000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007f5d2a804000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0x00007f5d2a58b000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0
(0x00007f5d2a388000)
That looks more like bad old chan_h323.
Now, rebuild, but also remove channels/h323/Makefile.ast:
$ rm channels/chan_h323.so channels/h323/Makefile.ast
$ make NOISY_BUILD=1
...
make[1]: Entering directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels'
g++ -pthread -shared -o chan_h323.so chan_h323.o h323/libchanh323.a
make[1]: Leaving directory
`/home/tzafrir/Proj/Asterisk/Git/asterisk/channels'
$ ldd channels/chan_h323.so
linux-vdso.so.1 => (0x00007fffdc3ff000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4750a6e000)
libm.so.6 => /lib/libm.so.6 (0x00007f47507ec000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f47505d5000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f47503b9000)
libc.so.6 => /lib/libc.so.6 (0x00007f4750065000)
/lib64/ld-linux-x86-64.so.2 (0x00007f475101e000)
$ ls channels/h323/Makefile.ast
ls: cannot access channels/h323/Makefile.ast: No such file or directory
As a temporary workaround, I included a simple patch to the main makefile
to allow me to cleanly generate channels/h323/Makefile.ast
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0017226 [patch] using opal instead of pwlib/ope...
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-04-26 13:03 lmadsen Relationship added related to 0017226
======================================================================
More information about the asterisk-bugs
mailing list