Welcome! Log In Create A New Profile

Advanced

Compiling nginx on Windows

Posted by VernJensen 
Compiling nginx on Windows
March 24, 2014 04:16PM
I'm attempting to follow the instructions here to compile nginx on Windows:

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

First of all, when the instructions say "Start MySYS bash" I'm assuming it means "run MinGW/msys/1.0/msys.bat"?

Secondly, when I do this, I noticed that "MinGW/msys/1.0/home/JensenV/" is where Mercurial puts things I check out. This seems to be my 'home' directory. Okay, cool.

Where I get stuck is running the configuration script. First, it says to use "auto/configure" but when I do this, I get:
"sh: auto/configure: No such file or directory".

So I tried just "configure" instead which seems to be right (is it?), but then I get a Windows dialog box saying "configure.exe has stopped working" and this output is in MINGW32's bash console:

----------
License file not found in C:/MinGW/msys/1.0/home/JensenV
Enterprise modules will not be available.

QDir::readDirEntries: Cannot read the directory: C:/MinGW/msys/1.0/home/JensenV/
objs/lib/src (UTF8)
Unknown option --with-cc=cl
QMAKESPEC must either be defined as an environment variable, or specified
as an argument with -spec
QDir::readDirEntries: Cannot read the directory: C:/MinGW/msys/1.0/home/JensenV/
objs/lib/mkspecs (UTF8)
----------

At this point I'm stuck. I do recognize "QDir" as a Qt command (http://qt-project.org/)... we use Qt here at work. But I'm at a loss as to why it's looking for "objs/lib/src" or "objs/lib/mkspecs" (none of these exist) or how I'm supposed to fix this issue. Nothing was in the instructions about creating these directories or filling them with contents of some sort.

If I create empty directories for src and mkspecs, I still get the errors above for "Unknown option --with-cc=cl" and "QMAKESPEC must either be defined as an environment variable, or specified as an argument with -spec". What should this environment variable be set to, and why is -with-cc=cl unsupported?

Also, the instructions say to use "nmake" as the final step, but only "make" seems to be a valid command. Typo? Or am I using the wrong shell or something?



Edited 3 time(s). Last edit at 03/24/2014 04:22PM by VernJensen.
Re: Compiling nginx on Windows
March 24, 2014 04:44PM
Okay, so the issue was that I needed to "cd nginx" prior to starting the configure command, and "objs/lib" should have been created inside the nginx folder, not outside. auto/configure is inside nginx folder.
Re: Compiling nginx on Windows
March 24, 2014 05:28PM
The best guide on how to compile:
http://blog.hemp-society.de/2013/08/nginx-rtmp-compile-for-windows.html
Just remove rtmp if your after the basic version.

Or grab this version:
http://nginx-win.ecsds.eu/

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
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