From: Jeff Sturm <jsturm@one-point.com>
To: Leslie Rohde <leslie@optitext.com>
Cc: rhug-rhats@sources.redhat.com
Subject: Re: where goith the static libs?
Date: Tue, 17 Feb 2004 17:06:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0402170955460.9250-100000@ops2.one-point.com> (raw)
In-Reply-To: <4031BDFB.2020109@optitext.com>
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
next parent reply other threads:[~2004-02-17 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4031BDFB.2020109@optitext.com>
2004-02-17 17:06 ` Jeff Sturm [this message]
2004-02-13 18:54 Leslie Rohde
2004-02-17 2:42 ` Jeff Sturm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0402170955460.9250-100000@ops2.one-point.com \
--to=jsturm@one-point.com \
--cc=leslie@optitext.com \
--cc=rhug-rhats@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).