winshining / nginx-http-flv-module

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain names) and JSON style statistics are supported now.
BSD 2-Clause "Simplified" License
2.75k stars 571 forks source link

Module crashed by current libs e.g. Debian SID #174

Closed DoM1niC closed 4 years ago

DoM1niC commented 4 years ago

Hey, I use your great Module but @my current Dev VM, the compile crashed with following

-Wl,-E
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_rtmp_live_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: multiple definition of `http_flv_live_next_close_stream'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: first defined here
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_rtmp_live_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: multiple definition of `http_flv_live_next_play'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: first defined here
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_rtmp_flv_live_index_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: multiple definition of `http_flv_live_next_play'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: first defined here
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_rtmp_flv_live_index_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: multiple definition of `http_flv_live_next_close_stream'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: first defined here
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_http_flv_live_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: multiple definition of `http_flv_live_next_play'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:24: first defined here
/usr/bin/ld: objs/addon/nginx-http-flv-module-master/ngx_http_flv_live_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: multiple definition of `http_flv_live_next_close_stream'; objs/addon/nginx-http-flv-module-master/ngx_rtmp_gop_cache_module.o:/home/compile/NGINX/sources/nginx-http-flv-module-master/ngx_http_flv_live_module.h:25: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:337: objs/nginx] Fehler 1
make[1]: Verzeichnis „/home/compile/NGINX/sources/nginx-1.19.1“ wird verlassen
make: *** [Makefile:8: build] Fehler 2

I use the newst lib's, the armhf Version for Raspberry Pi's compiles without Problems (current stable Raspbian) with this Rules / Parameters..

./configure --with-http_v2_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module \
--add-module=$COMPILE_DIR/sources/ngx_http_geoip2_module-master --add-module=$COMPILE_DIR/sources/nginx-auth-ldap-master \
--add-module=$COMPILE_DIR/sources/nginx-http-flv-module-master --with-http_ssl_module --with-http_dav_module \
--add-module=$COMPILE_DIR/sources/nginx-dav-ext-module-master/ --with-http_xslt_module --with-http_realip_module \
--with-openssl=$COMPILE_DIR/sources/openssl-1.1.1c
make -j16
DoM1niC commented 4 years ago

I changed the Order from the configure Process so it works now... very confusing

DoM1niC commented 4 years ago

the Problem still exist

winshining commented 4 years ago

I have no environment as yours in hand now, but I think the following patch may fix the bug:

patch.diff.txt

Usage: 1.remove .txt suffix (.diff suffix not allowed by GitHub), place it in the same level of your source directory 2.cd to your source code directory 3.execute the command: patch -p1 < ../patch.diff

Looking forward to your feedback, thank you!

DoM1niC commented 4 years ago

I have no environment as yours in hand now, but I think the following patch may fix the bug:

patch.diff.txt

Usage: 1.remove .txt suffix (.diff suffix not allowed by GitHub), place it in the same level of your source directory 2.cd to your source code directory 3.execute the command: patch -p1 < ../patch.diff

Looking forward to your feedback, thank you!

THX for your Support, all works now with this Patch :)

winshining commented 4 years ago

Thanks for your feedback!