--with-zlib=system supposed to work?

Erik Joelsson erik.joelsson at oracle.com
Tue Mar 5 16:07:56 UTC 2013


I just tried it on my machine (Ubuntu 10.10) and it works. I can imagine 
it being sensitive to the exact version of zlib on the system though. 
Doing this, my resulting libzip.so is linked against the system libz:

$ ldd images/j2sdk-image/jre/lib/amd64/libzip.so
     libz.so.1 => /lib/libz.so.1 (0x00007f7477b4a000)
(cutting out the other libs)

/Erik

On 2013-03-05 16:34, Alan Bateman wrote:
>
> I've been meaning to ask this for a while but is --with-zlib=system 
> supposed to work?
>
> With the old build then there is a build variable to use the system 
> zlib but it only worked (to my knowledge) when doing dynamic linking 
> of C++ runtime.
>
> Attached is what I get currently and maybe we have to look at the 
> pack200 code to resolve this but I was just curious if this configure 
> optional has been used successfully or not. I tried it with 
> --with-stdc++lib=dynamic too.
>
> -Alan.
>
>
> /u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/zip.o: 
> In function `jar::deflate_bytes(bytes&, bytes&)':
> zip.cpp:(.text+0x71a): undefined reference to `deflateInit2_'
> zip.cpp:(.text+0x7b6): undefined reference to `deflate'
> zip.cpp:(.text+0x7d0): undefined reference to `deflateEnd'
> zip.cpp:(.text+0x7e4): undefined reference to `deflateEnd'
> zip.cpp:(.text+0x7f6): undefined reference to `deflate'
> /u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/zip.o: 
> In function `jar::addJarEntry(char const*, bool, int, bytes&, bytes&)':
> zip.cpp:(.text+0x84e): undefined reference to `crc32'
> zip.cpp:(.text+0x910): undefined reference to `crc32'
> zip.cpp:(.text+0x926): undefined reference to `crc32'
> /u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/zip.o: 
> In function `gunzip::free()':
> zip.cpp:(.text+0xa17): undefined reference to `inflateEnd'
> /u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/zip.o: 
> In function `read_input_via_gzip(unpacker*, void*, long, long)':
> zip.cpp:(.text+0xa96): undefined reference to `inflate'
> zip.cpp:(.text+0xb0a): undefined reference to `inflate'
> /u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/zip.o: 
> In function `gunzip::start(int)':
> zip.cpp:(.text+0xd03): undefined reference to `inflateInit2_'
> collect2: ld returned 1 exit status
> make[2]: *** 
> [/u/alanb/ws/tl/build/linux-x86_64-normal-server-release/jdk/objs/unpackexe/unpack200] 
> Error 1
> make[1]: *** [launchers-only] Error 2
> make: *** [jdk-only] Error 2



More information about the build-dev mailing list