Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2ab117

Browse files
committed
Fix cross-shlib linking in temporary installs on HPUX 10.
Turns out this has been broken for years and we'd not noticed. The onecase that was getting exercised in the buildfarm, or probably anywhereelse, was postgres_fdw.sl's reference to libpq.sl; and it turns out thatthat was always going to libpq.sl in the actual installation directorynot the temporary install. We'd not noticed because the buildfarm scriptdoes "make install" before it tests contrib. However, the recent additionof a logical-replication test to the core regression scripts resulted intrying to use libpqwalreceiver.sl before "make install" happens, and thatfailed for lack of finding libpq.sl, as shown by failures on buildfarmmembers gaur and pademelon.There are two changes needed to fix it: the magic environment variable tospecify shlib search path at runtime is SHLIB_PATH not LD_LIBRARY_PATH,and the shlib link command needs to specify the +s switch else the librarywill not honor SHLIB_PATH.I'm not quite sure why buildfarm members anole and gharial (HPUX 11) didn'tshow the same failure. Consulting man pages on the web says that HPUX 11honors both LD_LIBRARY_PATH and SHLIB_PATH, which would explain half of it,and the rather confusing wording I've been able to find suggests that +smight effectively be the default in HPUX 11. But it seems at least aslikely that there's just a libpq.so installed in /usr/lib on that machine;as long as it's not too ancient, that would satisfy the test. In any caseI do not think this patch will break HPUX 11.At the moment I don't see a need to back-patch this, since it only mattersfor testing purposes, not to mention that HPUX 10 is probably dead in thereal world anyway.
1 parentf21a563 commitd2ab117

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

‎src/Makefile.global.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ endef
344344

345345
# platform-specific environment variable to set shared library path
346346
defineld_library_path_var
347-
$(if$(filter$(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if$(filter$(PORTNAME),aix),LIBPATH,LD_LIBRARY_PATH))
347+
$(if$(filter$(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if$(filter$(PORTNAME),aix),LIBPATH,$(if$(filter$(PORTNAME),hpux),SHLIB_PATH,LD_LIBRARY_PATH)))
348348
endef
349349

350350
definewith_temp_install

‎src/Makefile.shlib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ ifeq ($(PORTNAME), hpux)
193193
# can't use the CC-syntax rpath pattern here, so instead:
194194
rpath =
195195
ifeq ($(enable_rpath), yes)
196-
LINK.shared+= +b '$(rpathdir)'
196+
LINK.shared+= +s +b '$(rpathdir)'
197197
endif
198198
# On HPUX platforms, gcc is usually configured to search for libraries
199199
# in /usr/local/lib, but ld won't do so. Add an explicit -L switch so

‎src/bin/pg_upgrade/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ if [ "$1" = '--install' ]; then
8383
export DYLD_LIBRARY_PATH
8484
LIBPATH=$libdir:$LIBPATH
8585
export LIBPATH
86+
SHLIB_PATH=$libdir:$SHLIB_PATH
87+
export SHLIB_PATH
8688
PATH=$libdir:$PATH
8789

8890
# We need to make it use psql from our temporary installation,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp