[cgma-dev] Linking to iGeom

Jason Kraftcheck kraftche at cae.wisc.edu
Tue Jan 12 14:21:39 CST 2010


Jed Brown wrote:
> Note that overlinking should be avoided when working with shared libs,
> e.g. link with *only* -L/path/to/lib -liMesh (with
> -Wl,-rpath=/path/to/lib when you want it).  With static libs, you have
> no choice but to link the recursive dependencies, but then RPATH is
> irrelevant.  It would be nice to have a MOAB/CGM configure option to
> install with RPATH, there is probably a way to have autotools do the
> RPATH rewriting (so they work from the build directory too).
> 

Does it not do this now?  It should happen automatically for a shared
library version of MOAB and for the installed utility programs.  There is no
concept of an RPATH for a static library.  The only way to associate an
RPATH in that case is to use some other file format (e.g. the libtool
wrapper libraries suffixed with .la).

> On my system, IGEOM_LDFLAGS includes lots of system paths which can
> cause order dependence and breakage (because these paths should be
> searched last, but will be searched earlier when given explicitly).

It isn't supposed to.  Are you specifying system paths to the configure
script?  For example, if hdf5 is installed in /usr or /usr/local, then it
should be sufficient to specify:
  ./configure
If you were to specify:
  ./configure --with-hdf5=/usr
then you will end up with the specified paths reflected in the resulting
makefiles.

- jason


More information about the cgma-dev mailing list