nginx-rtmp-module install error

Created on 20 Oct 2020  Â·  2Comments  Â·  Source: arut/nginx-rtmp-module

I got the error when running the make install for nginx-rtmp-module. please let me know how to fix it.
cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I ../nginx-rtmp-module -I objs -I src/http -I src/http/modules \
-o objs/addon/nginx-rtmp-module/ngx_rtmp_eval.o \
../nginx-rtmp-module/ngx_rtmp_eval.c
../nginx-rtmp-module/ngx_rtmp_eval.c: In function ‘ngx_rtmp_eval’:
../nginx-rtmp-module/ngx_rtmp_eval.c:160:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
160 | switch (c) {
| ^~
../nginx-rtmp-module/ngx_rtmp_eval.c:170:13: note: here
170 | case ESCAPE:
| ^~~~
cc1: all warnings being treated as errors
make[1]: * [objs/Makefile:1358: objs/addon/nginx-rtmp-module/ngx_rtmp_eval.o] Error 1
make[1]: Leaving directory '/home/thor/build/nginx-1.18.0'
make: *
[Makefile:8: build] Error 2

Most helpful comment

I believe this is due to the version of GCC you are using to compile the project with, that and the fact that the project hasn't been touched in a few years.
GCC is treating all warnings as errors, easiest solution is to tell GCC not to treat implicit-fallthrough warnings as errors.

During the ./auto/configure step, add this flag --with-cc-opt="-Wno-error=implicit-fallthrough"

All 2 comments

I believe this is due to the version of GCC you are using to compile the project with, that and the fact that the project hasn't been touched in a few years.
GCC is treating all warnings as errors, easiest solution is to tell GCC not to treat implicit-fallthrough warnings as errors.

During the ./auto/configure step, add this flag --with-cc-opt="-Wno-error=implicit-fallthrough"

It's resolved. Thanks for your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaveZheng picture DaveZheng  Â·  3Comments

evgenibers picture evgenibers  Â·  4Comments

sheldonbaker picture sheldonbaker  Â·  5Comments

MikuPanda picture MikuPanda  Â·  4Comments

SmokE-PGF picture SmokE-PGF  Â·  6Comments