This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ld does not honor /etc/ld.so.conf?
- From: vda <vda at port dot imtp dot ilyichevsk dot odessa dot ua>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 12 Dec 2001 17:01:32 -0200
- Subject: Re: ld does not honor /etc/ld.so.conf?
- References: <01121116220200.01501@manta> <hok7vtyftl.fsf@gee.suse.de>
On Tuesday 11 December 2001 12:47, Andreas Jaeger wrote:
> vda <vda@port.imtp.ilyichevsk.odessa.ua> writes:
> > While slowly rebuilding Slackware linux to my taste I decided to
> > keep all apps separate under [/usr]/app/bar-1.2.3 style dirs,
> > including their /lib subdirs if any.
> >
> > So far it works just great, but I have a problem with ld:
> > although I added /usr/app/qt/lib to /etc/ld.so.conf and reran
> > ldconfig, linking against qt libs fails.
> >
> > man ld says that /etc/ld.so.conf directories will be searched for libs
> > specified in -l<libname> options, it is apparently not true on my system.
>
> Read again:
> When using ELF or SunOS, one shared library may require
> another. This happens when an "ld -shared" link
> includes a shared library as one of the input files.
> ...
> The linker uses the following search paths to locate required
> shared libraries. ...
> 8. For a native linker on an ELF system, if the file
> /etc/ld.so.conf exists, the list of directories found
> in that file.
>
> So its only used when libqt - which is found already - needs another
> lib.
It is somewhat obscure but you're probably right.
> It works as documented,
Does that mean that any shared lib dirs outside /lib and /usr/lib (think
X,KDE,GNOME,etc) must be specified explicitly at link time?
It will makes my life harder. I think junkheap dirs with parts of
50 unrelated pieces of software lying together are not ok.
I'm puzzled why this considered a norm in Unix world.
I can fight with /bin, /man, etc but looks like /lib won't give up easily :-)
--
vda