您的位置:首页 > 编程语言 > Qt开发

移植qt之交叉编译tslib-1.4

2013-02-26 18:17 507 查看
#export PREFIX=/path_to_your_tslib_1.4_dir

#export CC=/path/to/your/cross-compiler-bin-dir

/*

autogen.sh is an important .sh file,it produce ./configure file according to current env setting

*/

#./autogen.sh

错误现象:./autogen.sh: 9: autoreconf:
not found

解决办法:#sudo apt-get install autoconf

错误现象:Can't exec "automake": 没有该文件或目录 at /usr/bin/autoreconf line 183

解决办法:#sudo apt-get install automake

错误现象:configure.ac:25:
error: possibly
undefined macro:
AC_DISABLE_STATIC

解决办法:#sudo apt-get install libtool

#echo "ac_cv_func_malloc_0_nonnull=yes" >arm-none-linux-gnueabi.cache

/*(it is better to see what parameter that the ./configure program take,use "./configure --help")

*you can add "--enable-debug"([default=no]),and/or "--enable-static"([default=no])

*/

#./configure --host=arm-none-linux-gnueabi --prefix=$PREFIX --cache-file=arm-none-linux-gnueabi.cache

#make

错误:undefined reference to rpl_malloc

解决办法(2种):

* configure的时候加上--with-gnu-ld这个参数

* 或者在config.h里加上#undef rpl_malloc

#make install

或者

在当前目录查找了rpl_malloc,发现configure里有#define malloc rpl_malloc一行。分析configure脚本相关的代码,原来是ac_cv_func_malloc_0_nonnull引起的,OK我们不让它检查了,产生一个cache文件arm-linux.cache,欺骗configure:

[root@linux tslib]# echo "ac_cv_func_malloc_0_nonnull=yes" >$ ARCH -linux.cache

[root@linux tslib]# ./configure --prefix=$(ROOTFS_DIR)/usr --host=$ ARCH -linux --cache-file=$ ARCH -linux.cache

配置成功后,重新编译一下,OK!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: