Author |
|
daniel1975
Joined: 05 Feb 2006 Posts: 24 Location: RO, Bucharest
|
Posted: Sun 02 Dec '07 14:49 Post subject: Apache 2.2 build with new VC++ 2008 RTM |
|
|
I was wondering if compiling Apache 2.2.6 with the new Visual C++ 2008 just reached RTM would lead to better performance under Win 2003 or 2008 RCx?
Has anyone try that? |
|
Back to top |
|
brolx
Joined: 14 Nov 2007 Posts: 3
|
Posted: Mon 10 Dec '07 13:30 Post subject: Re: Apache 2.2 build with new VC++ 2008 RTM |
|
|
I had a lot of problems to compile the code, and after I finally built it, Apache crashed.
Anybody succeded ? |
|
Back to top |
|
SquallATF
Joined: 19 Oct 2007 Posts: 11
|
Posted: Wed 12 Dec '07 2:43 Post subject: |
|
|
modfile apr.hw in srclib\apr\include
change
#define _WIN32_WINNT 0x0400
to
#define _WIN32_WINNT 0x0502
0x0400 is WINNT 4.0
0x0500 is WINDOWS 2000
0x0501 is WINDOWS XP
0x0502 is WINDOWS 2003
0x0600 is WINDOWS VISTA
vs2008 default sdk is 6.0A , it only support Windows Version >= 0x0501
or
change vs2008 default sdk,use 2k3 r2 sdk. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 18 Dec '07 20:09 Post subject: |
|
|
Out of curiosity I gave Visual C++ 2008 Express (VS9) a try on Vista.
Rather than download the Windows 2003 R2 SDK, I used the default SDK which is installed with VS9.
Like SquallATF, I needed to make a few changes in srclib\apr\include\apr.hw to get Apache 2.2.6 to build correctly.
I changed these two definitions in apr.hw:
#define _WIN32_WINNT 0x0600
#define APR_HAVE_IPV6 1 I found that it was necessary to define IPV6 to avoid these build errors: Code: | .\network_io\unix\multicast.c(168) : warning C4013: 'find_if_index' undefined; assuming extern returning int
...
multicast.obj : error LNK2019: unresolved external symbol _find_if_index referenced in function _do_mcast | I don't use IPV6, but VS9 on Vista apparently supports it out-of-the-box, whether you use it or not.
A quick and dirty performance test (ab.exe -n 10000 -c 10 -k http://localhost/index.html) showed no performance difference between the VS8 and VS9 builds of Apache 2.2.6 running on Vista or running on XPsp2.
I also didn't notice anything new or exciting in the VS9 IDE - but I didn't really search for changes, I just built a "Release" build of Apache and gave it a try.
Since programs built with Visual Studio 2008 and its new run-time libraries require Windows XP or higher, I don't think I'm going to get too enthusiastic about VS9 yet. I usually build Apache on Windows 2000 as the "lowest common denominator" OS.
Has anyone found something in VS9 which is an improvement over VS8 for building Apache on Windows? Any better VS9-Apache performance measurements?
-tom-
p.s. I finally gave up on clicking "Yes - I meant what I requested..." buttons in Vista. I used TweakUAC to shut it all off. I don't disagree with the idea in principle, and I tried hard not to be biased against it - but after a few hours I hit my "can't tolerate this any more" point and it had to go. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 29 Jan '08 3:55 Post subject: |
|
|
Tom,
How did you get around the RC errors?
Gregg |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 29 Jan '08 4:25 Post subject: |
|
|
Um .. I found your notes on the VC8 problem. I'd of thought they would have fixed this (in a perfect world maybe).
However, is there an ascii equivalent to alt+0160?
I'll hate having to rid myself of VC6 someday. So few errors to deal with. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 29 Jan '08 16:46 Post subject: |
|
|
Alt+0160? Wow, that is an old note! I don't know of any ASCII equivalent to alt+0160.
Currently I am doing this before building Apache with the VS8 or VS9 IDE:1. Fix the line-endings in all the .dsp files using GNU zip and unzip: Code: | zip -R dsps.zip *.dsp *.dsw
unzip -a -o dsps.zip |
2. Fix the .dsp files using the APR cvtdsp perl program: Code: | .\srclib\apr\build\cvtdsp.pl -2005 |
3. Open Apache.dsw with VS8/VS9 and answer "Yes to All" to the "convert projects" question
4. Close the Apache.dsw solution in VS8/VS9 and open Apache.sln
5. Build ApacheThis seems to prevent the RC problems.
Note that you need to do steps 1. and 2. before you first open the project in Visual Studio. If you have already opened the project, you can Code: | DEL /Q /S *.vcproj* Apache.sln | and start from step 1.
-tom- |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 29 Jan '08 22:14 Post subject: |
|
|
tdonovan wrote: |
2. Fix the .dsp files using the APR cvtdsp perl program: Code: | .\srclib\apr\build\cvtdsp.pl -2005 |
|
Ahhhhhh .. this is probably why APR will not build, which of course then NOTHING builds.
Well, I'll hack on it again this coming weekend if I find time. Put another project on holding pattern.
P.S. I am doing this on Windows Web Server 2008 RC. I would then assume #define _WIN32_WINNT 0x0601 would be the correct number for what I am building on, since I am clueless here, I am probably wrong tho.
If I am using the 2003 R2 SDK, should it be changed to 0x0501 or 0x0502?
I'll also be interested in hearing what happens when all is said and done after Bill has his face to face with MS. Maybe after this we will begin seeing the Solution files included in the source distributions and can finally be done with all the hoop jumping for vc8/9.
http://marc.info/?l=apache-httpd-dev&m=120044326717186&w=2 |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 30 Jan '08 5:05 Post subject: |
|
|
Rather easy and it worked .. thank you.
My first successfull build on something other than VC6
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
HUH? |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 30 Jan '08 15:56 Post subject: |
|
|
re: "LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 "
This is a benign warning.
The /MACHINE option to the linker is not specified in the Apache project files, but "X86" is the value you want unless you are building for 64-bit Windows.
-tom- |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 30 Jan '08 21:14 Post subject: |
|
|
I know it is benign, Apache runs !!
Good to know though, now I know to add it/change it if needed. |
|
Back to top |
|