PING: [PATCH FOR REVIEW] System Zlib Support

Alan Bateman Alan.Bateman at
Fri Aug 10 18:55:59 UTC 2012

On 10/08/2012 18:40, Andrew Hughes wrote:
> ----- Original Message -----
>> Hi Andrew
>> Alan mentioned the other day that the build (with your latest patch,
>> with zlib-dev) failed at pack200
>> when he tried to turn it on on linux. Can your double check on your
>> system?
> What kind of failure?  All webrevs I've posted pass a complete build here,
> and we've been using system zlib for years as previously mentioned, so I'm
> surprised by this.
I grabbed your patch a few days ago and did a build+test job on all 
platforms (Linux/Solaris/Mac/Windows) and didn't see any issues. This 
was of course using the defaults, I didn't set SYSTEM_ZLIB explicitly.

However I did see an issue on Ubuntu 12.0.4 (32-bit) with 
SYSTEM_ZLIB=true. Attached is the tail of the log. I haven't had time to 
look at it but I do see that is built as expected (ldd shows 
it is linked to libz). The build failure is with unpack200 as it uses 
the the zlib functions. Building with SYSTEM_ZLIB=false is fine on this 


rm -f ../../../../../build/linux-i586/bin/unpack200
rm -f 
/bin/cp mapfile-vers-unpack200 
/usr/bin/gcc  -O2 -DPRODUCT -fPIC -DCC_NOEX -W -Wall  -Wno-unused 
-Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_ENDIAN -DFULL  
-Xlinker -O1 -Xlinker -version-script=mapfile-vers  
-Wl,--hash-style=both -Xlinker -z -Xlinker origin -Xlinker -rpath 
-Xlinker \$ORIGIN  -Xlinker -z -Xlinker defs 
-L../../../../../build/linux-i586/lib/i386 -Wl,    
-lz -lc 
-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -o 
In function `jar::deflate_bytes(bytes&, bytes&)':
zip.cpp:(.text+0x79b): undefined reference to `deflateInit2_'
zip.cpp:(.text+0x828): undefined reference to `deflate'
zip.cpp:(.text+0x842): undefined reference to `deflateEnd'
zip.cpp:(.text+0x854): undefined reference to `deflateEnd'
zip.cpp:(.text+0x87c): undefined reference to `deflate'
In function `jar::addJarEntry(char const*, bool, int, bytes&, bytes&)':
zip.cpp:(.text+0x8d2): undefined reference to `crc32'
zip.cpp:(.text+0x9d1): undefined reference to `crc32'
zip.cpp:(.text+0x9ee): undefined reference to `crc32'
In function `gunzip::free()':
zip.cpp:(.text+0xb33): undefined reference to `inflateEnd'
In function `read_input_via_gzip(unpacker*, void*, long long, long long)':
zip.cpp:(.text+0xbfe): undefined reference to `inflate'
In function `gunzip::start(int)':
zip.cpp:(.text+0xf35): undefined reference to `inflateInit2_'
collect2: ld returned 1 exit status

More information about the core-libs-dev mailing list