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

Failed compile with nginx-1.9.7

Open tczaude opened this issue 9 years ago • 5 comments

var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-1.0.4/ngx_http_mogilefs_module.c: In function 'ngx_http_mogilefs_handler': /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-1.0.4/ngx_http_mogilefs_module.c:320:12: error: 'ngx_peer_connection_t' has no member named 'lock' u->peer.lock = &r->connection->lock; ^ /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-1.0.4/ngx_http_mogilefs_module.c:320:34: error: 'ngx_connection_t' has no member named 'lock' u->peer.lock = &r->connection->lock; ^ objs/Makefile:2235: recipe for target 'objs/addon/nginx-mogilefs-module-1.0.4/ngx_http_mogilefs_module.o' failed make[1]: *** [objs/addon/nginx-mogilefs-module-1.0.4/ngx_http_mogilefs_module.o] Error 1

tczaude avatar Dec 03 '15 12:12 tczaude

and last commit error -o objs/addon/src/ngx_http_echo_module.o
/var/tmp/portage/www-servers/nginx-1.9.7/work/echo-nginx-module-b2052b826e97b5cf0a3a85263fcd22546ff19d75/src/ngx_http_echo_module.c x86_64-pc-linux-gnu-gcc -c -I/usr/include -O3 -pipe -march=native -fomit-frame-pointer -I/usr/include -DNDK_SET_VAR -I/var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-rtmp-module-1.1.7 -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include -I /var/tmp/portage/www-servers/nginx-1.9.7/work/lua-nginx-module-7b1ff62c2126b573ce3e1069639bd82922875801/src/api -I /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx_upstream_check_module-10782eaff51872a8f44e65eed89bbe286004bcb1 -I /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-push-stream-module-0.5.1/src -I /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-push-stream-module-0.5.1/include -I /var/tmp/portage/www-servers/nginx-1.9.7/work/ngx_devel_kit-0.2.19/objs -I objs/addon/ndk -I /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx_ajp_module-bf6cd93f2098b59260de8d494f0f4b1f11a84627 -I /var/tmp/portage/www-servers/nginx-1.9.7/work/ngx_metrics-0.1.1/src -I /usr/include/libxml2 -I objs -I src/http -I src/http/modules -I src/http/v2 -I src/http/modules/perl -I /var/tmp/portage/www-servers/nginx-1.9.7/work/ngx_devel_kit-0.2.19/src -I src/mail -I src/stream
-o objs/addon/src/ngx_http_echo_util.o
/var/tmp/portage/www-servers/nginx-1.9.7/work/echo-nginx-module-b2052b826e97b5cf0a3a85263fcd22546ff19d75/src/ngx_http_echo_util.c /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-020937ff4624fc31928adb51a5c43753bf256b34/ngx_http_mogilefs_module.c: In function 'ngx_http_mogilefs_handler': /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-020937ff4624fc31928adb51a5c43753bf256b34/ngx_http_mogilefs_module.c:320:12: error: 'ngx_peer_connection_t' has no member named 'lock' u->peer.lock = &r->connection->lock; ^ /var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-mogilefs-module-020937ff4624fc31928adb51a5c43753bf256b34/ngx_http_mogilefs_module.c:320:34: error: 'ngx_connection_t' has no member named 'lock' u->peer.lock = &r->connection->lock; ^ objs/Makefile:2268: recipe for target 'objs/addon/nginx-mogilefs-module-020937ff4624fc31928adb51a5c43753bf256b34/ngx_http_mogilefs_module.o' failed make[1]: *** [objs/addon/nginx-mogilefs-module-020937ff4624fc31928adb51a5c43753bf256b34/ngx_http_mogilefs_module.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/var/tmp/portage/www-servers/nginx-1.9.7/work/nginx-1.9.7' Makefile:8: recipe for target 'build' failed make: *** [build] Error 2

tczaude avatar Dec 08 '15 08:12 tczaude

Disabling threads will fix the issue, per https://github.com/nginx/nginx/blob/branches/stable-1.6/src/event/ngx_event_connect.h#L56

apalmblad avatar Jul 15 '16 02:07 apalmblad

This need fix nginx? or in module ?

grigorov avatar Aug 04 '16 13:08 grigorov

I think I wrote disabling, but meant enabling.

But at the nginx level; through flags to configure

See that in the code linked in my last comment, the struct member that the module wants is only present when NGX_THREADS is set.

apalmblad avatar Aug 04 '16 17:08 apalmblad

tried to enable NGX_THREADS on 1.16.1 but still fail to compile

It's because I have --enable-threads on my configuration flags

Is there any way to fix this @apalmblad ?

midorinet avatar Mar 03 '20 01:03 midorinet