[Mono-dev] Library path bug in Makefile?

Rodrigo Kumpera kumpera at gmail.com
Thu Mar 6 14:28:34 UTC 2014


On Wed, Mar 5, 2014 at 10:46 PM, Edward Ned Harvey (mono) <
edward.harvey.mono at clevertrove.com> wrote:

> > From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> > bounces at lists.ximian.com] On Behalf Of Edward Ned Harvey (mono)
> >
> > So ...  http://blog.tremily.us/posts/rpath/
>
> Actually, the answer is right there - Thank you, Trevor and Emily
> (tremily).
>
> This works perfectly:
> export LDFLAGS=-Wl,-rpath=/usr/local/mono-3.2.8/lib,--enable-new-dtags ;
> ./configure --prefix=/usr/local/mono-3.2.8
>
> After building & installing with these options:
> * The mono binary simply works.  No need to specify the LD_LIBRARY_PATH
> * It is overridable.  If need to set the LD_LIBRARY_PATH for some reason,
> it overrides the paths inside the binary.
> * Both the RPATH and RUNPATH have been set inside the binary, which
> behaves as tremily described.  (Particularly, the binary simply works, and
> can be overridden with LD_LIBRARY_PATH if desired.)
>
> As far as I'm concerned, this means there is no bug with the configure
> script or Makefile.  It is only a documentation feature - if you specify
> the --prefix, --exec-prefix, or --libdir, then the documentation should
> suggest specifying LDFLAGS=-Wl,-rpath=EPREFIX/lib,--enable-new-dtags
>

The issue is that we don't want to set RPATH to a value in the dynamic
linker path. This is known to cause all sorts of issues. Setting it
to, for example, /opt/lib is fine but /usr/lib is not. This is why it can't
be automatically done by the build as it can't know what to expect on the
host
search path.

--
Rodrigo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20140306/b279a532/attachment.html>


More information about the Mono-devel-list mailing list