[Gllug] library includes and compiling

tet at accucard.com tet at accucard.com
Mon Jan 14 12:38:43 UTC 2002


>-rpath is a bad idea on systems running the GNU libc, because it bans
>you from moving those shared libraries around. If you leave out the
>-rpath, the ld.so.cache and ld.so.conf are consulted, so the libraries
>can move freely as long as the ld.so.conf is kept up to date; if you
>include -rpath, the program simply breaks if the X libraries ever move,
>and you must relink.

You learn something new every day. I was under the impression it did
the logical thing (i.e., *added* a directory to the run path, so both
the rpath directories *and* those in ld.so.conf/cache were checked
for the appropriate libraries). Indeed, ld(1) implies it does add it
to the path, and ld.so(8) actively suggests both will be searched. I
certainly didn't expect the presence of an rpath to inhibit the lookup
in ld.so.cache. Is there some logic behind the current (apparently
braindead) behaviour?

>That's not the worst of the inconsistent switches; -pthreads, or is it
>-threads, or is it -pthread (depending on target architecture!) is the
>worst.

Ouch. Nasty.

Tet

PS. Since there are almost certainly poeple on the list that know more
    about such things than I do, anyone care to explain the difference
    between DT_RPATH and DT_RUNPATH?

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list