Merge pull request #6259 from zmstone/build-do-not-pack-glibc
build: copy only libcrypto and libtinfo
This commit is contained in:
commit
b6064ce2c0
7
bin/emqx
7
bin/emqx
|
@ -41,9 +41,10 @@ if ! check_eralng_start >/dev/null 2>&1; then
|
|||
export LD_LIBRARY_PATH="$DYNLIBS_DIR:$LD_LIBRARY_PATH"
|
||||
if ! check_eralng_start; then
|
||||
## it's hopeless
|
||||
echoerr "FATAL: Unable to start Erlang (with libcrypto)."
|
||||
echoerr "Please make sure it's running on the correct platform with all required dependencies."
|
||||
echoerr "This EMQ X release is built for $BUILT_ON"
|
||||
echoerr "FATAL: Unable to start Erlang."
|
||||
echoerr "Please make sure openssl-1.1.1 (libcrypto) and libncurses are installed."
|
||||
echoerr "Also ensure it's running on the correct platform,"
|
||||
echoerr "this EMQ X release is built for $BUILT_ON"
|
||||
exit 1
|
||||
fi
|
||||
echoerr "WARNING: There seem to be missing dynamic libs from the OS. Using libs from ${DYNLIBS_DIR}"
|
||||
|
|
6
build
6
build
|
@ -96,7 +96,11 @@ cp_dyn_libs() {
|
|||
mkdir -p "$target_dir"
|
||||
while read -r so_file; do
|
||||
cp -L "$so_file" "$target_dir/"
|
||||
done < <(find "$rel_dir" -type f \( -name "*.so*" -o -name "beam.smp" \) -print0 | xargs -0 ldd | grep -E '^\s+.*=>\s(/lib|/usr)' | awk '{print $3}')
|
||||
done < <(find "$rel_dir" -type f \( -name "*.so*" -o -name "beam.smp" \) -print0 \
|
||||
| xargs -0 ldd \
|
||||
| grep -E '(libcrypto)|(libtinfo)' \
|
||||
| awk '{print $3}' \
|
||||
| sort -u)
|
||||
}
|
||||
|
||||
## make_zip turns .tar.gz into a .zip with a slightly different name.
|
||||
|
|
Loading…
Reference in New Issue