nginx在make时报错[objs/Makefile:469: objs/src/core/ngx_murmurhash.o] Error

报错如下:

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:469: objs/src/core/ngx_murmurhash.o] Error 1
 make[1]: Leaving directory '/root/nginx-1.10.1'
 make: *** [Makefile:8: build] Error 2

解决办法:

root@v2ray-tw:~/nginx-1.10.1# vim objs/Makefile

把Makefile文件的-Werror去掉重新make就可以了

发表评论

后才能评论