Re: LD_LIBRARY_PATH_RPATH - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: LD_LIBRARY_PATH_RPATH
Date
Msg-id 87o97v94ge.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: LD_LIBRARY_PATH_RPATH  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 >> At least on my FreeBSD 11 box, the current definition of
 >> $(with_temp_install) is not sufficient to ensure that the various .so
 >> files are loaded from tmp_install and not from the compiled rpath (which
 >> will be the final install dir, which may of course contain old
 >> libraries).

 >> LD_LIBRARY_PATH_RPATH=1 fixes this (by giving LD_LIBRARY_PATH priority
 >> over the DT_RPATH tag in the object).

 >> Is this also an issue on any other platforms?

 Tom> Hm.  Can't reproduce that on current NetBSD or macOS; don't have
 Tom> OpenBSD booted up to try right now.

 Tom> However, if it helps on some platforms, I can't see much harm in
 Tom> adding it in the relevant places. It should be a no-op everywhere
 Tom> else.

Oh, I see why it hasn't previously been an issue - the behavior varies
according to whether both DT_RPATH and DT_RUNPATH, or just DT_RPATH, are
defined in the program header; and when I build using default cc
(clang), I get both tags (which makes LD_LIBRARY_PATH_RPATH
unnecessary), whereas when I build using ports gcc using the recommended
additional -Wl,-R option, for whatever reason that ends up setting only
DT_RPATH.

Confusing. Probably safest to add the env var anyway.

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: amul sul
Date:
Subject: Re: where clause not working through psql command line client
Next
From: Dmitry Dolgov
Date:
Subject: Re: [HACKERS] [PATCH] Generic type subscripting