【发布时间】:2014-12-23 21:53:13
【问题描述】:
我的目标是为 pnacl 工具链添加一些新功能。在我这样做之前,我认为我应该先成功构建 pnacl 工具链。
[11/04 更新]
终于成功了。一些包(bison、byacc、flex)我没有安装并导致了这个问题。
[11/03 更新]
我使用 ubuntu-14.04.1-desktop-amd64 作为我的系统
另外,ubuntu-12.04.5-desktop-amd64 正在测试 [11/03 更新]
我一直跟着the document的步骤。一切都很好,直到我运行 toolchain_build_pnacl 脚本
所以我在这里添加新的错误信息:
如果我使用 gcc 运行脚本进行编译
toolchain_build/toolchain_build_pnacl.py --gcc --verbose --sync --clobber --安装工具链/linux_x86/pnacl_newlib
那么下面的错误信息就是
gcc -DHAVE_CONFIG_H -I。 -I../../../src/binutils/gold -I../../../src/binutils/gold -I../../../src/binutils/gold/../include -I../../../src/ binutils/gold/../elfcpp -DLOCALEDIR="\"/share/locale\"" -DBINDIR="\"/bin\"" -DTOOLBINDIR="\"/arm-pc-nacl/bin\"" -DTOOLLIBDIR="\"/arm-pc-nacl/lib\"" -W -Wall - Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=yyscript.o -Wno-extended-offsetof -Wno-absolute-value -Wno-unused-function -Wno-unused-const-变量 -Wno-unneeded-internal-declaration -Wno-unused-private-field -Wno-format-security -MT yyscript.o -MD -MP -MF .deps/yyscript.Tpo -c -o yyscript.o yyscript.c yyscript.c:1:1:错误:返回类型默认为'int' [-Werror=return-type] yyscript.c:1:1:错误:函数
声明不是原型 [-Werror=strict-prototypes] cc1: error: 无法识别的命令行选项“-Wno-unused-private-field”[-Werror] cc1:错误:无法识别的命令行选项 “-Wno-unneeded-internal-declaration”[-Werror] cc1:错误: 无法识别的命令行选项“-Wno-unused-const-variable” [-Werror] cc1:错误:无法识别的命令行选项 “-Wno-absolute-value”[-Werror] cc1:错误:无法识别的命令行 选项“-Wno-extended-offsetof”[-Werror] cc1:所有警告都是 视为错误 make[4]: *** [yyscript.o] 错误 1
如果我用默认的 clang 运行它来编译
toolchain_build/toolchain_build_pnacl.py --verbose --clobber --安装工具链/linux_x86/pnacl_newlib
然后生成以下错误消息
/home/albaforia/SVN/nativeclient/third_party/llvm-build/Release+Asserts/bin/clang -DHAVE_CONFIG_H -I。 -I../../../src/binutils/gold -I../../../src/binutils/gold -I../../../src/binutils/gold/. ./include -I../../../src/binutils/gold/../elfcpp -DLOCALEDIR="\"/share/locale\"" -DBINDIR="\"/bin\"" -DTOOLBINDIR ="\"/arm-pc-nacl/bin\"" -DTOOLLIBDIR="\"/arm-pc-nacl/lib\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=yyscript.o -Wno-extended-offsetof -Wno-absolute-value -Wno-unused-function -Wno-unused-const-variable -Wno-unneeded-internal-declaration -Wno-unused -private-field -Wno-format-security -MT yyscript.o -MD -MP -MF .deps/yyscript.Tpo -c -o yyscript.o yyscript.c yyscript.c:1:1:错误:缺少类型说明符, 默认为 'int' [-Werror,-Wimplicit-int] main() { 返回 0; } ^~~~ 产生 1 个错误。 make[4]: *** [yyscript.o] 错误 1
【问题讨论】:
标签: build google-nativeclient toolchain