Skip to content

failed to build the module for Win32 using MSYS2 #2498

@Zorono

Description

@Zorono

related to #1222 (i guess ?)
commit : bbace59

gcc -c  -I/ucrt64/include/luajit-2.1  -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/ucrt64/include -DNDK_SET_VAR -DLIBINJECTION_VERSION=0 -I../naxsi/naxsi_src/libinjection_ngxbuild/ -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/win32 -I ../ngx_devel_kit/objs -I objs/addon/ndk -I ../ngx_devel_kit/src -I ../ngx_devel_kit/objs -I objs/addon/ndk -I /ucrt64/include/luajit-2.1 -I ../lua-nginx-module/src/api -I ../naxsi/naxsi_src/ -I ./pcre2-10.47/src/ -I ./openssl-4.0.0/.openssl/include -I ./zlib-1.3.2 -I objs -I src/http -I src/http/modules -I ../ngx_devel_kit/src \
        -o objs/addon/src/ngx_http_lua_socket_tcp.o \
        ../lua-nginx-module/src/ngx_http_lua_socket_tcp.c
In file included from ../ngx_devel_kit/objs/ndk_includes.h:53,
                 from ../ngx_devel_kit/src/ndk.h:47,
                 from ../lua-nginx-module/src/ngx_http_lua_common.h:50,
                 from ../lua-nginx-module/src/ngx_http_lua_socket_tcp.h:11,
                 from ../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:13:
../ngx_devel_kit/src/ndk_log.h:163:9: note: '#pragma message: Nginx Devel Kit logging without variadic macros not yet implemented'
  163 | #pragma message("Nginx Devel Kit logging without variadic macros not yet implemented")
      |         ^~~~~~~
In file included from src/core/ngx_core.h:82,
                 from ../lua-nginx-module/src/ddebug.h:13,
                 from ../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:10:
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c: In function 'ngx_http_lua_socket_tcp_log_error':
src/core/ngx_inet.h:21:13: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_un'
   21 |      sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
      |             ^~~~~~
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:453:26: note: in expansion of macro 'NGX_UNIX_ADDRSTRLEN'
  453 |         u_char addr_text[NGX_UNIX_ADDRSTRLEN];
      |                          ^~~~~~~~~~~~~~~~~~~
In file included from M:/Installations/MSY2/ucrt64/lib/gcc/x86_64-w64-mingw32/16.1.0/include/stddef.h:1,
                 from M:/Installations/MSY2/ucrt64/include/inttypes.h:14,
                 from ./pcre2-10.47/src/pcre2.h:89,
                 from src/core/ngx_regex.h:19,
                 from src/core/ngx_core.h:75:
src/core/ngx_inet.h:21:35: error: invalid use of undefined type 'struct sockaddr_un'
   21 |      sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
      |                                   ^~~~~~~~
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:453:26: note: in expansion of macro 'NGX_UNIX_ADDRSTRLEN'
  453 |         u_char addr_text[NGX_UNIX_ADDRSTRLEN];
      |                          ^~~~~~~~~~~~~~~~~~~
src/core/ngx_inet.h:21:13: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_un'
   21 |      sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
      |             ^~~~~~
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:457:50: note: in expansion of macro 'NGX_UNIX_ADDRSTRLEN'
  457 |                                       addr_text, NGX_UNIX_ADDRSTRLEN, 0);
      |                                                  ^~~~~~~~~~~~~~~~~~~
src/core/ngx_inet.h:21:35: error: invalid use of undefined type 'struct sockaddr_un'
   21 |      sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))
      |                                   ^~~~~~~~
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:457:50: note: in expansion of macro 'NGX_UNIX_ADDRSTRLEN'
  457 |                                       addr_text, NGX_UNIX_ADDRSTRLEN, 0);
      |                                                  ^~~~~~~~~~~~~~~~~~~
../lua-nginx-module/src/ngx_http_lua_socket_tcp.c:453:16: error: unused variable 'addr_text' [-Werror=unused-variable]
  453 |         u_char addr_text[NGX_UNIX_ADDRSTRLEN];
      |                ^~~~~~~~~
cc1.exe: all warnings being treated as errors
make[1]: *** [objs/Makefile:1672: objs/addon/src/ngx_http_lua_socket_tcp.o] Error 1
make[1]: Leaving directory '/m/MyJob/nginx-builds/nginx-source'
make: *** [Makefile:10: build] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions