[Zlib-devel] More problems with z_off64_t

Paul Marquess Paul.Marquess at ntlworld.com
Tue Apr 6 19:13:22 EDT 2010


Hi folks,

I maintain the Perl interface to zlib. Recently I updated it to use 1.2.4
and have now had a few reports of build failures on Solaris. Here are the
gory details.

gcc -B/usr/ccs/bin/ -c -I./zlib-src -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O 
-DVERSION=\"2.025\" -DXS_VERSION=\"2.025\" -fPIC
"-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE" -DGZIP_OS_CODE=3
-DUSE_PPPORT_H adler32.c
adler32.c:12: error: syntax error before "off64_t"
adler32.c: In function `adler32_combine_':
adler32.c:134: error: syntax error before "off64_t"
adler32.c: In function `adler32_combine64':
adler32.c:166: error: syntax error before "off64_t"
*** Error code 1
make: Fatal error: Command failed for target `adler32.o'

The build for zlib is non-standard in Perl. Firstly, it only includes a
sub-set of the zlib sources - Perl handles all the file IO for zlib, so it
don't need any of the gz* files. Secondly, it don't use the zlib
Configure/makefile at all. With 1.2.3 this worked fine but not with 1.2.4. I
can easily get around the build problem by modifying the zlib source, but
I'd prefer not to go down that path unless I have to.

I notice that someone has suggested having the ZLIB_LARGEFILE64_SOURCE
symbol instead of _LARGEFILE64_SOURCE in the code. That would certainly make
it really easy for me to disable the 64-bit code for this, admittedly,
non-standard use-case.

Paul





More information about the Zlib-devel mailing list