提交 cc985a3f 编写于 作者: S Shaoqi Bai 提交者: Bradford D. Boyle

Recompile plperl to set the right RUNPATH

Currently, GPDB5 is built with --enable-rpath (default configure
option). For plperl, it's Makefile specifies an absolute path to the
location of "$(perl -MConfig -e 'print $Config{archlibexp}')/CORE"
(e.g., /usr/lib64/perl5/CORE on RHEL7). This directory is not on the
default search path for the runtime linker. Without the proper RUNPATH
entry, libperl.so cannot be found when postgres tries to load the plperl
extension.

Without setting correct RUNPATH for plperl.so, will see a error like
followin:
ERROR:  could not load library
"/usr/local/greenplum-db-devel/lib/postgresql/plperl.so": libperl.so:
cannot open shared object file: No such file or directory
Authored-by: NShaoqi Bai <bshaoqi@vmware.com>
(cherry picked from commit a3eeadd5a575820ebc9a401c96b252355f183bb1)
上级 0c9d63e1
......@@ -246,12 +246,14 @@ export $(BLD_WHERE_THE_LIBRARY_THINGS_ARE)=$(BLD_LD_LIBRARY_PATH)
# how much of GPDB to build by platform (default is "full")
aix7_ppc_64_GPDB_BUILDSET=aix_subset
BLD_GPDB_BUILDSET=$($(BLD_ARCH)_GPDB_BUILDSET)
perl_archlibexp:=$(shell perl -MConfig -e 'print $$Config{archlibexp}')
# set default build steps
define BUILD_STEPS
@rm -rf $(INSTLOC)
cd $(BUILDDIR) && PYGRESQL_LDFLAGS='-Wl,-rpath,\$$$$ORIGIN/../../../lib -Wl,--enable-new-dtags' QUICKLZ_LDFLAGS='-Wl,-rpath,\$$$$ORIGIN/../../lib -Wl,--enable-new-dtags' $(MAKE) $(PARALLEL_MAKE_OPTS) install
cd $(BUILDDIR)/src/pl/plpython && $(MAKE) clean && echo 'LDFLAGS += -Wl,-rpath,\$$$$ORIGIN/../../ext/python/lib/ -Wl,--enable-new-dtags' >> Makefile && $(MAKE) $(PARALLEL_MAKE_OPTS) install && cd $(BUILDDIR)
cd $(BUILDDIR)/src/pl/plperl && $(MAKE) clean && echo "LDFLAGS += -Wl,-rpath,$(perl_archlibexp)/CORE -Wl,--enable-new-dtags" >> GNUmakefile && echo "LDFLAGS_SL += -Wl,-rpath,$(perl_archlibexp)/CORE -Wl,--enable-new-dtags" >> GNUmakefile && $(MAKE) $(PARALLEL_MAKE_OPTS) install && cd $(BUILDDIR)
#@$(MAKE) greenplum_path INSTLOC=$(INSTLOC)
#@$(MAKE) mgmtcopy INSTLOC=$(INSTLOC)
@$(MAKE) mkpgbouncer INSTLOC=$(INSTLOC) BUILDDIR=$(BUILDDIR)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册