logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: Compiling Apache 2.2.12 on Windows XP with VC6.0 SP5+VCPP5
Author
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Fri 07 Aug '09 0:28    Post subject: Compiling Apache 2.2.12 on Windows XP with VC6.0 SP5+VCPP5 Reply with quote

Has anyone given this a shot yet? I noticed the binaries aren't appearing on ASF so I gave it a shot. It seems compiling via the IDE as per their instructions works but I can't get the command line to work.

As per the Subject, I'm using Windows XP Professional SP3, Visual Studio 6.0 with Service Pack 5 and the C++ Preprocessor Pack with Microsoft Platform SDK (Feb 2003). I also have Activestate Perl 5.10 and the GNU utilities for awk and the correct version of bison.

If I attempt to build using the ASF command line instructions, the build dies trying to build the ODBC driver and the OpenSSL 0.9.8.K build throws this:
Code:
        cl /Fotmp32dll\cversion.obj  -Iinc32 -Itmp32dll -I..\zlib  /MD /Ox /O2 /
Ob2 /W3 /WX /Gs0 /GF /Gy /nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -
DL_ENDIAN -DDSO_WIN32 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DO
PENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DAES_ASM -DBN_ASM -DOPENSSL_BN_ASM_PART_WO
RDS -DOPENSSL_BN_ASM_MONT -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DOPENSSL_USE_APPLIN
K -I. /Fdout32dll -DOPENSSL_NO_IDEA -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOP
ENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_JPAKE -DOPENSSL_NO_
CAPIENG -DOPENSSL_NO_KRB5 -DZLIB -DOPENSSL_NO_DYNAMIC_ENGINE -D_WINDLL  -DOPENSS
L_BUILD_SHLIBCRYPTO -DMK1MF_BUILD -DMK1MF_PLATFORM_VC_WIN32 -c .\crypto\cversion
.c
cversion.c
.\crypto\cversion.c(83) : error C2220: warning treated as error - no object file
 generated
.\crypto\cversion.c(83) : warning C4129: 'z' : unrecognized character escape seq
uence
.\crypto\cversion.c(85) : warning C4129: 'z' : unrecognized character escape seq
uence
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


However the test seems to "passed all tests". Yet, if I go on to build Apache, I end up with this:

Code:
        cl.exe /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "../apr/include" /
I "./include/private" /I "../apr-iconv/include" /I "./dbm/sdbm" /I "./xml/expat/
lib" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "API_DECLARE
_STATIC" /D "APU_USE_SDBM" /D "HAVE_SQL_H" /D "XML_STATIC" /D "WIN32" /D "_WINDO
WS" /Fo".\LibR\\" /Fd".\LibR\aprutil-1" /FD /c .\dbd\apr_dbd_odbc.c
apr_dbd_odbc.c
NMAKE : fatal error U1073: don't know how to make '"nzerror.h"'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MIAF9D~1\VC98\BIN\NMAKE.EXE' : return co
de '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MIAF9D~1\VC98\BIN\NMAKE.EXE' : return co
de '0x2'
Stop.
.. DONE


Any ideas what I'm doing wrong? I'm pretty sure I have all my paths set correctly, including those for MySQL, Perl and GNUWIN32. I am trying to build Apache with OpenSSL 0.9.8K instead of the I version they have and I am enabling MySQL with DBD_LIST="mysql", but other than that I'm going line by line from their docs, ie.:

For zlib:
Code:
NMAKE -f win32\Makefile.msc
NMAKE -f win32\Makefile.msc test


zlib seems to build fine and passes the tests.

For openssl:
Code:
PERL Configure no-mdc2 no-rc5 no-idea enable-zlib VC-WIN32 -I..\zlib
CALL ms\do_masm.bat
NMAKE -f ms\ntdll.mak


-I..\zlib is the path to the zdll.lib file.

I have a feeling I'm missing something the ASF docs aren't eluding to?
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Fri 07 Aug '09 20:04    Post subject: Reply with quote

Ok, thanks to Tom's write up: http://www.apachelounge.com/viewtopic.php?t=1992

I was able to get past the OpenSSL build. I actually found another way around the zlib issue by simply renaming it, but using the --with-zlib-lib switch works better. Wink

