[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Compiling ZLIB for svn 1.9.3 on Windows 7 using MSVC 2008

From: Cooke, Mark <mark.cooke_at_siemens.com>
Date: Thu, 31 Dec 2015 09:31:39 +0000

> -----Original Message-----
> From: Ivan Zhakov [mailto:ivan_at_visualsvn.com]
> Sent: 30 December 2015 18:59
>
> On 30 December 2015 at 19:06, Cooke, Mark <mark.cooke_at_siemens.com> wrote:
> > [Updates below]
> >
> >> -----Original Message-----
> >> From: Cooke, Mark [mailto:mark.cooke_at_siemens.com]
> >> Sent: 30 December 2015 15:56
> >>
> >> Folks,
> >>
> >> I was having issues compiling httpd and svn for use with Trac (via the
> >> python 2.7 bindings). I have compiled httpd 2.4.18 (with apr 1.5.1,
> >> apr-util 1.5.4, apr-iconv 1.2.1, openssl 1.0.2e, pcre 1.3.8 and
> >> mod_wsgi 4.4.21) and am now trying to compile svn.
> >>
> >> I noted the comments about zlibstat and ZLIB_WINAPI [1][2], so I edited:
> >> - zconf.h (added #define ZLIB_WINAPI)
> >> - bld_ml32.bat (added the /safeseh switch to both lines)
> >> ...and ran:
> >> - vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
> >>
> >> This seems to compile OK so I copied the zlibstat.lib up to the zlib root.
> >>
> >> [1] http://svn.apache.org/repos/asf/subversion/trunk/INSTALL (section E4
> >> ZLib)
> >> [2] http://www.tannerhelland.com/5076/compile-zlib-winapi-wapi-stdcall/
> >>
> >> Next I built SERF 1.3.8:
> >>
> >> > scons.py APR=\svn\httpd\srclib\apr APU=\svn\httpd\srclib\apr-util
> >> OPENSSL=\svn\httpd\srclib\openssl ZLIB=\svn\zlib
> >>
> >> ...which reports success so I unpacked sqlite-amalgamation-3090200 and
> >> called gen-make:
> >>
> >> gen-make.py -t vcproj --vsnet-version=2008 --with-httpd=D:\svn\httpd --
> >> with-openssl=d:\svn\httpd\srclib\openssl --with-serf=d:\svn\serf --with-
> >> sqlite=d:\svn\sqlite --with-swig=c:\programs\swig --with-zlib=d:\svn\zlib
> >>
> >> ...and tried to build using subversion_vcnet.sln which resulted in lots of
> >> errors such as "error LNK2001: unresolved external symbol _inflate" for a
> >> number of functions that all look like they come from zlib (plus some
> >> expected errors due to not having Perl etc.)
> >>
> >>
> >> In the end I got it running by _removing_ all the ZLIB_WINAPI defines in
> >> the Visual Studio project files and _not_ defining ZLIB_WINAPI in the
> >> main config file: this is the opposite of the advice in [1]!
> >>
> >> Does this sound correct? If so I think the INSTALL file needs updating.
> >
> > I get one test failure but it looks bad:-
> >
> > START: checksum-test.exe
> > PASS: checksum-test 1: checksum parse
> > PASS: checksum-test 2: checksum emptiness
> > PASS: checksum-test 3: zero checksum matching
> > svn_tests: E200006: Decompressed data doesn't match expected size or crc
> with blocksize 17: Found crc32=0x3a74e3ee, size=241883.
> > Verify your ZLib installation, as this should never happen
> > FAIL: checksum-test 4: zlib expansion test (zlib regression)
>
> Zlib has known bug in assembly optimized code. Just disable assembly
> optimized code in zlib and everything should be fine.

Thanks, Ivan, that makes sense. For the record this is how I got ZLib working for me:

Unpack archive to \svn\zlib
Search/Remove all instances of ZLIB_WINAPI from *.vcproj
> nmake -f win32\makefile.msc
> vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "ReleaseWithoutAsm|Win32"
Copy zlibstat.lib from \svn\zlib\contrib\vstudio\vc9\x86\ZlibStatReleaseWithoutAsm to \svn\zlib

Continue to build SERF etc.

I am now running the svn test suite and will post my complete crib notes if I get it all running.

~ Mark C
Received on 2015-12-31 10:32:10 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.