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

gehafearless pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e7525b34 fix(shell): add missing librocksdb.so.8 while packing tools 
and fix errors while launching shell (#1887)
4e7525b34 is described below

commit 4e7525b349f86a81264ac9c2e523fe0e8ae8ad07
Author: Dan Wang <[email protected]>
AuthorDate: Sun Feb 4 14:56:20 2024 +0800

    fix(shell): add missing librocksdb.so.8 while packing tools and fix errors 
while launching shell (#1887)
    
    * fix(shell): add missing librocksdb.so.8 while packing tools and fix 
errors while launching shell
    
    * fix run_shell
---
 run.sh                | 15 ++++++++++++---
 scripts/pack_tools.sh |  3 ++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/run.sh b/run.sh
index 54a8502f7..96d4d6418 100755
--- a/run.sh
+++ b/run.sh
@@ -20,12 +20,12 @@ set -e
 
 LOCAL_HOSTNAME=`hostname -f`
 PID=$$
-ROOT=`pwd`
+ROOT="$(cd "$(dirname "$0")" && pwd)"
 export BUILD_ROOT_DIR=${ROOT}/build
 export BUILD_LATEST_DIR=${BUILD_ROOT_DIR}/latest
 export REPORT_DIR="$ROOT/test_report"
 export THIRDPARTY_ROOT=$ROOT/thirdparty
-export 
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:${BUILD_LATEST_DIR}/output/lib:${THIRDPARTY_ROOT}/output/lib:${LD_LIBRARY_PATH}
+export 
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:${ROOT}/lib:${BUILD_LATEST_DIR}/output/lib:${THIRDPARTY_ROOT}/output/lib:${LD_LIBRARY_PATH}
 # Disable AddressSanitizerOneDefinitionRuleViolation, see 
https://github.com/google/sanitizers/issues/1017 for details.
 export ASAN_OPTIONS=detect_odr_violation=0
 # See 
https://github.com/gperftools/gperftools/wiki/gperftools'-stacktrace-capturing-methods-and-their-issues.
@@ -1720,7 +1720,16 @@ function run_shell()
     fi
 
     cd ${ROOT}
-    ln -s -f ${BUILD_LATEST_DIR}/output/bin/pegasus_shell/pegasus_shell
+    if [ -f ${ROOT}/bin/pegasus_shell/pegasus_shell ]; then
+        # The pegasus_shell was packaged by pack_tools, to be used on 
production environment.
+        ln -s -f ${ROOT}/bin/pegasus_shell/pegasus_shell
+    elif [ -f ${BUILD_LATEST_DIR}/output/bin/pegasus_shell/pegasus_shell ]; 
then
+        # The pegasus_shell was built locally, to be used for test on 
development environment.
+        ln -s -f ${BUILD_LATEST_DIR}/output/bin/pegasus_shell/pegasus_shell
+    else
+        echo "ERROR: pegasus_shell could not be found"
+        exit 1
+    fi
     ./pegasus_shell ${CONFIG} $CLUSTER_NAME
     # because pegasus shell will catch 'Ctrl-C' signal, so the following 
commands will be executed
     # even user inputs 'Ctrl-C', so that the temporary config file will be 
cleared when exit shell.
diff --git a/scripts/pack_tools.sh b/scripts/pack_tools.sh
index efc9ea59d..ae7706867 100755
--- a/scripts/pack_tools.sh
+++ b/scripts/pack_tools.sh
@@ -132,7 +132,8 @@ else
 fi
 
 copy_file ./thirdparty/output/lib/libboost*.so.1.69.0 ${pack}/lib/
-copy_file ./thirdparty/output/lib/libhdfs* ${pack}/lib
+copy_file ./thirdparty/output/lib/libhdfs* ${pack}/lib/
+copy_file ./thirdparty/output/lib/librocksdb.so.8 ${pack}/lib/
 copy_file `get_stdcpp_lib $custom_gcc` ${pack}/lib/
 
 pack_tools_lib() {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to