Even in SCL world we so far lived fine with --disable-rpath. But in some usecases, SCLized libpqwalreceiver.so needs to have RPATH set. Resolves: rhbz#1550567 diff --git a/src/backend/replication/libpqwalreceiver/Makefile b/src/backend/replication/libpqwalreceiver/Makefile index a7a5fe1..a9604a1 100644 --- a/src/backend/replication/libpqwalreceiver/Makefile +++ b/src/backend/replication/libpqwalreceiver/Makefile @@ -16,6 +16,13 @@ override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS) OBJS = libpqwalreceiver.o $(WIN32RES) SHLIB_LINK = $(libpq) $(filter -lintl, $(LIBS)) + +# Force rpath to be used even though we disable it everywhere else. This is +# needed because the 'libpqwalreceiver.so' is loaded into process (with +# CREATE SUBSCRIPTION) which has dropped the $LD_LIBRARY_PATH variable from the +# parent $bindir/postgress process. +SHLIB_LINK += $(rpath) + SHLIB_PREREQS = submake-libpq PGFILEDESC = "libpqwalreceiver - receive WAL during streaming replication" NAME = libpqwalreceiver