configure: error: C compiler cannot create executables編譯錯誤的解決辦法的思路分析

來源:互聯網
上載者:User

 

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.