OpenWrt Forum Archive

Topic: Compiling res_fax_spandsp.so

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi all,
i have setup an asterisk server on an asus rt n16. it is working fine. all i need in addition is a fax-solution in software on that router.
asterisk 1.8.6 is supporting this, i am using this version. but i need res_fax_spandsp.so. spandsp is for free, but i have to compile this library/module.
now i need help how to get this lib/module compiled. i tried it on the router itself with buildroot, but after lots of hours i am begging for help... gcc complains about missing libtiff-devel-package (before this message i needed hours to get gcc to work), which i don't have.

i would appreciate if someone could support me.
libtiff is installed, but not libtiff-devel.

maybe someone has simply compiled the res_fax_spandsp.so already...?

regards,
astrakid

noone able to help? i tried already crosscompiling it, but i don't get it to work... any help appreciated!!!

regards,
astrakid

astrakid wrote:

i tried it on the router itself with buildroot, but after lots of hours i am begging for help... gcc complains about missing libtiff-devel-package (before this message i needed hours to get gcc to work), which i don't have.

If I may ask, what package did you install on your Asus router so that i can compile buildroot?

- http://tomatousb.org/download kernel 2.6 (2.6.22.19) for mipsr2 (openwrt-compatible)
- asterisk 1.8.6.0
- libtiff 3.9.5.1
- spandsp 0.0.4pre12 (could install spandsp 0.0.6pre18 myself, that works)

thanks a lot in advance!

if you don't mind i would like to ask you a lot of questions, because it would be great if i'd understodd how to compile it on my own...

my issues regarding understanding cross compiling:
1. i need the buildroot-toolchain
2. i need the sources of my target-operating-system
3. i need libtiff-sources
4. i need spandsp sources
5. i need asterisk sources

everything fine so far.
then i have to compile my buildroot-toolchain - that worked.
but how to go on? at least i tried to compile libiff and spandsp and afterwards compile asterisk for my target=mipsel-linux, but asterisk is not startable on my asus in this case...

kind regards and thanks a lot in advance!!!
astrakid

astrakid wrote:

- http://tomatousb.org/download kernel 2.6 (2.6.22.19) for mipsr2 (openwrt-compatible)
- asterisk 1.8.6.0
- libtiff 3.9.5.1
- spandsp 0.0.4pre12 (could install spandsp 0.0.6pre18 myself, that works)

With the above packages, how could you compile spandsp natively on your router?

if you don't mind i would like to ask you a lot of questions, because it would be great if i'd understodd how to compile it on my own...

If you wanna cross compile your own OpenWRT firmware, follow steps outlined on this Howto.

(Last edited by mazilo on 12 Oct 2011, 18:24)

well, spandsp 0.0.4pre12 is available as complete ipk-package. 0.0.6pre18 could be compiled (not cross compiled) via buildroot, as well as libtiff (needed to be cmpiled first). what is not working is compiling asterisk on my router because of problems i think they are gcc related error can be seen here in the code-part of this post: http://www.ip-phone-forum.de/showthread … mp;page=1). that was the reason why i tried to crosscompile asterisk, but i didn't succeed...

kind regards,
astrakid

astrakid wrote:

well, spandsp 0.0.4pre12 is available as complete ipk-package. 0.0.6pre18 could be compiled (not cross compiled) via buildroot, as well as libtiff (needed to be cmpiled first). what is not working is compiling asterisk on my router because of problems i think they are gcc related error can be seen here in the code-part of this post: http://www.ip-phone-forum.de/showthread … mp;page=1). that was the reason why i tried to crosscompile asterisk, but i didn't succeed...

R U saying you can natively compile spandsp + tiff packages on your router using buildroot source package without a gcc? Which buildroot source package? AFAIK, buildroot source package doesn't come with a gcc compiler.

gcc is available on my router. here is an extract from log (make asterisk):

