* ld does not honor /etc/ld.so.conf?
@ 2001-12-11 6:23 vda
2001-12-11 6:46 ` Jeff Sturm
2001-12-11 6:48 ` Andreas Jaeger
0 siblings, 2 replies; 3+ messages in thread
From: vda @ 2001-12-11 6:23 UTC (permalink / raw)
To: gcc, gcc-help
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.
Running shared binaries OTOH succeds. ldd <appname>
shows that it will successfully use a lib from /usr/app/qt/lib
if it needs qt.
(qt is just an example, I have same behavior with other libs too)
Is it a ld bug, manpage bug? Or am I doing something silly?
Please CC me
--
Denis Vlasenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ld does not honor /etc/ld.so.conf?
2001-12-11 6:23 ld does not honor /etc/ld.so.conf? vda
@ 2001-12-11 6:46 ` Jeff Sturm
2001-12-11 6:48 ` Andreas Jaeger
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Sturm @ 2001-12-11 6:46 UTC (permalink / raw)
To: vda; +Cc: gcc-help
On Tue, 11 Dec 2001, vda wrote:
> Is it a ld bug, manpage bug? Or am I doing something silly?
My hunch is a manpage bug... GNU ld has never searched /etc/ld.so.conf to
my knowledge (that file is used by ld.so, part of glibc) on any platform.
In any case this isn't a GCC issue. Try the binutils list.
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ld does not honor /etc/ld.so.conf?
2001-12-11 6:23 ld does not honor /etc/ld.so.conf? vda
2001-12-11 6:46 ` Jeff Sturm
@ 2001-12-11 6:48 ` Andreas Jaeger
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Jaeger @ 2001-12-11 6:48 UTC (permalink / raw)
To: vda; +Cc: gcc-help, gcc
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.
> Running shared binaries OTOH succeds. ldd <appname>
> shows that it will successfully use a lib from /usr/app/qt/lib
> if it needs qt.
>
> (qt is just an example, I have same behavior with other libs too)
>
> Is it a ld bug, manpage bug? Or am I doing something silly?
It works as documented,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-12-11 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 6:23 ld does not honor /etc/ld.so.conf? vda
2001-12-11 6:46 ` Jeff Sturm
2001-12-11 6:48 ` Andreas Jaeger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).