Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Problem with Compiling Apache 2.4.1 under Windows |
|
Author |
|
Waldemar
Joined: 03 Apr 2012 Posts: 4 Location: Germany
|
Posted: Wed 04 Apr '12 17:38 Post subject: Problem with Compiling Apache 2.4.1 under Windows |
|
|
Hello.
I am trying to compile Apache 2.4.1 on Windows and got stuck or am missing something.
Details:
I actually don't need Apache compiled by myself, i just want to build a module for use under Windows. I thought simply compiling Apache is a good first step. I already did most of what i need under a Linux build system where everything works. If anybody knows an easier way to just compile modules, this would do for me now. I already tried apxs_win32, this seems to be an old version and not working with Apache 2.4 or again i missed something (i configured it according to the README).
My Build system is Windows 7 64-bit (i could try 32-bit or XP too, but i doubt this matters, target system can be 32 bit as well for now)
I tried VC++ 2008 Express and VS2010 Ultimate SP1, got the same results on both. Here again i doubt trying other versions (like VC++ 2010 Express) would make any difference.
(i will use BUILDROOT as generic build root directory, if that matters, it's not nested very deep and contains no spaces or fancy characters)
What happens when i open Apache.dsw i get those errors (have to click each when converting, and those are Output messages when done)
BUILDROOT\support\win32\ApacheMonitor.dsp : error : Project upgrade failed.
BUILDROOT\BuildAll.dsp : error : Project upgrade failed.
BUILDROOT\BuildBin.dsp : error : Project upgrade failed.
BUILDROOT\InstallBin.dsp : error : Project upgrade failed.
BUILDROOT\server\gen_test_char.dsp : error : Project upgrade failed.
BUILDROOT\modules\filters\mod_proxy_html.dsp : error : Project upgrade failed.
BUILDROOT\httpd-2.4.1\modules\filters\mod_xml2enc.dsp : error : Project upgrade failed.
I installed Activeperl 5.14, awk95.exe is in c:\windows\ renamed to awk.exe, so it's in path.
As sources i used:
http-2.4.1.tar.bz2 from apache.org (it's listed as "Unix source" but seems to have everything Win-specific in it)
apr-1.4.6-win32-src.zip
apr-util-1.4.1-win32-src.zip
apr-iconv-1.2.1-win32-src-r2.zip
libxml2-2.7.8.win32.zip
lua-5.1.5.tar.gz
openssl-1.0.0g.tar.gz
pcre-8.12.zip
zlib126.zip
I didn't change anything on the sources myself yet.
I know some of them are optional, but i installed them to make sure this is not the problem.
All extracted to BUILDROOT\srclib\ without version number, for example apr-1.4.6 is in BUILDROOT\srcdir\apr\
After unpacking i did "perl srclib\apr\build\cvtdsp.pl -2005" while in BUILDROOT. This converts some files, but the ones that didn't import correctly were not listed as converted. I didn't check it completely, but at least BuildAll.dsp, InstallBin.dsp, BuildBin.dsp, ApacheMonitor.dsp were not converted. This might just be coinscidence, and i know (or at least think so) that the script doesn't write a message if it looks at a file, but doesn't actually change anything in it.
Things i already did:
- i read the documentation on httpd.apache.org on how to compile under Windows over and over and did everything there.
- i googled a lot about the problem
- i looked at the previous posts on apachelounge.com forum
things i did not try yet (but am willing to if there is hope it helps)
- compiling on the command line
- transforming the LF's to CRLF's
- other compiler versions, like VC6, VC7 or VC++2010 Express
- building APR first via command line or in the IDE (that i will try, but doubt it helps with the converting)
Does anybody know if i am just missing a few steps here, or am i going at this the completly wrong way? I am not very experienced in compiling huge things that i didn't write, so you can assume i make big or small or trival mistakes that other people just laugh at. I can accept beeing laughed at, as long at the ones laughing have fun and give me tips to solve the problem |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 04 Apr '12 22:36 Post subject: Re: Problem with Compiling Apache 2.4.1 under Windows |
|
|
Waldemar wrote: |
- transforming the LF's to CRLF's
|
This step is a must when building from Unix tarballs, I always do it first. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 05 Apr '12 10:25 Post subject: |
|
|
Also don't forget to convert the VC files
Code: | del /s /q *.sln *.vcproj* |
then
Code: | perl srclib/apr/build/cvtdsp.pl -2005 |
After that open the apache.sln and convert the vc files into the VC 10 format. |
|
Back to top |
|
Waldemar
Joined: 03 Apr 2012 Posts: 4 Location: Germany
|
Posted: Tue 24 Apr '12 7:37 Post subject: |
|
|
Took me a while to get to try more stuff, and i haven't figured out everything, but i still wanted to post my progress so far to get this thread to some kind of end.
First, transforming LF to CR/LF did the trick, after this i could load the Workspace/Solution into VC10 and all conversion was ok. My guess as to why only part of it worked before the transformation is, the perl-script did just that with the files it touched, but those few that is didn't have to modify stll had LF only in them. Also confusing is, the .dsw file works without transforming, but the .dsp file need it.
After this, i still could not compile it all, my guess here is that APR and APR-UTIL (maybe more) would have to be built (probably on command line) before trying to build the rest in VC, since one of the error messages was the missing "apr.h", which is not directly in the sources but seems to be generated from other files.
However i did not try any more things, since i found out how to use the apxs utility to compile modules only. It has to be called with " libhttpd.lib libapr-1.lib libaprutil-1.lib" added to the command line when compiling (the "-c" option). I didn't try to use the -i option separately, but anyhow, it's not needed (like on Linux), the .so file is directly there after compiling and can simply be copied to the modules\ Subdir in Apache. (Only if you want to compile/install separately, doing both in one step works fine also). On additional note, on Wondows Apache has to be stopped before installing/copying the module over one that exists already and is loaded, it seems there is a lock on it while apache is running and has the module loaded. This is different on Linux.
In case i ever need to compile Apache completely and find out what else to to, i'll try to remember to post here.
On a side note, maybe it would good to have a complete description on how to compile apache, or even a directly compilable Windows source somewhere in the download section here? I don't want this to sound like a demand or request, but maybe it's something easy and nobody thought of it yet to put it up for download. It would help beginners like me to get started better
Oh, i almost forgot, thanks for the replies. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 24 Apr '12 23:48 Post subject: |
|
|
I personally do not think that VC10 converts the VC6 .dsp files properly. I have never had luck with it. Fortunately, I build in mostly VC9 so if I want something in VC10 as well I convert the VC9 files. |
|
Back to top |
|
Waldemar
Joined: 03 Apr 2012 Posts: 4 Location: Germany
|
Posted: Wed 25 Apr '12 14:14 Post subject: |
|
|
Hm, didn't think of that, will try this next time i get to it.
I suppose VC++ 2008 Express is enough for this, or do i need VS Pro or something like that? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 25 Apr '12 21:47 Post subject: |
|
|
Express works just fine for converting. |
|
Back to top |
|
|
|
|
|
|