Windows build failing - NMAKE : fatal error U1073

Following your guide: Building nginx on the Win32 platform with Visual C

With a few edits, I then ran:
./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
–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
–with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.36
–with-zlib=objs/lib/zlib-1.2.8 --with-openssl=objs/lib/openssl-1.0.1e
–with-select_module --with-http_ssl_module --with-ipv6
–add-module=…/ngx-fancyindex

Which succeeded. Finally I ran: nmake -f objs/Makefile, which gave
the following output:

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

NMAKE : fatal error U1073: don’t know how to make
‘src/os/win32/ngx_win32_config
.h’
Stop.

How do I build nginx on Windows?

Thanks for all suggestions

Hello!

On Sat, May 02, 2015 at 01:51:20PM +1000, Alec T. wrote:

–with-cc-opt=-DFD_SETSIZE=1024 --with-pcre=objs/lib/pcre-8.36
NMAKE : fatal error U1073: don’t know how to make ‘src/os/win32/ngx_win32_config
.h’
Stop.

How do I build nginx on Windows?

It looks like you are trying to build from sources available in
release tarballs. This won’t work. Please follow the guide
linked and clone the repository (or, alternatively, download a
repository snapshot there).


Maxim D.
http://nginx.org/

On Sat, May 2, 2015 at 1:48 PM, Maxim D. [email protected] wrote:

–sbin-path=nginx.exe

release tarballs. This won’t work.
This does not seem logical. Why it should not work?

It is common to build and install from release tarballs (at least on
Unix). Why it should be different on Windows?


Thiago F.

Hello!

On Sat, May 02, 2015 at 03:52:50PM -0300, Thiago F. wrote:

–http-log-path=logs/access.log --error-log-path=logs/error.log
the following output:
It looks like you are trying to build from sources available in
release tarballs. This won’t work.
This does not seem logical. Why it should not work?

It is common to build and install from release tarballs (at least on
Unix). Why it should be different on Windows?

Historically, source tarballs does not contain some source files
needed to build nginx on Windows. Note that nginx/Windows is
still considered to be “beta” and the build process is cumbersome.

See here for more details:

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


Maxim D.
http://nginx.org/