编译错误:
zyx@zyx:/opt/EmbedSky/Qte$
sudo ./arm-qtopia-2.2.0-konqueror_build
[sudo] password for zyx:
the qpe program is already !
the konqueror directory is already !
Build konqueror , please wait …
configure: WARNING: If you wanted to set the –build type, don’t use –host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type… i686-pc-linux-gnu
checking host system type… arm-unknown-linux-gnu
checking target system type… arm-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking for -p flag to install… yes
checking whether build environment is sane… yes
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
checking for arm-linux-strip… arm-linux-strip
checking for style of include used by make… GNU
checking for arm-linux-gcc… arm-linux-gcc
checking for C compiler default output… configure: error: C compiler cannot create executables
See `config.log’ for more details.
make: *** No targets specified and no makefile found. Stop.
zyx@zyx:/opt/EmbedSky/Qte$
思路分析:
首先在网上查到一些解决办法:
zyx@zyx:~$
sudo apt-get install build-essential
zyx@zyx:~$
sudo apt-get install libc6-dev
但重新编译以后错误仍然存在,看来不行。
我看到了倒数第二句:”See `config.log’ for more details.”
使用locate命令确定config.log的位置,如下。
zyx@zyx:/$
locate config.log
/opt/EmbedSky/Qte/arm-qtopia-2.2.0/konqueror/config.log
/opt/EmbedSky/Qte/arm-qtopia-2.2.0/tslib-1.4.1/config.log
/opt/EmbedSky/Qte/arm-qtopia-2.2.0 z/konqueror/config.log
/opt/EmbedSky/Qte/arm-qtopia-2.2.0 z/tslib-1.4.1/config.log
/opt/EmbedSky/Qte/ncurses-5.6/config.log
/opt/EmbedSky/Qte/x86-qtopia-2.2.0/konqueror/config.log
/opt/EmbedSky/apps/boa-0.94.13/src/config.log
/opt/EmbedSky/apps/madplay/libid3tag-0.15.1b/config.log
/opt/EmbedSky/apps/madplay/libmad-0.15.1b/config.log
/opt/EmbedSky/apps/madplay/madplay-0.15.2b/config.log
/opt/EmbedSky/apps/sqlite-3.5.9/config.log
/opt/EmbedSky/apps/wget-1.10.2/config.log
/scim-googlepinyin/config.log
/var/log/fontconfig.log
zyx@zyx:/$
第一条便是config.log的目录。
zyx@zyx:/$
cd /opt/EmbedSky/Qte/arm-qtopia-2.2.0/konqueror/
zyx@zyx:/opt/EmbedSky/Qte/arm-qtopia-2.2.0/konqueror$
sudo gedit config.log
[sudo] password for zyx:
打开config.log后第71行~第73行:
configure:2516: checking for C compiler version
configure:2519: arm-linux-gcc –version </dev/null >&5
./configure: line 2520: arm-linux-gcc: command not found
可以发现,编译脚本并没有找到arm-linux-gcc的编译器,但是交叉编译器已经配置过了并已经生效,此时我想起了有时候编译器只有
在根用户下才可以被识别,所以切换到根用户下,再运行一次编译脚本就可以了。
解决办法:
zyx@zyx:/opt/EmbedSky/Qte$
su
Password:
root@zyx:/opt/EmbedSky/Qte
# ./arm-qtopia-2.2.0-konqueror_build
Done!!! 一切OK!!!