【问题标题】:"C compiler cannot create executables" Error while configuring gcc“C 编译器无法创建可执行文件”配置 gcc 时出错
【发布时间】:2021-06-28 21:54:30
【问题描述】:

我在 manjaro linux 上尝试使用 this tutorial 设置交叉编译器,并且我已经设置了 binutils,但是当我去做 ../gcc-10.2.0/configure (etc.) 时,我得到了这个:

checking host system type... x86_64-pc-linux-gnu
checking target system type... i686-pc-elf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... no
checking for libitm support... no
checking for libsanitizer support... no
checking for libvtv support... no
checking for libhsail-rt support... no
checking for libphobos support... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/morticia/src/build-gcc':
configure: error: C compiler cannot create executables
See `config.log' for more details

config.log

看似错误:Fatal error: no compiled in support for x86_64

【问题讨论】:

  • “致命错误:没有编译支持 x86_64”。也许你的编译器是 32 位的?
  • gcc -dumpmachine 应该显示编译器的目标拱门
  • @Kazz 谢谢我只是在找这样的问题
  • @thatotherguy gcc -dumpmachine 的输出是:x86_64-pc-linux-gnu

标签: linux gcc cross-compiling


【解决方案1】:

问题是,由于我遵循的教程,汇编器试图为 i686 汇编,而编译器试图为 x86_64 编译,我只需要在运行之前从我的路径中删除用于交叉编译器的 binutils。 /配置

【讨论】:

    猜你喜欢
    • 2014-04-12
    • 2013-09-24
    • 2012-05-08
    • 1970-01-01
    • 2021-04-23
    • 2019-02-03
    • 1970-01-01
    • 2012-10-02
    • 2020-01-21
    相关资源
    最近更新 更多