Now if I can just get past the Apache build. The nzerror.h is actually part of the oracle drivers, not the ODBC. Since I'm not asking it to load those, I'm not sure why it would. My DBD_LIST="mysql" doesn't have oracle listed.

I also attempted it using the 2003 R2 SDK but got the same error. Also tried using NASM for OpenSSL instead of MASM, but again the same error. I swear I'm overlooking something stupid..
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 08 Aug '09 13:51    Post subject: Reply with quote

FWIW, I have had no success with VC6 sp5 on XP. I do not know If I would have the same on 2000, I do know someone who does have luck with that combo.

I do have luck with sp6 however. I'm not saying go download and install it, because you lose that C++ Preprocessor Pack when you install sp6. You lose MASM I know for sure, anything else I cannot attest to. I save out MASM separate before I go to sp6. I also have NASM which I use for OpenSSL, but there are still plenty of build instructions out there that use MASM which is why I keep it laying around. There is however MASM 8 out there for the taking at the MS downloads.

My suggestion would be trying to compile just Apache with no Openssl or zlib. If it still fails, you may have to bite the bullet and go to sp6, but do so with the knowledge above.

And --with-zlib-lib looks like the unix commands to go with their brand of configure script.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sat 08 Aug '09 16:52    Post subject: Reply with quote

It looks like an incorrect dependency file was included in the Windows source .zip file for 2.2.12. This file, aprutil.dep, incorrectly says that apr-util depends on all the dbd drivers. I don't think it is worth filing a bug for this, since httpd-2.2.13 is so close.

You can delete this file will no ill effects, other than this will cause VC6 to always re-build apr-util whenever you re-build httpd - even if no apr-util files have been changed.

I could build 2.2.12 OK using VC6/MASM command-line with these commands:
    ZLIB
    Code:
    ML /coff /Zi /c contrib\masm686\match.asm
    NMAKE -f win32\Makefile.msc  LOC="-DASMV" OBJA="match.obj"
    example.exe

    OPENSSL
    Code:
    PERL Configure VC-WIN32  enable-camellia  disable-idea
    ms\do_masm
    NMAKE -f ms\ntdll.mak
    CD out32dll
    REM we didn't build the "idea" cipher - so substitute the "engine" test for the "idea" test
    COPY enginetest.exe ideatest.exe
    ..\ms\test.bat

    HTTPD
    Code:
    DEL srclib\apr-util\aprutil.dep
    SET INCLUDE=%INCLUDE%;C:\Program Files\MySQL\MySQL Server 5.1.30\include
    SET LIB=%LIB%;C:\Program Files\MySQL\MySQL Server 5.1.30\lib\opt
    NMAKE -f Makefile.win DBD_LIST="mysql" INSTDIR=C:\Apache2 _apacher
    NMAKE -f Makefile.win DBD_LIST="mysql" INSTDIR=C:\Apache2 installr

Note that I have MySQL installed in C:\Program Files\MySQL\MySQL Server 5.1.30.

