91名师指路-头部
91名师指路

src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthroug

由于某些原因,现在不支持支付宝支付,如需要购买源码请加博主微信进行购买,微信号:13248254750

场景:在阿里云centos 8 下安装nginx-1.9.0 报错如下:

src/core/ngx_murmurhash.c: In function ‘ngx_murmur_hash2’:
src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[2] << 16;
~~^~~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:38:5: note: here
case 2:
^~~~
src/core/ngx_murmurhash.c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
h ^= data[1] << 8;
~~^~~~~~~~~~~~~~~
src/core/ngx_murmurhash.c:40:5: note: here
case 1:
^~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:445: objs/src/core/ngx_murmurhash.o] Error 1
make[1]: Leaving directory '/usr/local/java/nginx-1.9.9'
make: *** [Makefile:8: build] Error 2
[root@iZuf6bhe673f5qtkz6pwjuZ nginx-1.9.9]#


解决办法:

找到目录:/usr/local/java/nginx-1.9.0/objs/Makefile 文件,去掉里面的 -Werror 即可。

更改前:

CFLAGS =  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused -Werror -g


更改后:

CFLAGS =  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused -g



2020-12-01 12:21:19     阅读(2295)

名师出品,必属精品    https://www.91mszl.com

联系博主    
用户登录遮罩层
x

账号登录

91名师指路-底部