Skip to content

Commit

Permalink
fix(shell): add missing librocksdb.so.8 while packing tools and fix e…
Browse files Browse the repository at this point in the history
…rrors while launching shell (#1887)

* fix(shell): add missing librocksdb.so.8 while packing tools and fix errors while launching shell

* fix run_shell
  • Loading branch information
empiredan authored Feb 4, 2024
1 parent fd137bf commit 4e7525b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion scripts/pack_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 4e7525b

Please sign in to comment.