I prefer to build OpenSSL with Camellia support (Camellia is FireFox's first choice for SSL cipher) and without Zlib support. All current browsers will block using SSL-compression, so it makes no difference to browsers whether you build it into OpenSSL. If you proxy from one Apache server to another Apache server, and both Apache servers have SSL-compression enabled - then they will use it. This compresses already-compressed files, like jpg's and zip's. They don't get any smaller, but they will use up a lot of CPU trying. Zlib works much better in mod_deflate, where you can choose which files get compressed.

httpd 2.2.13 will be released in a few days (maybe in a few hours - I haven't been following the mailing lists closely). This fixes the CVE-2009-2412 vulnerability, and also contains a fix for bug 36780 which may affect some folks who use mod_deflate. Perhaps you will want to just wait for 2.2.13 and try again.

-tom-
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sat 08 Aug '09 21:33    Post subject: Reply with quote

glsmith wrote:
FWIW, I have had no success with VC6 sp5 on XP. I do not know If I would have the same on 2000, I do know someone who does have luck with that combo..


Yeah, I'm just trying to mirror the build environment ASF uses to compile a VC6 build using the docs on their site. I read somewhere that most use the VC6 with SP5 and MASM. Since I couldn't get it to compile with SP6, I reverted back to SP5 on a clean system install and tried again.

glsmith wrote:
There is however MASM 8 out there for the taking at the MS downloads.


Does that work with VC6? I was assuming that was for VC 2008.

glsmith wrote:
My suggestion would be trying to compile just Apache with no Openssl or zlib. If it still fails, you may have to bite the bullet and go to sp6, but do so with the knowledge above.


I think I'm going to try to fix the issue if possible. It has to be either something I'm doing wrong or there is a bug in the docs or the app itself. Smile
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sat 08 Aug '09 22:20    Post subject: Reply with quote

tdonovan wrote:
It looks like an incorrect dependency file was included in the Windows source .zip file for 2.2.12. This file, aprutil.dep, incorrectly says that apr-util depends on all the dbd drivers. I don't think it is worth filing a bug for this, since httpd-2.2.13 is so close.


Ahh, that would explain why someone suggested setting NO_EXTERNAL_DEPS=1, which did seem to allow it to get through the process.

tdonovan wrote:
You can delete this file will no ill effects, other than this will cause VC6 to always re-build apr-util whenever you re-build httpd - even if no apr-util files have been changed.


Thanks Tom, I'll give that a shot.

tdonovan wrote:
Zlib works much better in mod_deflate, where you can choose which files get compressed.


I wonder why the docs suggest using zlib? Or maybe it's just an example in case you wish to do that.
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sun 09 Aug '09 1:07    Post subject: Reply with quote

Thanks Tom, that did indeed work. My build script now covers VC6, VC2005 and VC2008 builds. Now I just need to test them all to make sure each build works properly.

tdonovan wrote:
I don't think it is worth filing a bug for this, since httpd-2.2.13 is so close.


Yep, it's already out. I just got the src and bin. I guess I'll try the script out on it as well and let you know. Again, thanks for the help. Now we just need ASF to fix their docs. Wink
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sun 09 Aug '09 2:09    Post subject: Reply with quote

Ok, while Tom's proceedure works great for 2.2.12, it doesn't seem to work for 2.2.13. The zlib and openssl builds go through fine, but when I go to build Apache I'm getting this (doesn't matter whether or not I delete aprutil.dep):

Code:
        if exist .\Release\apr_dbd_mysql-1.dll.manifest mt.exe -manifest .\Relea
se\apr_dbd_mysql-1.dll.manifest -outputresource:.\Release\apr_dbd_mysql-1.dll;2
        echo Helper for Post-build step > ".\Release\postbld.dep"
        cd ..
        cd dbm
        for %d in () do  NMAKE -nologo -f apr_dbm_%d.mak   CFG="apr_dbm_%d - Win
32 Release" RECURSE=0
NMAKE : fatal error U1077: 'for' : return code '0x3020302'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MIAF9D~1\VC98\BIN\NMAKE.EXE' : return co
de '0x2'
Stop.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 09 Aug '09 2:33    Post subject: Reply with quote

Been there, done that and filed a bug report for it
https://issues.apache.org/bugzilla/show_bug.cgi?id=47659

report includes a patch to fix it
Back to top
Mitron



Joined: 04 Jan 2006
Posts: 63

PostPosted: Sun 09 Aug '09 7:44    Post subject: Reply with quote

glsmith wrote:
Been there, done that and filed a bug report for it
https://issues.apache.org/bugzilla/show_bug.cgi?id=47659

report includes a patch to fix it


Ok, that worked. Thanks Greg. Smile

One other thing I will mention, just because I'm anal, if you view the resulting Apache22\bin folder in Tiles view (or view the properties of), the apr_dbd_odbc_-1.dll and the openssl.exe files are the only two that don't have version information. While I don't think that's a problem, it was noticable. Smile
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sun 09 Aug '09 10:02    Post subject: Reply with quote

Let's go all the way, nor does mod_deflate or mod_ssl
they are built outside of the box and no one chose to push the RC file into the build I muster. Openssl kind of surprises me since the DLLs do have it.

Now, really want to be shocked? Shocked take a deep look at your bin/zlib1.dll .. which is it? 1.2.2 or 1.2.3? hard to know when it lists both if you did not gather and build yourself.
Back to top


Reply to topic   Topic: Compiling Apache 2.2.12 on Windows XP with VC6.0 SP5+VCPP5 View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads