You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2006/10/28 23:19:36 UTC

[PATCH] Fix VS 2005 with zlib 1.2.3

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

Re: [PATCH] Fix VS 2005 with zlib 1.2.3

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 10/30/06, Branko Čibej <br...@xbc.nu> wrote:
> One can't actually pass --enable-ml to gen-make.py until it gets added
> to the list of options there, but that's a one-liner (plus docs).

Oh, bugger.  I went looking for the list of options in
build/generator/ and forgot that it's only in gen-make.py at the
top-level.  *sigh*

Fixed in r22169.

Thanks.  -- justin

Re: [PATCH] Fix VS 2005 with zlib 1.2.3

Posted by Branko Čibej <br...@xbc.nu>.
Justin Erenkrantz wrote:
> On 10/30/06, Branko Čibej <br...@xbc.nu> wrote:
>> If you want to avoid using ML, add an option to gen-make.py (and change
>> the default to not search for ML, for all I care) -- don't just rip out
>> code because it doesn't suite your particular setup.
>
> Committed in r22162.  (Use --enable-ml to reactivate it for your setup.)
>
> Thanks!  -- justin

Thanks, this looks marvelous! It's also a much smaller patch. :)

One can't actually pass --enable-ml to gen-make.py until it gets added 
to the list of options there, but that's a one-liner (plus docs).

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Fix VS 2005 with zlib 1.2.3

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On 10/30/06, Branko Čibej <br...@xbc.nu> wrote:
> If you want to avoid using ML, add an option to gen-make.py (and change
> the default to not search for ML, for all I care) -- don't just rip out
> code because it doesn't suite your particular setup.

Committed in r22162.  (Use --enable-ml to reactivate it for your setup.)

Thanks!  -- justin

Re: [PATCH] Fix VS 2005 with zlib 1.2.3

Posted by Branko Čibej <br...@xbc.nu>.
Justin Erenkrantz wrote:
> 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
>   

Yes, lots of objections ... it took me quite a while to figure out how 
to find ML, etc., and this works just great with our (still-default) 
MSVC6 -- which doesn't come with ML -- and the free ML clone you can get 
from the 'net.

If you want to avoid using ML, add an option to gen-make.py (and change 
the default to not search for ML, for all I care) -- don't just rip out 
code because it doesn't suite your particular setup.

Huh, I remember I used to wish I could rip out Unix-specific code out of 
Subversion, to make porting to Windows easier. :)

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Fix VS 2005 with zlib 1.2.3

Posted by Sander Striker <st...@striker.nl>.
Justin Erenkrantz wrote:
> 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

Nope, +1.  FWIW, when I tried the build I made sure to run gen-make in a shell
without the usual vs vars set, so that ml would not be found.


sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org