You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2021/09/15 06:46:31 UTC

[hawq] branch taoz updated: HAWQ-1807. enable plperl

This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a commit to branch taoz
in repository https://gitbox.apache.org/repos/asf/hawq.git


The following commit(s) were added to refs/heads/taoz by this push:
     new 7a55874  HAWQ-1807. enable plperl
7a55874 is described below

commit 7a55874281139846439a4ab5f0e8b3e284e30bdd
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Wed Sep 15 14:43:39 2021 +0800

    HAWQ-1807. enable plperl
---
 tools/bin/generate-greenplum-path.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/bin/generate-greenplum-path.sh b/tools/bin/generate-greenplum-path.sh
index 6e5efac..fd22343 100755
--- a/tools/bin/generate-greenplum-path.sh
+++ b/tools/bin/generate-greenplum-path.sh
@@ -60,13 +60,15 @@ cat <<EOF
 PATH=\$GPHOME/bin:\$JAVA_HOME/bin:\$PATH
 EOF
 
+PERL_VERSION=`perl -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
+
 if [ "${PLAT}" = "Darwin" ] ; then
 	cat <<EOF
 DYLD_LIBRARY_PATH=\$GPHOME/lib:\$JAVA_HOME/jre/lib/amd64/server:\$DYLD_LIBRARY_PATH
 EOF
 else
     cat <<EOF
-LD_LIBRARY_PATH=\$GPHOME/lib:\$JAVA_HOME/jre/lib/amd64/server:\$LD_LIBRARY_PATH
+LD_LIBRARY_PATH=\$GPHOME/lib:\$GPHOME/lib/perl5/${PERL_VERSION}/x86_64-linux-thread-multi/CORE:\$JAVA_HOME/jre/lib/amd64/server:\$LD_LIBRARY_PATH
 EOF
 fi
 
@@ -86,6 +88,13 @@ DYLD_LIBRARY_PATH=\$DEPENDENCY_PATH/lib:\$DYLD_LIBRARY_PATH
 EOF
 fi
 
+#setup PERLPATH
+if [ "${PLAT}" != "Darwin" ] ; then
+    cat <<EOF
+PERL5LIB=\$GPHOME/lib/perl5/${PERL_VERSION}:\$GPHOME/lib/perl5/site_perl/${PERL_VERSION}
+EOF
+fi
+
 #setup PYTHONPATH
 cat <<EOF
 PYTHONPATH=\$GPHOME/lib/python:\$PYTHONPATH
@@ -115,6 +124,7 @@ cat <<EOF
 export GPHOME
 export PATH
 export DEPENDENCY_PATH
+export PERL5LIB
 EOF
 
 if [ "${PLAT}" != "Darwin" ] ; then