<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
2013-06-14 09:28
771 查看
这两天在ubuntu12.04 32位上编译android4.0.3包,发现的如标题的错误。
错误打印如下:
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
上网查了查,解决方法如下:
修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:
将以下语句
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
修改为
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
ATTENTION:
There is a SPACE between the -U_FORTIFY_SOURCE and -D_FORTIFY_SOURCE
错误打印如下:
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] Error 1
上网查了查,解决方法如下:
修改源码目录下/build/core/combo/HOST_linux-x86.mk文件:
将以下语句
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
修改为
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
ATTENTION:
There is a SPACE between the -U_FORTIFY_SOURCE and -D_FORTIFY_SOURCE
相关文章推荐
- <command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
- UBUNTU12.04编译Android源码<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror] <命令行>::0:0: 错误: “_FORTIFY_SOUR
- Ubuntu 12.04 error: "_FORTIFY_SOURCE" redefined [-Werror]
- Ubuntu 64bit 12.04 error: "_FORTIFY_SOURCE" redefined [-Werror]
- Android源码编译时,遇到的问题:error: "_FORTIFY_SOURCE" redefined [-Werror]
- Ubuntu 64bit 12.04 error: "_FORTIFY_SOURCE" redefined [-Werror]
- 编译内核报错:<command-line>:0: warning: missing terminating " character
- error: "_FORTIFY_SOURCE" redefined [-Werror]
- Parse Fatal Error at line 41 column 24: 元素类型 "url-pattern" 必须由匹配的结束标记 "</url-pattern>" 终止
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- error: "_FORTIFY_SOURCE" redefined [-Werror]
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- <%@ Page EnableEventValidation="true" %> asp:DataList OnItemCommand=
- Android4.0编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- "Parser Error Message: Access is denied: Source Error: Line 198: "
- <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[2
- 当使用JQuery的"$",抛异常Uncaught TypeError: Object #<Object> has no method 'ajax'
- 运行程序,首次运行出现“File{"<stdin>".line1,error}
- <input type="file" />accept属性列表