nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

Compile error with nginx-1.11.1

Open alon21034 opened this issue 10 years ago • 4 comments

I downloaded the source code from: http://nginx.org/download/nginx-1.11.1.tar.gz

The error message is: (I changed the directory's name to path_to_nginx_src)

make -f objs/Makefile
make[1]: Entering directory 'path_to_nginx_src/nginx-1.11.1'
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 path_to_nginx_src/nginx-rtmp-module -I objs -I src/http -I src/http/modules \
    -o objs/addon/nginx-rtmp-module/ngx_rtmp_core_module.o \
    path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c
path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c: In function ‘ngx_rtmp_core_listen’:
path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c:548:9: error: cannot convert to a pointer type
         if (ngx_memcmp(ls[i].sockaddr + off, u.sockaddr + off, len) != 0) {
         ^
In file included from src/core/ngx_core.h:51:0,
                 from path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c:8:
path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c:568:30: error: incompatible type for argument 2 of ‘memcpy’
     ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen);
                              ^
src/core/ngx_string.h:102:54: note: in definition of macro ‘ngx_memcpy’
 #define ngx_memcpy(dst, src, n)   (void) memcpy(dst, src, n)
                                                      ^
In file included from /usr/include/features.h:367:0,
                 from /usr/include/x86_64-linux-gnu/sys/types.h:25,
                 from src/os/unix/ngx_linux_config.h:18,
                 from src/core/ngx_config.h:26,
                 from path_to_nginx_src/nginx-rtmp-module/ngx_rtmp_core_module.c:7:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:1: note: expected ‘const void * restrict’ but argument is of type ‘ngx_sockaddr_t {aka union <anonymous>}’
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
objs/Makefile:1299: recipe for target 'objs/addon/nginx-rtmp-module/ngx_rtmp_core_module.o' failed
make[1]: *** [objs/addon/nginx-rtmp-module/ngx_rtmp_core_module.o] Error 1
make[1]: Leaving directory 'path_to_nginx_src/nginx-1.11.1'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

Furthermore, there is no problem with nginx-1.10.1.

alon21034 avatar Jun 14 '16 10:06 alon21034

https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/pull/141

Levvy055 avatar Jun 14 '16 17:06 Levvy055

me too

snappytux avatar Jun 21 '16 13:06 snappytux

I get this error too

AskeFC avatar Jun 23 '16 15:06 AskeFC

Data structs have changed since 1.11 For now it is recommended to use Nginx 1.10. That worked for Me.

Source: https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/136

Eurobertics avatar Jul 03 '16 12:07 Eurobertics