Bug 144967

Summary: /etc/ld.so.conf missing /usr/local/{lib,lib64} entries
Product: [Fedora] Fedora Reporter: Douglas Moyes <dbmoyes>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: bennet, fweimer, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-13 09:53:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Douglas Moyes 2005-01-13 02:04:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.7.3)
Gecko/20041020 Firefox/0.10.1

Description of problem:
The lines:

/usr/local/lib
/usr/local/lib64

need to be added to ld.so.conf otherwise new packages compiled that
install dynamically linked libraries in /usr/local will not be able to
execute due to an inability to locate the libraries, however they will
compile just fine.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Run a configure script with the following command line:
   ./configure --prefix=/usr/local
2. Type the command:
   make && make install
3. Execute your newly compiled package and see the message that the
dynamic linker can't find some library.
4. Pull hair out for a an hour trying to figure out why it isn't working
5. Look in /etc/ld.so.conf and realise someone at redhat made a booboo
6. Edit /etc/ld.so.conf and add the missing lines
7. Run your freshly compiled package, and lookie it works.

    

Additional info:

Comment 1 Jakub Jelinek 2005-01-13 09:53:06 UTC
That's on purpose.
There used to be many problems with obsolete stale libraries in /usr/local/lib*
that confused many people.
If you install shared libraries into /usr/local/lib*/ that you want to use,
echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
in addition to that
/sbin/ldconfig
you want to run anyway is not that much trouble and you are saying with that
it is intentional that ld.so.cache should contain those libraries.

Comment 2 T W Bennet 2013-03-29 20:02:16 UTC
Any chance Fedora might add a small RPM that simply creates the /usr/local/lib{,64} directories and an appropriate /etc/ld.so.conf.d/local.conf?  The distro itself would presumably not use it or install it by default, but it would be available and part of all the repositories for use by us nostalgia buffs, reactionaries and other rif-raf.  

Having a distro RPM would help assure the directory would be added in a standard way when needed, avoid install scripts having to test the loader config (and disagree on the answer: is /usr/local/lib specified in /etc/ld.so.conf, or /etc/ld.so.conf.d?  If the later, what's it's name?).  Also make a nice dependence for local or site RPMs that want to put libraries there.

Comment 3 Petr Pisar 2022-11-01 15:03:40 UTC
If /usr/local/lib* is dangerous, then why we keep /usr/local/bin in PATH? It's the same class of problems. Now Fedora is neither /usr/local-free, neither /usr/local-capable. It's really confusing that "./configure && make && make install" makes the scripts available, but not libraries.