2008-11-27 16:33:52 ooh323c channel driver for asterisk on IP04
Tihomir Culjaga (CROATIA)
Message: 65924
Hello,
i'm trying to compile ooh323c channel driver for asterisk planed to be running on an IP04 box. I still need help... Please!
I'm using the baps trunk from astfin.org:
svn co http://svn.astfin.org/software/baps/trunk baps
and a 2007R1.1_RC3 blackfin toolchain
http://blackfin.uclinux.org/gf/download/frsrelease/348/3347/blackfin-toolchain-07r1.1-3.i386.tar.gz
Of course I'm able to compile uClinux-dist and upload a working image to the IP04.
After asterisk-1.4.4 compiled, i tried with ooh323c from asterisk-addon (e.g. 1.4.4) but it doesn't work!
baps is located in: /home/tculjaga/BAPs/baps/
asterisk-1.4.4 is located in: /home/tculjaga/BAPs/baps/asterisk-1.4.4/
ooh323c is located in: /home/tculjaga/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
I tried to configure ooh323 like this:
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ ./configure --host=bfin-linux-uclibc --disable-largefile --without-pwlib --without-curl CFLAGS="-g -mfdpic -mfast-fp -ffast-math -D__FIXED_PT__ -D__BLACKFIN__ -Ibaps/uClinux-dist/staging/usr/include -fno-jump-tables" LDFLAGS="-mfdpic -Lbaps/uClinux-dist/staging/usr/lib -lpthread -ldl"
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for bfin-linux-uclibc-strip... bfin-linux-uclibc-strip
checking for bfin-linux-uclibc-gcc... bfin-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether bfin-linux-uclibc-gcc accepts -g... yes
checking for bfin-linux-uclibc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of bfin-linux-uclibc-gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... Invalid configuration `bfin-linux-uclibc': machine `bfin-linux' not recognized
configure: error: /bin/sh config/config.sub bfin-linux-uclibc failed
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
well, here i found that config.sub from ooh323c is doesn't know what to do with blackfin host!
Maybe i did it stupid, but i got a copy of config.sub from /home/tculjaga/BAPs/baps/asterisk-1.4.4/ and tried to configure again... and configure worked! Also, i added some path to asterisk include files ... just to be sure!
./configure --host=bfin-linux-uclibc --disable-largefile --without-pwlib --without-curl CFLAGS="-g -mfdpic -mfast-fp -ffast-math -D__FIXED_PT__ -D__BLACKFIN__ -I/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/include: -Isrc/ -I/home/tculjaga/BAPs/baps/asterisk-1.4.4/include -fno-jump-tables" LDFLAGS="-mfdpic -L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib -lpthread -ldl"
After configure went well, i need to issue make... well here i spent a lot of time fixing include paths within asterisk source (home/tculjaga/BAPs/baps/asterisk-1.4.4/include) files.
Finally, make didn't complain about missing files and it went till the end... except one thing! I'm missing the the libchan_h323.so.1.0.1 module! it never gets build!
What make does is to generate files under .lib/ directory:
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ ls -la .libs/
total 2084
drwxr-xr-x 2 tculjaga tculjaga 4096 2008-11-27 15:24 .
drwxr-xr-x 7 tculjaga tculjaga 4096 2008-11-27 15:24 ..
-rw-r--r-- 1 tculjaga tculjaga 2115668 2008-11-27 15:24 libchan_h323.a
lrwxrwxrwx 1 tculjaga tculjaga 18 2008-11-27 15:24 libchan_h323.la -> ../libchan_h323.la
-rw-r--r-- 1 tculjaga tculjaga 818 2008-11-27 15:24 libchan_h323.lai
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
Well, after a while digging into output generated by make i come out with this:
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ /bin/sh ./libtool --mode=link bfin-linux-uclibc-gcc -DGNU -D_GNU_SOURCE -D_REENTRANT -D_COMPACT -mfdpic -L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib -lpthread -ldl -o libchan_h323.so -rpath /usr/local/lib -L./ooh323c/src -version-info 1:1:0 chan_h323.lo ooh323cDriver.lo ooCmdChannel.lo ooLogChan.lo ooUtils.lo ooGkClient.lo context.lo ooDateTime.lo decode.lo dlist.lo encode.lo errmgmt.lo memheap.lo ootrace.lo oochannels.lo ooh245.lo ooports.lo ooq931.lo ooCapability.lo ooSocket.lo perutil.lo eventHandler.lo ooCalls.lo ooStackCmds.lo ooh323.lo ooh323ep.lo printHandler.lo rtctype.lo ooTimer.lo H235-SECURITY-MESSAGESDec.lo H235-SECURITY-MESSAGESEnc.lo H323-MESSAGES.lo H323-MESSAGESDec.lo H323-MESSAGESEnc.lo MULTIMEDIA-SYSTEM-CONTROL.lo MULTIMEDIA-SYSTEM-CONTROLDec.lo MULTIMEDIA-SYSTEM-CONTROLEnc.lo -lpthread -shared
libtool: link: warning: `-version-info' is ignored for programs
bfin-linux-uclibc-gcc -DGNU -D_GNU_SOURCE -D_REENTRANT -D_COMPACT -mfdpic -o libchan_h323.so chan_h323.o ooh323cDriver.o ooCmdChannel.o ooLogChan.o ooUtils.o ooGkClient.o context.o ooDateTime.o decode.o dlist.o encode.o errmgmt.o memheap.o ootrace.o oochannels.o ooh245.o ooports.o ooq931.o ooCapability.o ooSocket.o perutil.o eventHandler.o ooCalls.o ooStackCmds.o ooh323.o ooh323ep.o printHandler.o rtctype.o ooTimer.o H235-SECURITY-MESSAGESDec.o H235-SECURITY-MESSAGESEnc.o H323-MESSAGES.o H323-MESSAGESDec.o H323-MESSAGESEnc.o MULTIMEDIA-SYSTEM-CONTROL.o MULTIMEDIA-SYSTEM-CONTROLDec.o MULTIMEDIA-SYSTEM-CONTROLEnc.o -shared -L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib -ldl -L/home/tculjaga/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c/ooh323c/src -lpthread -Wl,--rpath -Wl,/usr/local/lib
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
I generate the needed libchan_h323.so module ... ok it is not in .lib/ directory but it is still there:
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ ls -la libchan_h323.so
-rwxr-xr-x 1 tculjaga tculjaga 1769171 2008-11-27 23:06 libchan_h323.so
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
Happy with the file, I copy that to the IP04, restart asterisk and it thrown an error:
asterisk: can't resolve symbol '_rpl_malloc'
What did i wrong?
Can someone help?
ooh323c_config&build_info.rar
QuoteReplyEditDelete
2008-11-27 21:00:17 Re: ooh323c channel driver for asterisk on IP04
Mike Frysinger (UNITED STATES)
Message: 65928
if you want shared libraries, then force the shared configure option. if it still doesnt detect shared support, then you probably need to rebuild the autotool code.
configure tried to replace malloc() with rpl_malloc(). force the configure tests. see vendors/config/bfin/config.site in current trunk.
QuoteReplyEditDelete
2008-11-28 03:16:05 Re: ooh323c channel driver for asterisk on IP04
Tihomir Culjaga (CROATIA)
Message: 65942
Hi Mike,
Thanks for your answer... however i still cannot guess what my configure options should be.
I've checked vendors/config/bfin/* and all i can find is config.arch ... i guess thats it... but still
./configure --host=bfin-linux-uclibc --disable-largefile --without-pwlib --without-curl CFLAGS="-g -mfdpic -mfast-fp -ffast-math -D__FIXED_PT__ -D__BLACKFIN__ -I/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/include: -Isrc/ -I/home/tculjaga/BAPs/baps/asterisk-1.4.4/include -fno-jump-tables" LDFLAGS="-mfdpic -L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib -lpthread -ldl"
pls, can you suggest the configure options?
QuoteReplyEditDelete
2008-11-28 04:14:47 Re: ooh323c channel driver for asterisk on IP04
Mike Frysinger (UNITED STATES)
Message: 65946
as i said, look at current svn trunk, not the 2007R1 release
QuoteReplyEditDelete
2008-11-28 06:25:09 Re: ooh323c channel driver for asterisk on IP04
Mark T (UNITED STATES)
Message: 65955
Tihomir,
I will be adding h323 support to Astfin2 trunk sometimes soon. Please contact me directly if you wish to help
Thanks,
Mark
QuoteReplyEditDelete
2008-12-03 08:12:39 Re: ooh323c channel driver for asterisk on IP04
Tihomir Culjaga (CROATIA)
Message: 66237
Hi Mike,
thanks fro your response, i tried with config.site you suggested but it is not working
CONFIG_SITE=/path/to/config.site
./configure ...
Also, i've changed the configure script to enable shared libraries and now the .so module is build
line 7062 in attached configure script: linux-gnu* | linux-uclibc*)
./configure --host=bfin-linux-uclibc --enable-shared --disable-largefile --without-pwlib --without-curl \
CFLAGS="-g -mfdpic -mfast-fp -ffast-math -D__FIXED_PT__ -D__BLACKFIN__ \
-I/home/tculjaga/BAPs/baps/
uClinux-dist/staging/usr/include -Isrc/ \
-I/home/tculjaga/BAPs/baps/asterisk-1.4.4/include -fno-jump-tables" \
LDFLAGS="-mfdpic -L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib \
-lpthread -ldl -shared"
OPTIMIZE="-Os" ASTCFLAGS="-g -mfdpic -mfast-fp -ffast-math -D__FIXED_PT__ -D__BLACKFIN__ \
-I/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/include -fno-jump-tables" ASTLDFLAGS="-mfdpic \
-L/home/tculjaga/BAPs/baps/uClinux-dist/staging/usr/lib -lpthread -ldl" make -C \
/home/tculjaga/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c NOISY_BUILD=1
finnaly i got the module compiled:
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ ls -la .libs/
total 3816
drwxr-xr-x 2 tculjaga tculjaga 4096 2008-12-03 14:35 .
drwxr-xr-x 7 tculjaga tculjaga 4096 2008-12-03 14:35 ..
-rw-r--r-- 1 tculjaga tculjaga 2115668 2008-12-03 14:35 libchan_h323.a
lrwxrwxrwx 1 tculjaga tculjaga 18 2008-12-03 14:35 libchan_h323.la -> ../libchan_h323.la
-rw-r--r-- 1 tculjaga tculjaga 890 2008-12-03 14:35 libchan_h323.lai
lrwxrwxrwx 1 tculjaga tculjaga 21 2008-12-03 14:35 libchan_h323.so -> libchan_h323.so.1.0.1
lrwxrwxrwx 1 tculjaga tculjaga 21 2008-12-03 14:35 libchan_h323.so.1 -> libchan_h323.so.1.0.1
-rwxr-xr-x 1 tculjaga tculjaga 1768680 2008-12-03 14:35 libchan_h323.so.1.0.1
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
but still, the same issue ... when i run asterisk:
asterisk: can't resolve symbol '_rpl_malloc'
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$ strings .libs/libchan_h323.so.1.0.1 | grep malloc
_rpl_malloc
_g_malloc_func
tculjaga@subZero:~/BAPs/baps/asterisk-addons-1.4.4/asterisk-ooh323c$
It is still the configre not going well ...
any hint ?
configure
QuoteReplyEditDelete
2008-12-03 19:23:51 Re: ooh323c channel driver for asterisk on IP04
Mike Frysinger (UNITED STATES)
Message: 66266
you have to find the malloc related tests in the configure script and make sure they're being set to the correct value. often times cross-compile tests in configure assume the target malloc is broken and so force a rename to gnulib's rpl_malloc.