You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2022/12/07 02:11:17 UTC

[impala] branch master updated: IMPALA-11738: Add toolchain libstdc++ to LD_LIBRARY_PATH for HiveServer2

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

joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c772f9c7 IMPALA-11738: Add toolchain libstdc++ to LD_LIBRARY_PATH for HiveServer2
4c772f9c7 is described below

commit 4c772f9c7763541857e26038c3a9cdf0d64e3c0b
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Wed Nov 23 16:40:42 2022 -0800

    IMPALA-11738: Add toolchain libstdc++ to LD_LIBRARY_PATH for HiveServer2
    
    libfesupport.so is built against the toolchain libstdc++,
    which may be newer than the OS libstdc++. Since HiveServer2
    has libfesupport.so on its java.library.path, we should also
    put the toolchain libstdc++ in LD_LIBRARY_PATH so that
    libfesupport.so can resolve all its symbols properly.
    
    This fixes an issue with a Hive crash in Ubuntu 18 dataload.
    
    Testing:
     - Ran dataload on Ubuntu 18
    
    Change-Id: Ib35e778850618b35073d102b89a4de02071b4a19
    Reviewed-on: http://gerrit.cloudera.org:8080/19276
    Reviewed-by: Joe McDonnell <jo...@cloudera.com>
    Reviewed-by: Michael Smith <mi...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 testdata/bin/run-hive-server.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testdata/bin/run-hive-server.sh b/testdata/bin/run-hive-server.sh
index 909a302dd..fa57972ea 100755
--- a/testdata/bin/run-hive-server.sh
+++ b/testdata/bin/run-hive-server.sh
@@ -140,6 +140,11 @@ fi
 # Include the latest libfesupport.so in the JAVA_LIBRARY_PATH
 export JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH-}:${IMPALA_HOME}/be/build/latest/service/"
 
+# Add the toolchain's libstdc++ to the LD_LIBRARY_PATH, because libfesupport.so may
+# need the newer version.
+GCC_HOME="${IMPALA_TOOLCHAIN_PACKAGES_HOME}/gcc-${IMPALA_GCC_VERSION}"
+export LD_LIBRARY_PATH="${LD_LIBRARY_PATH-}:${GCC_HOME}/lib64"
+
 export HIVESERVER2_HADOOP_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,\
 suspend=n,address=30020"
 if [ ${START_HIVESERVER} -eq 1 ]; then