[Python-Dev] 2.1c1 "make test" failures on SGI Irix
Mark Favas
m.favas@per.dem.csiro.au
Sun, 15 Apr 2001 21:08:11 +0800
Guido van Rossum wrote:
>
> [Mark Favas]
> >
> > The previously reported failure of test_zlib looks as though it is due
> > to Irix supplying as standard zlib version 1.0.4, whereas the zlib
> > module requires at least version 1.1.3. This won't be the only platform
> > where an incompatible zlib is system-supplied and built by default. An
> > autoconf test for the right version seems indicated (unless setup.py can
> > just extract the version string from <wherever>/zlib.h - it's there as
> > #define ZLIB_VERSION "1.0.4" on Irix, and #define ZLIB_VERSION "1.1.3"
> > on Solaris 8 (both in /usr/include)).
>
> I'll leave that to Andrew, I have no understanding of setup.py.
> (Unfortunately Andrew seems out of town. :-( )
A patch to setup.py that works on the SGI where the version of zlib.h in
/usr/include is too low, and also works on my Tru64 box where the
version in /usr/local/include is just right follows:
(I'll also submit this to sourceforge.)
*** setup.py.orig Sun Apr 15 20:59:34 2001
--- setup.py Sun Apr 15 21:00:53 2001
***************
*** 449,457 ****
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.cdrom.com/pub/infozip/zlib/
! if (self.compiler.find_library_file(lib_dirs, 'z')):
! exts.append( Extension('zlib', ['zlibmodule.c'],
! libraries = ['z']) )
# Interface to the Expat XML parser
#
--- 449,471 ----
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.cdrom.com/pub/infozip/zlib/
! zlib_inc = find_file('zlib.h', [], inc_dirs)
! if zlib_inc is not None:
! zlib_h = zlib_inc[0] + '/zlib.h'
! version = '"0.0.0"'
! version_req = '"1.1.3"'
! fp = open(zlib_h)
! while 1:
! line = fp.readline()
! if not line:
! break
! if line.find('#define ZLIB_VERSION', 0) == 0:
! version = line.split()[2]
! break
! if version >= version_req:
! if (self.compiler.find_library_file(lib_dirs, 'z')):
! exts.append( Extension('zlib', ['zlibmodule.c'],
! libraries = ['z']) )
# Interface to the Expat XML parser
#
--
Mark Favas - m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA