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

Compile errors on windows #131

Open
2mmi opened this issue Apr 27, 2020 · 4 comments
Open

Compile errors on windows #131

2mmi opened this issue Apr 27, 2020 · 4 comments

Comments

@2mmi
Copy link

2mmi commented Apr 27, 2020

Not even sure if it possible to compile on windows ?
I have tried multiple version of: MSVC, 2015, 2017, 2019,
and with multiple Nginx versions

Complies fine with other modules like the nginx-rtmp-module

Here is my configure:

auto/configure
--with-cc=cl
--builddir=objs
--with-debug
--prefix=
--conf-path=conf/nginx.conf
--pid-path=logs/nginx.pid
--http-log-path=logs/access.log
--error-log-path=logs/error.log
--sbin-path=nginx.exe
--http-client-body-temp-path=temp/client_body_temp
--http-proxy-temp-path=temp/proxy_temp
--http-fastcgi-temp-path=temp/fastcgi_temp
--http-scgi-temp-path=temp/scgi_temp
--http-uwsgi-temp-path=temp/uwsgi_temp
--with-cc-opt=-DFD_SETSIZE=1024
--with-pcre=objs/lib/pcre-8.43
--with-zlib=objs/lib/zlib-1.2.11
--with-select_module
--with-http_v2_module
--with-http_realip_module
--with-http_addition_module
--with-http_sub_module
--with-http_dav_module
--with-http_stub_status_module
--with-http_flv_module
--with-http_mp4_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_auth_request_module
--with-http_random_index_module
--with-http_secure_link_module
--with-http_slice_module
--with-mail
--with-stream
--with-openssl="objs/lib/openssl-1.1.1g"
--with-http_ssl_module
--with-mail_ssl_module
--with-stream_ssl_module
--with-openssl-opt=no-asm
--add-module="objs/lib/nginx-upload-module"

And here the output from x86 native tool command prompt.

    cl -c -O2  -W4 -nologo -MT -Zi -DFD_SETSIZE=1024 -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/pcre-8.43  -I objs/lib/openssl-1.1.1g/openssl/include  -I objs/lib/zlib-1.2.11  -I objs  -I src/http  -I src/http/modules  -I src/http/v2  -I src/mail  -I src/stream  -Foobjs/addon/nginx-upload-module/ngx_http_upload_module.obj  nginx-upload-module/ngx_http_upload_module.c

ngx_http_upload_module.c
nginx-upload-module/ngx_http_upload_module.c(1621): warning C4047: '=': 'ngx_fd_t' differs in levels of indirection from 'int'
nginx-upload-module/ngx_http_upload_module.c(1733): warning C4047: '=': 'ngx_fd_t' differs in levels of indirection from 'int'
nginx-upload-module/ngx_http_upload_module.c(1873): warning C4204: nonstandard extension used: non-constant aggregate initializer
nginx-upload-module/ngx_http_upload_module.c(2099): warning C4013: 'attribute' undefined; assuming extern returning int
nginx-upload-module/ngx_http_upload_module.c(2099): error C2065: 'unused': undeclared identifier
nginx-upload-module/ngx_http_upload_module.c(2099): error C2143: syntax error: missing ';' before 'type'
nginx-upload-module/ngx_http_upload_module.c(2114): warning C4013: 'ngx_lock_fd' undefined; assuming extern returning int
nginx-upload-module/ngx_http_upload_module.c(2147): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2148): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2149): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2160): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2180): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2192): error C2039: 'st_size': is not a member of '_BY_HANDLE_FILE_INFORMATION'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\fileapi.h(635): note: see declaration of '_BY_HANDLE_FILE_INFORMATION'
nginx-upload-module/ngx_http_upload_module.c(2193): warning C4013: 'ftruncate' undefined; assuming extern returning int
nginx-upload-module/ngx_http_upload_module.c(2199): warning C4013: 'ngx_unlock_fd' undefined; assuming extern returning int
nginx-upload-module/ngx_http_upload_module.c(3513): warning C4013: 'strncasecmp' undefined; assuming extern returning int
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.

@qiufengruoyi
Copy link

Has this problem been solved?

@JerryGaoYJ
Copy link

Is this problem solved?

@chnykn
Copy link

chnykn commented Jan 31, 2022

I meet the same problem! has been solved?

@chnykn
Copy link

chnykn commented Feb 1, 2022

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

4 participants