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

64-bit Build Issue on Windows when Building into NGINX.exe #136

Open
justdan23 opened this issue Dec 14, 2022 Discussed in #135 · 0 comments
Open

64-bit Build Issue on Windows when Building into NGINX.exe #136

justdan23 opened this issue Dec 14, 2022 Discussed in #135 · 0 comments

Comments

@justdan23
Copy link

Discussed in #135

Originally posted by justdan23 December 14, 2022
I'm trying to build NGINX using Visual Studio 2022 and MSYS2. I'm able to build all of the stock NGINX with OpenSSL, PCRE2, and Zip entirely with x64 for Windows.

However, after I built the KRB5 MIT SDK for Windows to create the SDK folder containing the gssapi/gssapi.h header file, when compiling this SPNEGO NGINX Module, I am running into an issue with the includes not properly picking up the definitions which should appear if the DEFINEs are in place for MINGW. It's as if it is thinking it is GCC when reaching this module's source code for inclusion in NGINX.exe?

Thoughts?

Microsoft (R) Program Maintenance Utility Version 14.34.31937.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\nmake.exe" -f objs/Makefile

Microsoft (R) Program Maintenance Utility Version 14.34.31937.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c -O2  -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -I objs/lib/krb5/objs/include -DNO_SYS_TYPES_H -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core  -I src/event  -I src/event/modules  -I src/os/win32  -I objs/lib/pcre2/src/  -I objs/lib/openssl/openssl/include  -I objs/lib/zlib  -I objs  -I src/http  -I src/http/modules  -I src/http/v2  -I src/mail  -I src/stream  -Foobjs/addon/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.obj  objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c
ngx_http_auth_spnego_module.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(33): error C2061: syntax error: identifier '_off_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(37): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(63): error C2061: syntax error: identifier '_off_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(64): error C2371: 'st_atime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(34): note: see declaration of 'st_atime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(65): error C2371: 'st_mtime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(35): note: see declaration of 'st_mtime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(66): error C2371: 'st_ctime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(36): note: see declaration of 'st_ctime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(67): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(96): error C2061: syntax error: identifier '_off_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(97): error C2371: 'st_atime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(34): note: see declaration of 'st_atime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(98): error C2371: 'st_mtime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(35): note: see declaration of 'st_mtime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(99): error C2371: 'st_ctime': redefinition; different basic types
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(36): note: see declaration of 'st_ctime'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(100): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(235): error C2027: use of undefined type 'stat'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(87): note: see declaration of 'stat'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(235): error C2027: use of undefined type '_stat64i32'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(54): note: see declaration of '_stat64i32'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(240): error C2027: use of undefined type 'stat'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(87): note: see declaration of 'stat'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(240): error C2027: use of undefined type '_stat64i32'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys\stat.h(54): note: see declaration of '_stat64i32'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(63): error C2010: '.': unexpected in macro parameter list
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(443): warning C4459: declaration of 'shm_zone' hides global declaration
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(110): note: see declaration of 'shm_zone'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(643): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(683): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(689): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(704): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(768): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(775): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(791): error C2065: 'P_tmpdir': undeclared identifier
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(791): warning C4312: 'type cast': conversion from 'int' to 'const char *' of greater size
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(796): error C2065: 'P_tmpdir': undeclared identifier
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(900): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(907): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(922): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(930): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(940): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(958): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(979): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(991): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1003): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1013): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1025): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1058): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1071): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1183): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1189): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1196): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1222): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1228): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1272): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1289): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1311): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1317): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1378): warning C4013: 'setenv' undefined; assuming extern returning int
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1512): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1550): error C2059: syntax error: ')'
objs/lib/spnego-http-auth-nginx-module/ngx_http_auth_spnego_module.c(1568): error C2059: syntax error: ')'
NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x64\nmake.exe"' : return code '0x2'
Stop.
```</div>
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

1 participant