編譯錯誤:
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!!!