Re: LD_LIBRARY_PATH_RPATH

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: LD_LIBRARY_PATH_RPATH
Дата
Msg-id 87o97v94ge.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: LD_LIBRARY_PATH_RPATH  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: amul sul
Дата:
Сообщение: Re: where clause not working through psql command line client
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: [HACKERS] [PATCH] Generic type subscripting