public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* enabling shared builds
@ 2007-12-13 14:50 Andrew Cagney
  2007-12-13 15:02 ` Phil Muldoon
  2007-12-13 16:13 ` Petr Machata
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Cagney @ 2007-12-13 14:50 UTC (permalink / raw)
  To: frysk

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-13 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-13 14:50 enabling shared builds Andrew Cagney
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

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).