谢谢kasim
下载了最新的glib-2.25.14.tar.gz
解压缩,交叉编译
./configure --host=arm-none-linux-gnueabi --prefix=/usr/share/arm-glib2.0
结果出现错误:
configure:21038: checking for growing stack pointer
configure:21045: error: in `/opt/FriendlyARM/mini2440/glib-2.25.14':
configure:21047: error: cannot run test program while cross compiling
See `config.log' for more details
通过网络的力量搜到:
在交叉编译的时候总是使用configure --host=arm-linux 嘿嘿但是在CONFIGURE中有很多的测试程序是不可以在HOST上
运行的就会出现: error: cannot run test program while cross compiling
类似的错误,可以使用CACHEFILE解决这个问题,还要谢谢ABSURD兄的文章给我的指导。
我是这样解决的第一步:记录下错误的地方如:checking abstract socket namespace... configure: error: cannot run test
program while cross compiling
注意到abstract socket namespace在configure中查找abstract socket可以看到类似这样的结构
echo "$as_me:$LINENO: checking abstract socket namespace" >&5
echo $ECHO_N "checking abstract socket namespace... $ECHO_C" >&6
if test "${ac_cv_have_abstract_sockets+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
其中ac_cv_have_abstract_sockets是我们要查找的变量
在命令行输入echo ac_cv_have_abstract_sockets=yes>arm-linux.cache执行
然后输入./configure --host=arm-linux --cache-file=arm-linux.cache
K这样就搞定了
参考
http://library.gnome.org/devel/glib/stable/glib-cross-compiling.html中的设置echo若干变量后,
./configure --host=arm-none-linux-gnueabi --prefix=/usr/share/arm-glib2.0 --cache-file=arm-linux.cache
终于configure成功了。