openresty / openresty/echo-nginx-module

Trying to compile with Windows

Open
#102 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.2k
Forks
251
Avg merge
1h 24m
Merged PRs (30d)
2

Description

Hello friends

Im using msys/mingw32, cl and nmake form VS 19

rm -rf ./objs/* ; auto/configure \
	--with-cc=cl \
	--builddir=objs \
	--prefix= \
	--conf-path=conf/nginx.conf \
	--pid-path=logs/nginx.pid \
	--http-log-path=logs/access.log \
	--error-log-path=logs/error.log \
	--http-proxy-temp-path=temp/proxy_temp \
	--sbin-path=nginx.exe \
	--with-cc-opt=-DFD_SETSIZE=1024 \
	--http-client-body-temp-path=temp/client_body_temp \
	--with-http_image_filter_module \
	--without-http_fastcgi_module \
	--without-http_uwsgi_module \
	--without-http_scgi_module \
	--without-http_grpc_module \
	--without-http_mirror_module \
	--without-http_autoindex_module \
	--without-http_geo_module \
	--without-http_map_module \
	--without-http_split_clients_module \
	--without-http_referer_module \
	--without-http_empty_gif_module \
	--without-http_limit_conn_module \
	--without-http_browser_module \
	--without-http_upstream_hash_module \
	--without-http_upstream_ip_hash_module \
	--without-http_upstream_least_conn_module \
	--without-http_upstream_random_module \
	--without-http_upstream_zone_module \
	--without-mail_pop3_module \
	--without-mail_imap_module \
	--without-mail_smtp_module \
	--without-stream_limit_conn_module \
	--without-stream_geo_module \
	--without-stream_map_module \
	--without-stream_split_clients_module \
	--without-http_gzip_module \
	--with-pcre=../deps/pcre-8.45 \
	--add-module=../deps/echo-nginx-module-0.62 ; nmake

I receive this error:
src/ngx_http_echo_module.c(8): warning C4603: 'DDEBUG': macro is not defined or definition is different after precompiled header use
If i comment this DDEBUG lines, the other erros occurs too:
"E:\MinGW\msys\1.0\home\xinxilas\nginx\src\core\ngx_cycle.h(44): error C2079: 'new_log' uses undefined struct 'ngx_log_s'"

        cl -c -O2  -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -Yungx_config.h -Fpobjs/ngx_config.pch -I src/core  -I src/event  -I src/event/modules  -I src/os/win32  -I ../deps/pcre-8.45  -I ../deps/gd/include  -I objs  -I src/http  -I src/http/modules  -Foobjs/addon/src/ngx_http_echo_module.obj  ../deps/echo-nginx-module-0.62/src/ngx_http_echo_module.c
ngx_http_echo_module.c
../deps/echo-nginx-module-0.62/src/ngx_http_echo_module.c(8): error C2220: the following warning is treated as an error
../deps/echo-nginx-module-0.62/src/ngx_http_echo_module.c(8): warning C4603: 'DDEBUG': macro is not defined or definition is different after precompiled header use
../deps/echo-nginx-module-0.62/src/ngx_http_echo_module.c(8): note: Add macro to precompiled header instead of defining here
../deps/echo-nginx-module-0.62/src/ngx_http_echo_module.c(22): note: use of precompiled header
E:\MinGW\msys\1.0\home\xinxilas\nginx\src\core\ngx_cycle.h(44): error C2079: 'new_log' uses undefined struct 'ngx_log_s'
E:\MinGW\msys\1.0\home\xinxilas\nginx\src\core\ngx_resolver.h(49): error C2079: 'log' uses undefined struct 'ngx_log_s'
E:\MinGW\msys\1.0\home\xinxilas\nginx\src\core\ngx_connection.h(42): error C2079: 'log' uses undefined struct 'ngx_log_s'

Tried nginx 16., 18, 19
disabled and enabled many auto/configure flags without success
ANy tip?

they tod to change from "unsigned long
unsigned long" to "uintptr_t"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported auto/configure command and the generated Windows build invocation for ngx_http_echo_module.c. Read the referenced src/core/ngx_cycle.h, ngx_resolver.h, and ngx_connection.h files alongside the precompiled-header diagnostics. Done means nmake completes for the Windows configuration without the C4603 or undefined ngx_log_s errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, nginx
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.