Bug 37855 - mod_deflate causes build failure on Win32
Summary: mod_deflate causes build failure on Win32
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.2.0
Hardware: Other other
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FAQ
Depends on:
Blocks:
 
Reported: 2005-12-09 19:07 UTC by Jerry Baker
Modified: 2005-12-09 22:22 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Baker 2005-12-09 19:07:22 UTC
Using the Apache 2.2.0 rev2 Windows source ZIP file, building Apache with
mod_deflate bombs out with the following error:

NMAKE  -f mod_deflate.mak CFG="mod_deflate - Win32 Release" RECURSE=0
.\Release\mod_deflate.so
Microsoft (R) Program Maintenance Utility   Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
 tempfile.bat 
 rc.exe /l 0x409 /fo".\Release\mod_deflate.res" /d "NDEBUG" .\mod_deflate.rc
 cl.exe @C:\Temp\nma04736.
mod_deflate.c
 link.exe @C:\Temp\nmb04736.
LINK : fatal error LNK1181: cannot open input file "zlib.lib"
NMAKE : fatal error U1077: 'link.exe' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio\VC98\BIN\NMAKE.exe"' : return code '0x2'
Stop.
Error executing NMAKE.

httpd.exe - 3 error(s), 15 warning(s)
Comment 1 William A. Rowe Jr. 2005-12-10 05:24:03 UTC
No, this isn't a failure.  Build zlib in place first.

We now use the win32/makefile.msc results, so you build that, we
link in zlib.lib to bind to zlib1.dll.

Comment 2 Jerry Baker 2005-12-10 05:35:04 UTC
That would be convenient if zlib built that way, but it doesn't. 

LIB : fatal error LNK1181: cannot open input file "zlib_L.lib"
NMAKE : fatal error U1077: 'lib' : return code '0x49d'
Stop.

This is marked as a bug that appears as a FAQ. Which FAQ contains this subject
so I can research further?
Comment 3 William A. Rowe Jr. 2005-12-10 06:50:10 UTC
I'm guessing you are trying a debug build?

It's important to be sure you link against a debug build of libz,
and visa versa if you are building a release.

I'm not on a win32 box at the moment, but will review this when
I have one at hand.

FAQ indicates this -will- become a frequently asked question, and
that this is the bug thread that tracks the answers.  Thank you
for submitting a clearly defined and documented issue :)
Comment 4 Jerry Baker 2005-12-10 06:58:01 UTC
OK. The problem was that when you build zlib 1.2.3 as instructed, the zlib.lib
is not located where Apache wants it to be. You have to move the zlib.lib file
into the zlib root. Then it works fine.

New MSVC++ build instructions should read:

1. Download zlib and open the zlib.dsw project file in MSVC++.
2. Switch the "Active Configuration" to "WIN32 LIB Release".
3. Build zlib.lib.
4. Locate the newly-built zlib.lib and place it in the root directory of the 
   zlib distribution (i.e., same directory as zlib.h).
5. Copy the zlib directory to the Apache srclib directory.
6. Build Apache.
Comment 5 William A. Rowe Jr. 2005-12-10 07:22:06 UTC
Unfortunately, this is at odds with the methods in their makefile.msc
file which deposits the .lib (and .dll file) in the root.  Following
-their- README to build the project results in the library residing
in the right place.  Obviously this is an issue, one which I'll bring
to the attention of zlib's developers.