Sfoglia il codice sorgente

build: copy only libcrypto and libtinfo

Zaiming Shi 4 anni fa
parent
commit
79d9f55dd6
2 ha cambiato i file con 9 aggiunte e 4 eliminazioni
  1. 4 3
      bin/emqx
  2. 5 1
      build

+ 4 - 3
bin/emqx

@@ -207,9 +207,10 @@ if ! check_erlang_start >/dev/null 2>&1; then
     export LD_LIBRARY_PATH="$DYNLIBS_DIR:$LD_LIBRARY_PATH"
     export LD_LIBRARY_PATH="$DYNLIBS_DIR:$LD_LIBRARY_PATH"
     if ! check_erlang_start; then
     if ! check_erlang_start; then
         ## it's hopeless
         ## 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
         exit 1
     fi
     fi
     echoerr "WARNING: There seem to be missing dynamic libs from the OS. Using libs from ${DYNLIBS_DIR}"
     echoerr "WARNING: There seem to be missing dynamic libs from the OS. Using libs from ${DYNLIBS_DIR}"

+ 5 - 1
build

@@ -116,7 +116,11 @@ cp_dyn_libs() {
     mkdir -p "$target_dir"
     mkdir -p "$target_dir"
     while read -r so_file; do
     while read -r so_file; do
         cp -L "$so_file" "$target_dir/"
         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.
 ## make_zip turns .tar.gz into a .zip with a slightly different name.