gpt4 book ai didi

compiler-construction - 为 ARM 构建交叉编译器工具链时出现错误(错误 2)

转载 作者:行者123 更新时间:2023-12-04 17:01:03 25 4
gpt4 key购买 nike

我要使用实用程序构建交叉编译器工具链 .
所以我下载了所有 tar文件。然后我更改为父构建根目录。

然后我配置为 ARM & ARM 920T。我取消选中 build options ---> 中的所有选项和 tool chain---> (使用 make menuconfig )

Target Architecture (arm)  --->                                                                       
Target Architecture Variant (arm920t) --->
Target ABI (EABI) --->

建筑选项
  Commands  --->
($(TOPDIR)/dl) Download dir
($(BASE_DIR)/host) Host dir
Mirrors and Download locations --->
(2) Number of jobs to run simultaneously
[ ] Enable compiler cache
[ ] Show packages that are deprecated or obsolete
[ ] build packages with debugging symbols
strip (strip) --->
gcc optimization level (optimize for size) --->
[*] prefer static libraries
[ ] documentation on the target

[ ] development files in target filesystem

工具链
  Toolchain type (Buildroot toolchain)  --->
*** Kernel Header Options ***
Kernel Headers (Linux 2.6.37.x kernel headers)
*** uClibc Options ***
uClibc C library Version (uClibc 0.9.30.x) --->

(toolchain/uClibc/uClibc-0.9.30.config) uClibc
configuration file to use?
[ ] Thread library debugging
[*] Compile and install uClibc tests
*** Binutils Options ***
Binutils Version (binutils 2.21) --->
() Additional binutils options
*** GCC Options ***
GCC compiler Version (gcc 4.3.x) --->

我跑 make .

它给出了以下错误。
make[2]: Leaving directory `/home/gangadhar/Embedded/Embedded/buildroot- 2011.02/output/toolchain/gcc-4.3.5-initial/fixincludes'
make[2]: Entering directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/build-i686-pc-linux-gnu/fixincludes'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/build-i686-pc-linux-gnu/fixincludes'
make[2]: Entering directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/libcpp'
test -f config.h || (rm -f stamp-h1 && /usr/bin/make stamp-h1)
make[2]: Leaving directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/libcpp'
make[2]: Entering directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/gcc'
if [ xinfo = xinfo ]; then \
makeinfo --split-size=5000000 --no-split -I . -I /home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc \
-I /home/gangadhar/Embedded/Embedded/buildroot- 2011.02/output/toolchain/gcc-4.3.5/gcc/doc/include -o doc/cpp.info /home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc- 4.3.5/gcc/doc/cpp.texi; \
fi
if [ xinfo = xinfo ]; then \
makeinfo --split-size=5000000 --no-split -I . -I /home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc \
-I /home/gangadhar/Embedded/Embedded/buildroot- 2011.02/output/toolchain/gcc-4.3.5/gcc/doc/include -o doc/gcc.info /home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc- 4.3.5/gcc/doc/gcc.texi; \
fi
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/cppopts.texi:757: @itemx must follow @item
make[2]: *** [doc/cpp.info] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/gcc.texi:89: warning: @tex should only appear at a line beginning
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/gcc.texi:89: warning: @end should only appear at a line beginning
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/gcc.texi:91: warning: @tex should only appear at a line beginning
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/gcc.texi:91: warning: @end should only appear at a line beginning
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:961: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/cppopts.texi:757: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:8574: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4234: @subsection seen before @end table
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4263: @item outside of table or list
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4264: @itemx outside of table or list
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4277: unmatched `@end table'
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:855: warning: node next `Overall Options' in menu `C Dialect Options' and in sectioning `Invoking G++' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:855: warning: node up `Overall Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:1282: warning: node prev `C Dialect Options' in menu `Overall Options' and in sectioning `Invoking G++' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:1282: warning: node up `C Dialect Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:1617: warning: node up `C++ Dialect Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/ho me/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:2198: warning: node up `Objective-C and Objective-C++ Dialect Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:2475: warning: node up `Language Independent Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:2536: warning: node up `Warning Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:4058: warning: node up `Debugging Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:5102: warning: node up `Optimize Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:7334: warning: node up `Preprocessor Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:7371: warning: node up `Assembler Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:7394: warning: node up `Link Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:7611: warning: node up `Directory Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:7749: warning: node up `Spec Files' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:8281: warning: node up `Target Options' in menu `Option Summary' and in sectioning `Invoking GCC' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1122: warning: node next `Zero Length' in menu `Variable Length' and in sectioning `Empty Structures' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1220: warning: node next `Empty Structures' in menu `Variadic Macros' and in sectioning `Variable Length' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1220: warning: node prev `Empty Structures' in menu `Variable Length' and in sectioning `Zero Length' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1236: warning: node next `Variable Length' in menu `Empty Structures' and in sectioning `Variadic Macros' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1236: warning: node prev `Variable Length' in menu `Zero Length' and in sectioning `Empty Structures' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1319: warning: node prev `Variadic Macros' in menu `Empty Structures' and in sectioning `Variable Length' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1537: warning: node next `Designated Inits' in menu `Cast to Union' and in sectioning `Case Ranges' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1681: warning: node next `Case Ranges' in menu `Mixed Declarations' and in sectioning `Cast to Union' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1681: warning: node prev `Case Ranges' in menu `Cast to Union' and in sectioning `Designated Inits' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1718: warning: node next `Cast to Union' in menu `Case Ranges' and in sectioning `Mixed Declarations' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1718: warning: node prev `Cast to Union' in menu `Designated Inits' and in sectioning `Case Ranges' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:1759: warning: node prev `Mixed Declarations' in menu `Case Ranges' and in sectioning `Cast to Union' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:3360: warning: node next `Character Escapes' in menu `Variable Attributes' and in sectioning `Alignment' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:3366: warning: node next `Alignment' in menu `Inline' and in sectioning `Variable Attributes' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:3366: warning: node prev `Alignment' in menu `Type Attributes' and in sectioning `Character Escapes' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:3402: warning: node prev `Variable Attributes' in menu `Character Escapes' and in sectioning `Alignment' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:3938: warning: node next `Type Attributes' in menu `Alignment' and in sectioning `Inline' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4316: warning: node prev `Inline' in menu `Alignment' and in sectioning `Type Attributes' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/trouble.texi:7: warning: node next `Trouble' in menu `Service' and in sectioning `Bugs' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/trouble.texi:7: warning: node prev `Trouble' in menu `Bug Reporting' and in sectioning `Gcov' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/trouble.texi:7: warning: node up `Trouble' in menu `Bugs' and in sectioning `Top' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc- 4.3.5/gcc/doc/service.texi:6: warning: node prev `Service' in menu `Trouble' and in sectioning `Bugs' differ
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/service.texi:6: warning: node up `Service' in menu `Bugs' and in sectioning `Top' differ
make[2]: *** [doc/gcc.info] Error 1
make[2]: Leaving directory `/home/gangadhar/Embedded/Embedded/buildroot- 2011.02/output/toolchain/gcc-4.3.5-initial/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial'
make: *** [/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5-initial/.compiled] Error 2

