在/etc/profile里导入
export PATH==$PATH:/home/jack/arm-linux-gcc/x-tools/arm-unknown-linux-gnueabi/bin
配置参数
./configure CC=arm-linux-gcc CXX=arm-linux-g++ --host=arm-unknown-linux-gnueabi --prefix=/home/jack/Ekho_work/ekho CPPFLAGS=-I/home/jack/Ekho_work/ekho/include LDFLAGS=-L/home/jack/Ekho_work/ekho/lib CFLAGS=-I/home/jack/Ekho_work/ekho/include
开发环境
ubuntu-11.04
./configure遇到的问题
1.问题一
checking for m4... no
configure: error: m4 missing solution:
http://ftp.gnu.org/gnu/m4/m4-1.4.10 在终端将环境导入export PATH=$PATH:/home/jack/Ekho_work/ekho/bin
2.问题二
./configure: line : intltool-update: command not found
checking for intltool >= 0.35.... found
configure: error: Your intltool is too old. You need intltool 0.35. or later. solution:
intltool-0.40..tar.bz2
3.问题三
configure: error: Unable to find libltdl version . Makes sure you have libtool 2.4 or later installed. solution:
libtool-2.4..tar.gz
4.问题四
configure: error: Package requirements ( json >= 0.9 ) were not met: No package 'json' found solution:
json-c-0.10-nodoc.tar.gz 在/etc/profile里导入export PKG_CONFIG_PATH=/home/jack/Ekho_work/ekho/lib/pkgconfig:$PKG_CONFIG_PATH
5.问题五
configure: error: Package requirements ( sndfile >= 1.0. ) were not met: No package 'sndfile' found solution:
libsndfile-1.0..tar.gz
make遇到的问题
1.问题一
/home/jack/Ekho_work/ekho/include/json/json.h::: error: json_object_iterator.h: No such file or directory solution:
将/home/jack/Ekho/package_4/json-c-0.10/json_object_iterator.h拷贝到/home/jack/Ekho_work/ekho/include/json下
2.问题二
/home/jack/Ekho_work/ekho/lib/libjson.so: undefined reference to `rpl_malloc'
collect2: ld returned exit status
/home/jack/Ekho_work/ekho/lib/libjson.so: undefined reference to `rpl_malloc'
collect2: ld returned exit status solution:
在/home/jack/Ekho/package_4/json-c-0.10/config.h文件里注释掉
//#define malloc rpl_malloc
//#define realloc rpl_realloc
这两行,重新make -j8 ,make install
以上通过测试