Ubuntu18.04编译Nginx报错objs/Makefile:440: recipe for target 'objs/src/core/ngx_murmurhash.o' failed
程序员文章站
2022-07-06 17:31:00
...
Ubuntu18.04编译Nginx报错objs/Makefile:440: recipe for target ‘objs/src/core/ngx_murmurhash.o’ failed
执行完make以后报错
~/nginx-1.8.1$ sudo make
-----------------------------------------
错误:
cc1: all warnings being treated as errors
objs/Makefile:440: recipe for target 'objs/src/core/ngx_murmurhash.o' failed
make[1]: *** [objs/src/core/ngx_murmurhash.o] Error 1
make[1]: 离开目录“/home/ling/nginx-1.8.1”
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
解决办法
找到对应的Maakefile文件(我的在 /nginx/objs/Makefile),将gcc参数中的-Werror去掉 再重新make即可
编译成功
错误原因
查了-Werrori意思之后 发现原来它要求GCC将所有的警告当成错误进行处理 所有导致错误输出 并不能进行下一步