那么我如何克服这些错误并成功构建交叉工具编译器。

最佳答案

您需要从顶部而不是底部读取构建日志 - 您发布的片段没有提供完整的诊断信息。

您所指的错误 2 前面是错误 1,并且两者都可能只是表明 make 由于某些先前指示的错误而终止。它看起来像以下片段:

in sectioning `Top' differ

是导致构建中止的实际错误消息的结尾。

[编辑 10Oct2013 以回应评论和编辑的问题]

导致 make 中止的实际错误在这里:

/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/cppopts.texi:757: @itemx must follow @item



即第一次出现错误之前的消息。正如我所说 - 从顶部阅读,而不是底部。

该文件是一个 TeX 标记文档文件。我对 TeX 一无所知,但我想您可以编辑文件以修复或至少抑制错误。或者获取文件的更新版本,或将其从构建中完全删除。由于 GCC 的文档可在线获取,因此无论如何您都可以不用它。

这是 TeX documentation for @itemx .它标记以 @item 开头的列表中的第二个和后续项目。 .我想这很容易解决。

类似的问题出现在以下方面:
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:961: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/cppopts.texi:757: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/invoke.texi:8574: @itemx must follow @item
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4234: @subsection seen before @end table
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4263: @item outside of table or list
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4264: @itemx outside of table or list`
/home/gangadhar/Embedded/Embedded/buildroot-2011.02/output/toolchain/gcc-4.3.5/gcc/doc/extend.texi:4277: unmatched `@end table

您也可以修复警告,但您有这些错误的事实表明这些文件可能已在 GNU GCC 项目之外修改,可能不再有效或准确。

关于compiler-construction - 为 ARM 构建交叉编译器工具链时出现错误(错误 2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19166500/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com