public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: frysk <frysk@sources.redhat.com>
Subject: enabling shared builds
Date: Thu, 13 Dec 2007 14:50:00 -0000	[thread overview]
Message-ID: <476146B5.7020606@redhat.com> (raw)

Hi,

At the moment frysk's build system links against its own libraries 
statically; doing this avoids any issues picking up the wrong library 
(for instance patchd vs installed libunwind et.al.), it also leads to 
large binaries (system libraries are linked dynamically).

I'm looking at switching to changing much of frysk to be dynamic but 
this leads to some in-tree vs ex-tree fun.  For instance, while in-tree 
test programs such as:
    ./TestRunner
and
    ./frysk-gui/frysk/gui/FryskGui
are built to find their libraries in the build tree (using RPATH stuff), 
programs intended to be run from the install tree such as:
    frysk-core/bindir/fhpd
will not.  Consequently, with shared enabled, programs such as fhpd will 
either fail to run or will run incorrectly (using previously installed 
libraries).

There are several ways to address this; and before making this change I 
think we should consider our options:

- wire build RPATH into binaries
Doesn't work: the installed binary could load incorrect build-tree 
solibs and vice versa

- rely on the developers to provide the path explicitly:
   LD_LIBRARY_PATH=<path-to-all-solibs> ./frysk-core/frysk/bindir/fhpd
(chance of us getting that right? 0 :-)

- provide a wrapper script that sets the environment vis:
   ./BuildTree ./frysk-core/frysk/bindir/fhpd

- have 'TestRunner' export LD_LIBRARY_PATH before invoking any utilities

- create two versions of the binary; one for build-tree and one for 
install tree

- switch to install-tree testing
Would mean breaking configure convention and set --prefix=.  On the 
other hand it would mean only testing one way.

Thoughts, other ideas.

Andrew

             reply	other threads:[~2007-12-13 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 14:50 Andrew Cagney [this message]
2007-12-13 15:02 ` Phil Muldoon
2007-12-13 21:38   ` Kris Van Hees
2007-12-13 23:19     ` Andrew Cagney
2007-12-13 23:58       ` Kris Van Hees
2007-12-13 16:13 ` Petr Machata

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=476146B5.7020606@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@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).