Welcome! Log In Create A New Profile

Advanced

Trying to build nginx with njs module on Windows

Geoff Bache
August 31, 2022 11:02AM
Hi all,

I'm having trouble building from source with the njs module included (which
seems to be the only way to get this module on Windows, right?)

I am following the advice on
https://nginx.org/en/docs/njs/install.html

and
http://nginx.org/en/docs/howto_build_on_win32.html

All seems to go fine with the build in msys2, using nmake from VS Build
Tools as indicated above, until it gets around to the njs module, when I get

cd /home/SEGEBAC1/src/njs/nginx/.. && if [ -f build/Makefile ]; then
"C:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\nmake.exe"
clean; fi && CFLAGS="-O2 -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb
-DFD_SETSIZE=1024 -DNO_SYS_TYPES_H" CC="cl" ./configure --no-openssl
--no-pcre && "C:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\nmake.exe"
libnjs
-f was unexpected at this time.
NMAKE : fatal error U1077: 'cd' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\nmake.exe"'
: return code '0x2'
Stop.

Any ideas? I tried executing these command separately, but then I get

MSYS ~/src/njs
$ CFLAGS="-O2 -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024
-DNO_SYS_TYPES_H" CC="cl" ./configure --no-openssl --no-pcre
configuring for MSYS_NT-10.0-19042 3.3.5-341.x86_64 unknown
checking for C compiler: cl
auto/cc: line 16: [: too many arguments
auto/cc: line 62: NJS_CC_NAME: unbound variable

which seems to indicate that the njs module does not handle the Visual
Studio compiler, which seems odd in combination with the suggestions above
to use nmake. Providing gcc does not help either, as then I get

MSYS ~/src/njs
$ CFLAGS="-O2 -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024
-DNO_SYS_TYPES_H" CC="gcc" ./configure --no-openssl --no-pcre
configuring for MSYS_NT-10.0-19042 3.3.5-341.x86_64 unknown
checking for C compiler: gcc
+ using GNU C compiler
+ gcc version 8.3.0 (x86_64-posix-seh, Built by strawberryperl.com project)
checking for sizeof(int) ... not found
checking for sizeof(u_int) ... not found
checking for sizeof(void *) ... not found
checking for sizeof(uintptr_t) ... not found
checking for sizeof(size_t) ... not found
checking for sizeof(off_t) ... not found
checking for sizeof(time_t) ... not found
checking for system byte ordering ... not found

../configure: error: cannot detect system byte ordering

Grateful for any help and suggestions.

Regards,
Geoff Bache
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

Trying to build nginx with njs module on Windows

Geoff Bache 450 August 31, 2022 11:02AM

Re: Trying to build nginx with njs module on Windows

Sergey Kandaurov 132 September 01, 2022 10:24AM

Re: Trying to build nginx with njs module on Windows

Geoff Bache 134 September 01, 2022 11:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready