<div dir="ltr">Hi all,<div><br></div><div>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?)</div><div><br></div><div>I am following the advice on</div><div><a href="https://nginx.org/en/docs/njs/install.html">https://nginx.org/en/docs/njs/install.html</a><br></div><div><br></div><div>and </div><div><a href="http://nginx.org/en/docs/howto_build_on_win32.html">http://nginx.org/en/docs/howto_build_on_win32.html</a><br></div><div><br></div><div>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</div><div><br></div><div>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<br>-f was unexpected at this time.<br>NMAKE : fatal error U1077: 'cd' : return code '0x1'<br>Stop.<br>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'<br>Stop.<br></div><div><br></div><div>Any ideas? I tried executing these command separately, but then I get</div><div><br></div><div>MSYS ~/src/njs<br>$  CFLAGS="-O2  -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H" CC="cl" ./configure --no-openssl --no-pcre<br>configuring for MSYS_NT-10.0-19042 3.3.5-341.x86_64 unknown<br>checking for C compiler: cl<br>auto/cc: line 16: [: too many arguments<br>auto/cc: line 62: NJS_CC_NAME: unbound variable<br></div><div><br></div><div>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</div><div><br></div><div>MSYS ~/src/njs<br>$  CFLAGS="-O2  -W4 -WX -nologo -MT -Zi -Fdobjs/nginx.pdb -DFD_SETSIZE=1024 -DNO_SYS_TYPES_H" CC="gcc" ./configure --no-openssl --no-pcre<br>configuring for MSYS_NT-10.0-19042 3.3.5-341.x86_64 unknown<br>checking for C compiler: gcc<br> + using GNU C compiler<br> + gcc version 8.3.0 (x86_64-posix-seh, Built by <a href="http://strawberryperl.com">strawberryperl.com</a> project)<br>checking for sizeof(int) ... not found<br>checking for sizeof(u_int) ... not found<br>checking for sizeof(void *) ... not found<br>checking for sizeof(uintptr_t) ... not found<br>checking for sizeof(size_t) ... not found<br>checking for sizeof(off_t) ... not found<br>checking for sizeof(time_t) ... not found<br>checking for system byte ordering ... not found<br><br>./configure: error: cannot detect system byte ordering<br></div><div><br></div><div>Grateful for any help and suggestions.</div><div><br></div><div>Regards,</div><div>Geoff Bache</div><div><br></div></div>