I’ve been trying to cross compile asterisk to arm platform, more exactly to xscale processor. So i have a problem, with termcap and i don’t know how to solve. A first i tried to configure with this command:
But i got a problem to found termcap support as you can see:
checking for tgetent in -ltinfo... no
checking for tone_zone_find in -ltonezone... no
checking for usb_init in -lusb... no
checking for vorbis_info_init in -lvorbis... no
checking for vpb_open in -lvpb... no
checking for compress in -lz... no
checking for ZT_DIAL_OP_CANCEL in zaptel/zaptel.h... no
configure: error: *** termcap support not found
So i downloaded the libtermcap and cross compile it e execute the configure with option --with-termcap=my_cross_compile_termcappath
I don’t have the error during the config phase any more, what should mean that lib termcap was found, right ?
well, but executing the command make to compile, i got the follow result:
cd editline && test -f config.h || CFLAGS="-pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections -O6" LDFLAGS="" ./configure --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi --with-ncurses= --with-curses= --with-termcap=/home/anaum/Projetos/AsteriskEmbbeded/termcap-1.3.1/build_cross --with-tinfo=
loading cache ./config.cache
checking for gcc... arm-none-linux-gnueabi-gcc
checking whether the C compiler (arm-none-linux-gnueabi-gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections -O6 ) works... yes
checking whether the C compiler (arm-none-linux-gnueabi-gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections -O6 ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
checking for mawk... /usr/bin/awk
checking host system type... arm-none-linux-gnueabi
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... arm-none-linux-gnueabi-ranlib
checking for ar... /home/anaum/CodeSourcery/Sourcery_G++/bin//arm-none-linux-gnueabi-ar
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make[1]: *** [editline/libedit.a] Error 1
make[1]: Leaving directory `/home/anaum/Projetos/AsteriskEmbbeded/asterisk-1.4.26.2/main'
make: *** [main] Error 2
I can note that the termcap path is rigth in the line:
Cross compilation is hard task.
I did it for Cirrus ARM EP 9302 - I used 1.09, also I had success with 1.4
I put library (dont remember now whether I used termcap, or ncurses - I think ncurses) in all places where arm compiler looked.
It was hard task really.
I’m using CodeSourcery, you think that could be a problem ?
Well , i’d like to run it on xscale , but no problem about use another processor. I want to cross compile for arm platform at least.
Let me see if i undestood, Can i use termcap or ncurses ?
I guess it will be more dificult that i imagine !!!
I checked my builds - I used ncurses-5.2
Cirrus Arm has one thing called linux-crater.
It contains everything to build image for any of their processors.
I used linux-crater_20080104_d
You can start with arm.cirrus.com/
There is forum, where lot of things were described. As I remember I had serious problems with cross compiling ncurses - may be it is good to start from: ailis.de/~k/archives/19-ARM- … howto.html
I cross compiled successfully the lib ncurses and termcap for arm platform , but the thing that i couldn’t understand is, during the configure step , both library ncurses and termcap are verified OK as you can see
but running make the same error, neither ncurses and termcap were found!
There are something to change in make file ?? any suggestion ?
cd editline && test -f config.h || CFLAGS="-pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections" LDFLAGS="" ./configure --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi --with-ncurses=/home/anaum/Projetos/AsteriskEmbbeded/ncurses-5.7/build_cross/ --with-curses= --with-termcap=/home/anaum/Projetos/AsteriskEmbbeded/termcap-1.3.1/build_cross --with-tinfo=
loading cache ./config.cache
checking for gcc... arm-none-linux-gnueabi-gcc
checking whether the C compiler (arm-none-linux-gnueabi-gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections ) works... yes
checking whether the C compiler (arm-none-linux-gnueabi-gcc -pthread -I../..//include -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g3 -ffunction-sections ) is a cross-compiler... yes
checking whether we are using GNU C... yes
checking whether arm-none-linux-gnueabi-gcc accepts -g... yes
checking how to run the C preprocessor... arm-none-linux-gnueabi-gcc -E
checking for mawk... /usr/bin/awk
checking host system type... arm-none-linux-gnueabi
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... arm-none-linux-gnueabi-ranlib
checking for ar... /home/anaum/CodeSourcery/Sourcery_G++/bin//arm-none-linux-gnueabi-ar
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
configure: error: termcap support not found
make[1]: *** [editline/libedit.a] Error 1
make[1]: Leaving directory `/home/anaum/Projetos/AsteriskEmbbeded/asterisk-1.4.26.2/main'
make: *** [main] Error 2
Normally you have couple of things with libraries:
./configure
make
make install
I think you did not done last step, or at least did not done it correctly.
Then - may be during configure (of asterisk) it finds something, but make needs other parts.
I have no deep knowledge with compiling and merging of libraries. I did my project more on intuition then of knowledge and it was small project with small money and I just did it…
You can go deep in make file and see when and why it gives that it cant find libraries.
There is also something like library cache - may be you have library but it is not in cache?
Are you perhaps targeting the NSLU2 or FSG-3 platforms? Oddly enough, I’ve just been playing with this myself today, on my FSG. After mucking about with termcap-related madness for a while, I deleted everything and just did a ipkg install asterisk16 and it worked first time. A couple of config tweaks and the phones were working.
Actually i want to port asterisk to xscale processor, because is the only development kit that i have to test it !!
So , I solved the problem with termcap editing makefile, actually the Makefile.in and configure file.
I’ve been doing something wrong , when the asterisk execute the configure for editlib , that edit file auto generate the make file that will be used to compile, so i was editing the makefile and correct way is edit the configure file or Makefile.in .
Now i’m having a problem with ncurses library, i just cross compile it … let’s see what happen … LOL
Well it’s really a hard work cross compile asterisk …