Resolution of the library-path mess

Eric S. Raymond esr at thyrsus.com
Mon Oct 2 11:00:41 UTC 2017


Hal Murray <hmurray at megapathdsl.net>:
> 
> > There are two cases. User-installed code and binaries are supposed to go
> > under /usr/local/X; stuff from packages goes under /usr/X, where X = {bin,
> > lib}. 
> 
> I think that means our normal devel-mode install is "user-installed code".   

Correct.

> I think that needs to go in our documentation.  (along with a quick summary 
> of FHS: user-installed goes in local, system packages go in non-local.  A 
> reference to FHS would be good.)

I've done some documentation polishing to address this.

> Do we want a system-code install mode?

That's what you get if you specify --prefix=/usr, as opposed to the default
prefix of /usr/local.

> Does install have a single where-to-put-it parameter?  Or do we need several, 
> one for ntpd (sbin), one for python code (bin) and one for python libraries?

There is just one.  That is what --prefix is.  There is a separate option
--destdir that chabges the root of the *entire* installation hierchy.
The default of --destdir is /.

User installs under /usr/local - and both these options - are well-known
conventions established decades ago by autoconf.  Then later inherited by
waf and FHS.  They're pretty much universal across build systems.

> Do we need a way to check that we are using the right library?
> 
> I think that means we need the version string or time stamp in both the 
> library and the code that uses the library with a simple sanity check at the 
> top of the uses code.

It's not normal practice to do this in Python. GPSD never has.

I think the reason is that when you do have such a mismatch, the Python
stack trace it generally produces is likely to be more informative than
a version-mismatch message.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.




More information about the devel mailing list