Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx-rtmp-module install error #1569

Closed
tsnextex opened this issue Oct 20, 2020 · 3 comments
Closed

nginx-rtmp-module install error #1569

tsnextex opened this issue Oct 20, 2020 · 3 comments

Comments

@tsnextex
Copy link

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

@shortcord
Copy link

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"

@tsnextex
Copy link
Author

It's resolved. Thanks for your help.

@Nay-Sayer
Copy link

I am having a similar issue with building Nginx on Centos 7 with the RTMP module;

root@localhost nginx-1.18.0]# make
make -f objs/Makefile
make[1]: Entering directory `/download/nginx-1.18.0'
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 /download/nginx-rtmp-module-master -I objs
-o objs/src/core/nginx.o
src/core/nginx.c
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 /download/nginx-rtmp-module-master -I objs
-o objs/src/core/ngx_log.o
src/core/ngx_log.c

I'm not well versed in all things Linux related so I'm not sure how to add the --with-cc-opt="-Wno-error=implicit-fallthrough" flag for the ./auto/configure step as suggested in the comment above. Please advise.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants