gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] RPATH makes my head hurt


From: Eric S. Raymond
Subject: [gpsd-dev] RPATH makes my head hurt
Date: Thu, 5 Dec 2013 23:19:46 -0500 (EST)

I've been absent the last couple of days working on other projects.
Most notably, I have just rescued the history of groff from the
clutches of CVS and shipped a release of reposurgeon.  But now I'm
back and trying to make sense of the feedback I got on this issue.

Current state of the codebase is this: RPATH is set to the value of
the libdir configuration option in the binaries, so they can find
installed GPSD libraries, unless the value of libdir is one of these
three: /lib, /usr/lib, or /usr/local/lib.

This worls on Ubuntu, where /usr/local/lib is part of the system
default load path.  People on other systems are objecting for various
reasons.

Before I go into those, I repeat my plea for someone to find out and
tell me how to query what the system default load path is.  If I knew
that, I'd set RPATH only when libdir isn't on the default path and we
wouldn't have any special cases or controversies.

When I said:
> I'm leaning towards leaving it that way and documenting the fact that
> the installation process may pop a sprocket (requiring the user to set
> RPATH by hand) if /usr/local/lib is not on the default rpath. But I'm
> waiting to hear comments from Hal and Miroslav, if they have any.

Gary replied:
>I agree, although a warning message at install time would also be good.

Unfortunately, we can't deliver a sensible warning message without
being able to query the system load path.  If we could do that, we'd
have a better solution.

Then Hal said:
>That doesn't seem right.  It won't work on my Fedora boxes.  (Or maybe I
>don't understand what you are saying.)

>From which I'm gtheering that Fedora *doesn't* add /usr/local/lib to
the default rpath.  Hal continued:

>We could add something that tells the loader to look in /usr/local/lib, but
>that doesn't seem right. It's making assumptions that might impact other
>packages. 

I agree. We're not going there.

>I think there are two tangled issues: using RPATH and using chrpath.

chrpath is for a differeny rpath manipulation that is not relevant to
this discussion.  I'm not confused about this.

>What do other packages with shared libraries do?

Mostly use libtool, which hides all this garbage - under its own layer
of garbage.

Greg Troxel said:
>On NetBSD, this is wrong.   Arguably you should either a) only omit
>/usr/lib, on the theory that other library paths are not hurt by RPATH,
>or b) make the list of directories to be omitted OS-specific (and that
>may be distribution-specific on Linux; I'm not sure).
>
>My understanding is that the only real objection to having RPATH set is
>From Debian, and there packaging gpsd goes to /usr/lib, so this won't
>bother them.

One possible way to cut this Gordian knot would be to give up on
being autotools-like - default the installation path to /usr rather
than /usr/local

Then Miroslav Lichvar said:
>I agree with the other replies. Unless /usr/local/lib is found in the
>ld.so config, it shouldn't be in that list. From the Debian RPATH
>page, it seems that's what libtool does.
>
>As a Fedora packager, however, I'd like to see /lib64 and /usr/lib64
>included in that list.

But the idea of embedding (more) distro-dependent logic in the 
recipe does not thrill me.

Greg Troxel said:
>Just pointing out that "Debian objects to RPATH" does not lead to
>"RPATH bad".  For many other systems, it is the standard approach.

Understood

>That said, if one can
>
> "scons check" and reliably link against the just-build OBJDIR libs, and
>
> "scons install" and end up with binaries/libs with RPATH to
> ${PREFIX}/lib (unless PREFIX == /usr)
>
>then I think all is ok.

By that criterion, all is presently OK.

So, after all this I'm going to leave two proposals on the table:

1. Revert to the status quo ante.  /usr/local/lib gets removed from
the list of exception paths. Our default GNU-like /usr/local
indstallation results in RPATH being set in the binaries.

2. We give up on trying to be GNU-like and default the installation
prefix to /usr rather than /usr/local.  

I'd be OK with either.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

If I were to select a jack-booted group of fascists who are 
perhaps as large a danger to American society as I could pick today,
I would pick BATF [the Bureau of Alcohol, Tobacco, and Firearms].
        -- U.S. Representative John Dingell, 1980



reply via email to

[Prev in Thread] Current Thread [Next in Thread]