[...]
checking for gcc... gcc
checking whether the C compiler (gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -O6    ) works... yes
checking whether the C compiler (gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -O6    ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for mawk... gawk
checking host system type... mipsel-unknown-linux-gnu
checking for a BSD compatible install... /opt/bin/install -c
[...]
creating ./config.status
creating Makefile
creating makelist
creating config.h
In file included from chared.h:136,
                 from el.h:101,
                 from common.c:51,
                 from editline.c:4:
fcns.h:56:1: warning: "em_upper_case" redefined
fcns.h:50:1: warning: this is the location of the previous definition
In file included from editline.c:4:
common.c:73: error: expected identifier or '(' before numeric constant
common.c:302: error: expected identifier or '(' before numeric constant
common.c:353: error: expected identifier or '(' before numeric constant
common.c: In function 'ed_quoted_insert':
common.c:387: error: called object '8' is not a function
common.c: At top level:
common.c:397: error: expected identifier or '(' before numeric constant
common.c:441: error: expected identifier or '(' before numeric constant
[...]

you see, gcc is there, but compiling asterisk is failing...

regards,
astrakid

Would someone be so kind to build a res_fax_spandsp.so for openwrt? would be very great!

thanks in advance,
astrakid

astrakid wrote:

gcc is available on my router. here is an extract from log (make asterisk):

This is interesting. I sure would like to know how to make my Seagate DockStar installed with a GCC.

buildroot is available as ipkg for openwrt. i guess it contained gcc.

regards,
astrakid

astrakid wrote:

buildroot is available as ipkg for openwrt. i guess it contained gcc.

I noticed from the main page of make menuconfig that offers three options, i.e. Build the OpenWrt Image Builder, Build the OpenWrt SDK, and Build the OpenWrt based Toolchain, as shown below. I believe you meant to select/include the Build the OpenWrt Image Builder into the firmware if I wanna include GCC compilers + libraries to use on my Seagate DockStar, right?

 OpenWrt Attitude Adjustment (r28464) Configuration
 ????????????????????????????????????????????????????????????????????????????????????????????????????
  ????????????????????????????????????? OpenWrt Configuration ?????????????????????????????????????
  ?  Arrow keys navigate the menu.  <Enter> selects submenus --->.  Highlighted letters are       ?  
  ?  hotkeys.  Pressing <Y> includes, <N> excludes, <M> builds as package.  Press <Esc><Esc> to   ?  
  ?  exit, <?> for Help, </> for Search.  Legend: [*] built-in  [ ] excluded  <M> package  < >    ?  
  ?  package capable                                                                              ?  
  ? ??^(-)??????????????????????????????????????????????????????????????????????????????????????? ?  
  ? ?     Target Images  --->                                                                   ? ?  
  ? ?     Global build settings  --->                                                           ? ?  
  ? ? [*] Advanced configuration options (for developers)  --->                                 ? ?  
  ? ? [*] Build the OpenWrt Image Builder                                                       ? ?  
  ? ? [ ] Build the OpenWrt SDK                                                                 ? ?  
  ? ? [ ] Build the OpenWrt based Toolchain                                                     ? ?  
  ? ? [ ] Image configuration  --->                                                             ? ?  
  ? ?     Package features  --->                                                                ? ?  
  ? ?     Base system  --->                                                                     ? ?  
  ? ?     IPv6  --->                                                                            ? ?  
  ? ?     LuCI  --->                                                                            ? ?  
  ? ??v(+)??????????????????????????????????????????????????????????????????????????????????????? ?  
  ?????????????????????????????????????????????????????????????????????????????????????????????????  
  ?                               <Select>    < Exit >    < Help >                                ?  
  ?????????????????????????????????????????????????????????????????????????????????????????????????

no. i meant that i just execute "ipkg install buildroot" on my asus and as result of this gcc is available...

astrakid wrote:

no. i meant that i just execute "ipkg install buildroot" on my asus and as result of this gcc is available...

I took a look at the OpenWRT packages repository for backfire 10.03.1-rc5 on BRCM47XX platform and did not find any buildroot package.

hi,
just wanted to tell that i got great hints from someone which enabled me to compile asterisk 1.8.7.1 with use of spandsp successfully!!! ;-)
fax-reception is not working, but that is another issue now.

thanks a lot anyway,
regards,
astrakid

The discussion might have continued from here.