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

[PATCH] Fix VS 2005 with zlib 1.2.3

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2006-10-29 01:19:36 CEST

zlib 1.2.3 doesn't ship with assembler files that are compatible with VS 2005.
So, the build just fails with errors when we try to build Subversion against
it. There are patches on the zlib list to fix the assembler issues, but I
really prefer us to work out of the box and not force people to go on wild
goose chases.

Anyway, the patch below fixes that. With this patch, trunk of svn and serf, I
can create a build (three days after I started trying!).

Any objections to applying? -- justin

---
Fix compiles with zlib 1.2.3 and Visual Studio 2005.
This removes half-hearted attempts to use an assembler for our zlib compiles as
it doesn't work with VC 2005 (without custom patches) and is of debatable
benefit to older VC versions - so just use the C versions.
* build/generator/gen_win.py
  (__init__): Do not call _find_ml and don't pass use_ml to the ezt engine.
  (_find_ml): Remove.
* build/generator/build_zlib.ezt
  (use_ml): Remove conditional clause.
Index: build/generator/build_zlib.ezt
===================================================================
--- build/generator/build_zlib.ezt	(revision 22150)
+++ build/generator/build_zlib.ezt	(working copy)
@@ -11,16 +11,6 @@
 @rem **************************************************************************
 cd /D [zlib_path]
 set exitcode=0
-[if-any use_ml]
-@rem **************************************************************************
-@rem Compile ASM sources with ML
-set ASFLAGS=-nologo -Zi -coff
-set LOC=-DASMV -DASMINF
-set OBJA=gvmat32c.obj gvmat32.obj inffas32.obj
-set ASM_OPTS=ASFLAGS="%ASFLAGS%" LOC="%LOC%" OBJA="%OBJA%"
-if not exist gvmat32c.c    copy contrib\masmx86\gvmat32c.c .
-if not exist gvmat32.asm   copy contrib\masmx86\gvmat32.asm .
-if not exist inffas32.asm  copy contrib\masmx86\inffas32.asm .[end]
 
 if "%1" == "release" goto release
 if "%1" == "debug" goto debug
Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py	(revision 22150)
+++ build/generator/gen_win.py	(working copy)
@@ -144,10 +144,6 @@
     # Find the installed SWIG version to adjust swig options
     self._find_swig()
 
-    # Look for ML
-    if self.zlib_path:
-      self._find_ml()
-      
     # Find neon version
     if self.neon_path:
       self._find_neon()
@@ -181,8 +177,7 @@
 
     # Generate the build_zlib.bat file
     if self.zlib_path:
-      data = {'zlib_path': os.path.abspath(self.zlib_path),
-              'use_ml': self.have_ml and 1 or None}
+      data = {'zlib_path': os.path.abspath(self.zlib_path) }
       bat = os.path.join('build', 'win32', 'build_zlib.bat')
       self.write_with_template(bat, 'build_zlib.ezt', data)
 
@@ -979,21 +974,6 @@
       fp.close()
     return ''
 
-  def _find_ml(self):
-    "Check if the ML assembler is in the path"
-    fp = os.popen('ml /help', 'r')
-    try:
-      line = fp.readline()
-      if line:
-        msg = 'Found ML, ZLib build will use ASM sources'
-        self.have_ml = 1
-      else:
-        msg = 'Could not find ML, ZLib build will not use ASM sources'
-        self.have_ml = 0
-      sys.stderr.write('%s\n' % (msg,))
-    finally:
-      fp.close()
-
   def _find_neon(self):
     "Find the neon version"
     msg = 'WARNING: Unable to determine neon version\n'
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 29 01:19:48 2006

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

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