1
votes


I've trying to Cross Compile Asterisk for Armhf platform.
I was using g++-arm-linux-gnueabihf && gcc-arm-linux-gnueabihf packages for cross-compiling Asterisk with 2 following prerequisite :
SQlite3 :

./configure --prefix=/usr/arm-linux-gnueabihf --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc make && make install

Ncurses :

./configure --host=arm-linux-gnueabihf --prefix=/usr/arm-linux-gnueabihf CXX=arm-linux-gnueabihf-g++ make && make install

When I cross compile Asterisk :

./configure --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc --prefix=MY_RESULT_DEST_DIR --disable-xmldoc --build=i686-pc-linux-gnu make menuselect && make && make install

It works great, but thing I dont understand is that why the configure script recognize my ncurses && sqlite3 result directory?

Bug appears when I install ncurses and sqlite3 on particular directories, and then configure asterisk source with 2 params --with-ncurses && --with-sqlite3,

./configure --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc --prefix=MY_RESULT_DEST_DIR --disable-xmldoc --build=i686-pc-linux-gnu --with-ncurses=NCURSES_RESULT --with-sqlite3=SQLITE3_RESULT

It works for configuring but failed for making, and the following error thrown with make

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: *
[main] Error 2

So, what should I do to fix this problem? Any help would be appreciated.
Thanks in advance
Dang Loi

2

2 Answers

1
votes

Yeah, thank you arheops.

I did edit the main/editline/configure file by turning ac_cv_lib_$ac_lib_var into yes to bypass the termcap checking when running make, and it works all the time.

if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && t$
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
fi
0
votes

You should instal pkgconfig or do change Makefile for you manual path

Note, asterisk make file not tested for your architecture.

But it opensource, so you are free test,do changes and commit. Or hire someone who can do that.