You are not logged in.

#1 2010-06-24 21:33:14

tam1138
Member
Registered: 2007-09-10
Posts: 238

why is /usr/local/lib not in ld.so.conf?

Pretty much just as the subject line says.  It seems that, since /usr/local/lib is recognized by the FHS (http://www.pathname.com/fhs/pub/fhs-2.3 … ALHIERARCH) it makes sense for it to be included in the default set of library paths.  Does anybody know why it isn't?  I searched *.archlinux.org and didn't find anything enlightening.  My apologies if this has been covered before; please pass along a link if it has!  Thanks.

Offline

#2 2010-06-26 06:55:50

doorknob60
Member
Registered: 2008-09-29
Posts: 403

Re: why is /usr/local/lib not in ld.so.conf?

Because /usr/local/ isn't really used at all in Arch. I have one folder in /usr/local/lib and 2 things in /usr/local/bin...not sure where they came from...Not really sure why, it's just Archers don't use it tongue EDIT: Oh, from incorrectly made AUR packages tongue

From http://wiki.archlinux.org/index.php/Arc … _Etiquette

Packages should never be installed to /usr/local

Last edited by doorknob60 (2010-06-26 06:59:32)

Offline

#3 2010-06-26 07:02:16

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: why is /usr/local/lib not in ld.so.conf?

I think many distros do not include that...   at least Red Hat based ones did not at some stage.

Offline

#4 2010-06-26 17:43:19

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: why is /usr/local/lib not in ld.so.conf?

Well of course packages shouldn't install into /usr/local, that's the very point of its existence.  But if I want to compile something all by myself like a big boy, by default it goes in /usr/local, to keep it separate from platform-provided packages.  This is the standard behavior for autoconf'd software, and it seems to me that an "advanced-ish" distro like Arch should support that sort of thing out of the box.  Not to mention that the FHS implies its use is somewhat standard.

A quick survey shows that Fedora Core 13 does not include /usr/local/lib by default, but Ubuntu 10.04 does, as do FreeBSD 8.0-RELEASE and OpenBSD 4.3.  That reminds me, I need to upgrade that OBSD box....

Offline

#5 2010-06-26 20:15:14

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: why is /usr/local/lib not in ld.so.conf?

By using one compilation flag, you can set your software to be installed to /usr/lib.  /usr/local is considered to be kinda sloppy, and it is very easy to avoid, so it got put by the wayside. 

Arch is probably one of the most forward-thinking distros out there.  Not only is it bleeding edge, but it forces you to learn linux, putting your own education into the forward-thinking ideology.  If there is a better way to do things, the idea usually gets worked into our distro, and if it's not ambiguous enough to satisfy everyone, you can expect a wiki and some packages that'll tell you how to do it to your own system.

If you would like to include /usr/local in your installation, you definitely can.  Make the directory and set proper permissions on it, then include /usr/local/bin and /usr/local/sbin in the PATH variable in /etc/profile.  Done.

Offline

#6 2010-06-26 20:30:20

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: why is /usr/local/lib not in ld.so.conf?

And don't forget to add a file (e.g. "usrlocal.conf") containing

/usr/local/lib

to the /etc/ld.so.conf.d directory.


To know or not to know ...
... the questions remain forever.

Offline

#7 2010-06-26 20:40:59

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: why is /usr/local/lib not in ld.so.conf?

/usr/local is considered "kinda sloppy" by whom exactly?  It is the standard place for hand-compiled software to be installed, so it is physically separated from distro-installed software.  This is an explicit requirement of the Filesystem Hierarchy Standard, and is built into every piece of GNU software, as well as every piece of software that uses autoconf.

Sure, Arch forces you to "learn linux".  The lesson to be learned here is not how to dig through /etc, but rather that there are standard, universally-accepted places to put things.  The operating system ought to support these places so that all one needs to do to install additional software is to put it there, and not have to mess around with system configuration files in the first place.  Why do you think the world has moved towards /etc/foo.conf.d directories instead of having to edit /etc/foo.conf over and over again?  You could say that all I have to do is add another (few) /etc/*.conf.d/bar files, but I hold that /usr/local is so standard that this should either be built in or such files should be shipped by default.

In the more immediate, the use of /usr/local is sufficiently prevalent that requiring someone to modify /etc/profile to use it is ludicrous.  System-wide configuration files like /etc/profile are highly inconvenient to edit, because whenever they are upgraded, one has to migrate modifications one way or the other.

And to further rebut your point, the filesystem package already includes the /usr/local hierarchy:

$ pacman -Ql filesystem | grep local
filesystem /usr/local/
filesystem /usr/local/bin/
filesystem /usr/local/games/
filesystem /usr/local/include/
filesystem /usr/local/lib/
filesystem /usr/local/man/
filesystem /usr/local/sbin/
filesystem /usr/local/share/
filesystem /usr/local/share/man
filesystem /usr/local/src/
filesystem /var/local/

so why don't the init scripts (which are also in the filesystem package) enable its use?

Offline

#8 2010-06-26 20:48:59

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: why is /usr/local/lib not in ld.so.conf?

synthead wrote:

usr/local is considered to be kinda sloppy

The guys at work who have been using Unix for 35 years put our home grown apps in /usr/local.  They may be old fashioned, but they are not sloppy (we pass 4 software and security audits every year, including FDA).


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#9 2010-07-09 17:07:00

ernesto
Member
Registered: 2008-10-30
Posts: 21

Re: why is /usr/local/lib not in ld.so.conf?

synthead wrote:

By using one compilation flag, you can set your software to be installed to /usr/lib.  /usr/local is considered to be kinda sloppy,

Not too old and I just got bitten by this.

Where did you get this idea that placing stuff in /usr/local is sloppy? I've never encountered this attitude before, exact opposite in fact.

Using --prefix=/usr or placing anything in /usr/bin /usr/lib, etc. that isn't under the domain of a package manager is considered sloppy.

/usr/local exists for a reason,  check hier.

IMO, placing stuff in the /usr top level basically asking for orphaned files. There's no way in hell you could manage all of it. /usr/local is entirely manageable because of its size and you can delete the entire tree without any adverse effects.

Offline

#10 2010-07-09 17:26:42

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: why is /usr/local/lib not in ld.so.conf?

Offline

Board footer

Powered by FluxBB