【问题标题】:Unable to compile GCC, but no specific error given无法编译 GCC,但没有给出具体错误
【发布时间】:2013-01-02 23:26:50
【问题描述】:

我正在尝试使用 gcc 4.7.2 在 Mint Linux 上编译 gcc 4.7.1 并获得以下输出:

[snip]
ar rc .libs/libgmp.a assert.o compat.o errno.o [snip]
rm -fr .libs/libgmp.lax
creating libgmp.la
(cd .libs && rm -f libgmp.la && ln -s ../libgmp.la libgmp.la)
make[5]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[4]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[3]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[2]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make: *** [all] Error 2

我什至不知道从哪里开始寻找,因为我没有收到描述性错误!看起来它编译 GMP 成功,然后失败,无法完成下一步。

【问题讨论】:

  • 错误可能在回滚的更早。
  • 您是否使用-j 标志或其他东西构建?也许错误在您的日志中更远。
  • 尝试像这样运行 make:make > STDOUT 并查看控制台输出
  • @user1844650,如果您使用-j 并且构建错误的“分支”之一,其他当前活动的分支将继续构建,直到它们也完成。这可能意味着您的错误在日志中更远的数百或数千行,然后是来自其他分支的大量成功构建消息。
  • 当您的发行版为您提供 GCC 4.7.2 时,编译 GCC 4.7.1 的意义何在? (它们几乎相同,除了一些错误修复......)

标签: linux gcc compiler-errors


【解决方案1】:

这个问题在上面的 cmets 中得到了回答。总结一下:错误是由于不正确的全局(可能是环境)变量,在回滚的早期;那是因为 OP 使用了 -j 标志,而其他当前活动的分支确实在继续构建。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-21
    • 2011-12-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-06-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多