标题:QT4.8.6、tslib库移植到arm上配置出错!求大神指点
作者:野比梦
日期:2014-11-13 18:50
内容:
操作系统:Ubuntu14.04 LTS ;
Qt版本:Qt4.8.6 for embedded
交叉编译器:arm-linux-gcc-v6-vfp-20101103.tgz (即4.5.1版)
tslib版本:tslib1.4
如题所述,我正确安装了交叉编译器,arm-linux-gcc -v 有正确显示版本信息。并且添加了环境变量,echo $PATH 显示结果如下:
/opt/FriendlyARM/toolschain/4.5.1/bin:/usr/local/Trolltech/Qt-4.8.6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/game
之后安装tslib:
需要安装的包:
# apt-get install autoconf
# apt-get install automake
# apt-get install libtool
解压:
# tar -zxvf tslib-1.4.tar.gz
# cd tslib
# ./autogen.sh
# echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
# ./configure --host=arm-none-linux-gnueabi--cache-file=arm-none-linux-gnueabi.cache --enable-inputapi=no--prefix=/usr/local/tslib但是配置报错,结果如下:
configure: WARNING: unrecognized options: --enable-inputapi
configure: loading cache arm-none-linux-gnueabi.cache
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-linux-gnueabi-strip... (cached) strip
checking for a thread-safe mkdir -p... (cached) /bin/mkdir -p
checking for gawk... (cached) gawk
checking whether make sets $(MAKE)... (cached) yes
checking whether make supports nested variables... (cached) yes
checking for arm-none-linux-gnueabi-g++... arm-none-linux-gnueabi-g++
checking whether the C++ compiler works... no
configure: error: in `/home/wugelin/Documents/tslib':
configure: error: C++ compiler cannot create executables
See `config.log' for more details貌似是C++编译器的问题,不知道是PC的gcc问题还是指交叉编译器的问题。但是gcc编译器在编译别的程序都没问题。
更加古怪的是我按照网上的说法sudo ./configure --host=arm-none-linux-gnueabi--cache-file=arm-none-linux-gnueabi.cache --enable-inputapi=no--prefix=/usr/local/tslib就可以配置成功生成makefile文件。提示如下:configure: WARNING: unrecognized options: --enable-input ..
#1 [aifei7320 11-14 12:18]
有可能是权限的问题,你把prefix路径改到你的用户文件夹下面是一下。或者你在usr/local下建立tslib需要的文件夹,并且把权限改成 777再试试。另外最好不要用 sudo ./configure这种方式,包括sudo make 和sudo make instal,这样是对root用户的,就是最高权限用户,而不是你。所以在使用编译后的文件时会有错误。这是linux系统权限的问题。