使用 crosstool-ng 编译 gcc 时出错
Error compiling gcc with crosstool-ng
有人可以帮我解决这个错误吗?我正在尝试使用 ct-ng(版本 1.23.0)构建 arm-unknown-linux-gnueabi。
[ERROR] /home/tomas/crosstool-ng-1.23.0/.build/src/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
[ERROR] make[3]: *** [ubsan.o] Error 1
[ERROR] make[3]: *** Waiting for unfinished jobs....
[ERROR] make[2]: *** [all-gcc] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing pass-1 core C gcc compiler'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@338]
[ERROR] >> called from: do_gcc_core_backend[scripts/build/cc/100-gcc.sh@674]
[ERROR] >> called from: do_gcc_core_pass_1[scripts/build/cc/100-gcc.sh@227]
[ERROR] >> called from: do_cc_core_pass_1[scripts/build/cc.sh@35]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@653]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'docs/B - Known issues.txt'
[ERROR] >>
[ERROR] >> If you feel this is a bug in crosstool-NG, report it at:
[ERROR] >> https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR] >>
[ERROR] >> Make sure your report includes all the information pertinent to this issue.
[ERROR] >> Read the bug reporting guidelines here:
[ERROR] >> http://crosstool-ng.github.io/support/
[ERROR]
[ERROR] (elapsed: 23:56.63)
[23:57] / /home/tomas/crosstool-ng-1.23.0/ct-ng:147: recipe for target 'build' failed
make[1]: *** [build] Error 2
ct-ng:150: recipe for target 'build.3' failed
make: *** [build.3] Error 2
我不确定这是不是 gcc 源代码问题,或者是否有一些配置我可以在 ct-ng 中更改以忽略此错误。
[ERROR] /home/tomas/crosstool-ng-1.23.0/.build/src/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
[ALL ] || xloc.file == '0' || xloc.file[0] == 'xff'
[ALL ] ^~~~
[ALL ] Makefile:1085: recipe for target 'ubsan.o' failed
[ERROR] make[3]: *** [ubsan.o] Error 1
显然这就是错误所在。
从 github 克隆而不是使用最新版本解决了问题。
有人可以帮我解决这个错误吗?我正在尝试使用 ct-ng(版本 1.23.0)构建 arm-unknown-linux-gnueabi。
[ERROR] /home/tomas/crosstool-ng-1.23.0/.build/src/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
[ERROR] make[3]: *** [ubsan.o] Error 1
[ERROR] make[3]: *** Waiting for unfinished jobs....
[ERROR] make[2]: *** [all-gcc] Error 2
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step 'Installing pass-1 core C gcc compiler'
[ERROR] >> called in step '(top-level)'
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@338]
[ERROR] >> called from: do_gcc_core_backend[scripts/build/cc/100-gcc.sh@674]
[ERROR] >> called from: do_gcc_core_pass_1[scripts/build/cc/100-gcc.sh@227]
[ERROR] >> called from: do_cc_core_pass_1[scripts/build/cc.sh@35]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@653]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> 'docs/B - Known issues.txt'
[ERROR] >>
[ERROR] >> If you feel this is a bug in crosstool-NG, report it at:
[ERROR] >> https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR] >>
[ERROR] >> Make sure your report includes all the information pertinent to this issue.
[ERROR] >> Read the bug reporting guidelines here:
[ERROR] >> http://crosstool-ng.github.io/support/
[ERROR]
[ERROR] (elapsed: 23:56.63)
[23:57] / /home/tomas/crosstool-ng-1.23.0/ct-ng:147: recipe for target 'build' failed
make[1]: *** [build] Error 2
ct-ng:150: recipe for target 'build.3' failed
make: *** [build.3] Error 2
我不确定这是不是 gcc 源代码问题,或者是否有一些配置我可以在 ct-ng 中更改以忽略此错误。
[ERROR] /home/tomas/crosstool-ng-1.23.0/.build/src/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
[ALL ] || xloc.file == '0' || xloc.file[0] == 'xff'
[ALL ] ^~~~
[ALL ] Makefile:1085: recipe for target 'ubsan.o' failed
[ERROR] make[3]: *** [ubsan.o] Error 1
显然这就是错误所在。
从 github 克隆而不是使用最新版本解决了问题。