From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13042 invoked by alias); 17 Feb 2004 17:06:03 -0000 Mailing-List: contact rhug-rhats-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rhug-rhats-owner@sources.redhat.com Received: (qmail 13020 invoked from network); 17 Feb 2004 17:06:02 -0000 Received: from unknown (HELO ops2.one-point.com) (216.234.116.146) by sources.redhat.com with SMTP; 17 Feb 2004 17:06:02 -0000 Received: from localhost (jsturm@localhost) by ops2.one-point.com (8.11.6/8.11.6) with ESMTP id i1HH64V11801; Tue, 17 Feb 2004 12:06:04 -0500 Date: Tue, 17 Feb 2004 17:06:00 -0000 From: Jeff Sturm To: Leslie Rohde cc: rhug-rhats@sources.redhat.com Subject: Re: where goith the static libs? In-Reply-To: <4031BDFB.2020109@optitext.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-02/txt/msg00010.txt.bz2 On Mon, 16 Feb 2004, Leslie Rohde wrote: > the first thing to notice is that most java programs do > enough late binding that you can not depend on linking > to include everything, so doing -Wl,-whole-archive when > building the final app is pretty much a given. (and don't > forget to turn it off before the std libs are tacked on, 'cause > that _really_ doesn't work!) Right. I suspect many gcj users avoid static libs for this reason. > what i am really trying to do is to build a _standalone_ > xml-savvy application (file size is a non-issue) that i can copy > to an arbitrary linux box (rh7.3 or later) without vetting what > versions of the gcc/gcj runtime exist. the assumption is that i do > _not_ have admin priv, so i can not do an 'install' per se. Well... you don't need admin privs to install/use a DSO in a user directory. Perhaps a tarball of executable + DSOs doesn't meet your standalone requirement though. > as a minimum, i will link statics of xerces and xalan plus a > couple non-rhug packages (nekohtml being one). fine, > but i also need to separate myself from libgcj/libgcc and on > that i have had no joy using -static and -static-libgcc in any > combination. i just started trying explicit includes of the > static versions of the standard libs in conjunction with > -nostdlib and friends, but have not quite found the right > arrangement of runes. am i on the right track? what > (known) land mines exist? If you require no dependencies on libgcj.so or libgcc_s.so, it'll be far simpler to configure/build gcj/libgcj with --disable-shared than dealing with -nostdlib and all the required libraries (IMO, having done it both ways myself) especially if you need a portable makefile. I did just that with an uberbaum tree on RH 7.3, to create an executable that runs on any Red Hat release >= 7.3. (If you don't use an uberbaum or otherwise unified GCC tree, make sure you get up-to-date binutils from somewhere. The gas distributed with RH 7.3 is no longer sufficient to build the 3.4 branch, for instance.) Good luck, Jeff