X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3BB9E329E5F for ; Fri, 24 Sep 2004 15:13:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76532-06 for ; Fri, 24 Sep 2004 14:12:59 +0000 (GMT) Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by svr1.postgresql.org (Postfix) with ESMTP id E11E6329E54 for ; Fri, 24 Sep 2004 15:13:01 +0100 (BST) Received: from dunslane.net (cpe-024-211-141-025.nc.rr.com [24.211.141.25]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id i8OELKL06891; Fri, 24 Sep 2004 09:21:20 -0500 Message-ID: <41542B6B.3080607@dunslane.net> Date: Fri, 24 Sep 2004 10:12:59 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Hallgren Cc: pgsql-hackers@postgresql.org Subject: Re: Use of zlib References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/771 X-Sequence-Number: 59337 Thomas Hallgren wrote: > Problem: > PL/Java use a JVM. On some platforms and with some JVM's (Sun's in > particular) a libzip.so is bundled that contains a 1.1.3 version of > functions also provided in zlib (why they do this is beyond me, but > they do so I'll have to live with it). PostgreSQL is linked with zlib > by default. This resuls in a conflict which resuls in a JVM crash. > > I can circumvein this crash by using LD_PRELOAD to force a load of the > JVM bundled libzip.so but I suspect that might result in a crash as > soon as PostgreSQL calls on zlib to do something. It's of course > possible to configure postgresql with --without-zlib also provided you > have accesst o the source. > > Question: > From what I can understand from the documentation, the only utility in > PostgreSQL that actually uses zlib is pg_dump? If so, why is the > postgres process linked with -lz? > > I did a small experiment by installing binutils 2.15 and adding -Wl,--as-needed to the LDFLAGS, as Tom had suggested might be useful. This seemed to work quite well and trimmed back the needed libs quite a bit. However, when you configure --with-openssl, libz is again linked in. Not sure where that leaves us. cheers andrew