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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7b13ac5  [deps][chore] make openssl works with old glibc version 
(#7541)
7b13ac5 is described below

commit 7b13ac5b310006695189a7c12487124fcdb64f2c
Author: Mingyu Chen <[email protected]>
AuthorDate: Fri Dec 31 23:19:04 2021 +0800

    [deps][chore] make openssl works with old glibc version (#7541)
    
    1. build OpenSSL with --with-rand-seed=devrandom
    2. Modified: brpc 1.0.0-rc02 -> 1.0.0
---
 be/src/runtime/fragment_mgr.cpp |  3 +-
 env.sh                          | 80 +++++++++++++++++++++--------------------
 thirdparty/CHANGELOG.md         |  5 +++
 thirdparty/build-thirdparty.sh  | 10 ++++--
 thirdparty/vars.sh              | 10 +++---
 5 files changed, 60 insertions(+), 48 deletions(-)

diff --git a/be/src/runtime/fragment_mgr.cpp b/be/src/runtime/fragment_mgr.cpp
index 0946732..d3c40e9 100644
--- a/be/src/runtime/fragment_mgr.cpp
+++ b/be/src/runtime/fragment_mgr.cpp
@@ -629,7 +629,8 @@ Status FragmentMgr::exec_plan_fragment(const 
TExecPlanFragmentParams& params, Fi
         }
         exec_state->cancel_before_execute();
         return Status::InternalError(strings::Substitute(
-                "Put planfragment to thread pool failed. err = $0", 
st.get_error_msg()));
+                "Put planfragment to thread pool failed. err = $0, BE: $1",
+                st.get_error_msg(), BackendOptions::get_localhost()));
     }
 
     return Status::OK();
diff --git a/env.sh b/env.sh
index 98a96f4..bf64801 100755
--- a/env.sh
+++ b/env.sh
@@ -63,16 +63,6 @@ if [[ ! "$(printf '%s\n' "$required_ver" "$gcc_ver" | sort 
-V | head -n1)" = "$r
     exit 1
 fi
 
-# register keyword is forbidden to use in C++17
-# the C++ code generated by flex that remove register keyword after version 
2.6.0
-# so we need check flex version here to avoid compilation failed
-flex_ver=$(flex --version | awk '{print $2}')
-required_ver="2.6.0"
-if [[ ! "$(printf '%s\n' "$required_ver" "$flex_ver" | sort -V | head -n1)" = 
"$required_ver" ]]; then
-    echo "Error: flex version (${flex_ver}) must be greater than or equal to 
${required_ver}"
-    exit 1
-fi
-
 # find binutils
 if test -x ${DORIS_GCC_HOME}/bin/ld; then
     export DORIS_BIN_UTILS=${DORIS_GCC_HOME}/bin/
@@ -84,38 +74,52 @@ fi
 export CLANG_COMPATIBLE_FLAGS=$(echo | ${DORIS_GCC_HOME}/bin/gcc -Wp,-v -xc++ 
- -fsyntax-only 2>&1 |
     grep -E '^\s+/' | awk '{print "-I" $1}' | tr '\n' ' ')
 
-# check java home
-if [ -z "$JAVA_HOME" ]; then
-    export JAVACMD=$(which java)
-    JAVAP=$(which javap)
-else
-    export JAVA="${JAVA_HOME}/bin/java"
-    JAVAP="${JAVA_HOME}/bin/javap"
-fi
 
-if [ ! -x "$JAVA" ]; then
-    echo "The JAVA_HOME environment variable is not defined correctly"
-    echo "This environment variable is needed to run this program"
-    echo "NB: JAVA_HOME should point to a JDK not a JRE"
-    exit 1
-fi
+# if is called from build-thirdparty.sh, no need to check these tools
+if test -z "${BUILD_THIRDPARTY_WIP}"; then
+    # register keyword is forbidden to use in C++17
+    # the C++ code generated by flex that remove register keyword after 
version 2.6.0
+    # so we need check flex version here to avoid compilation failed
+    flex_ver=$(flex --version | awk '{print $2}')
+    required_ver="2.6.0"
+    if [[ ! "$(printf '%s\n' "$required_ver" "$flex_ver" | sort -V | head 
-n1)" = "$required_ver" ]]; then
+        echo "Error: flex version (${flex_ver}) must be greater than or equal 
to ${required_ver}"
+        exit 1
+    fi
 
-JAVA_VER=$(${JAVAP} -verbose java.lang.String | grep "major version" | cut -d 
" " -f5)
-if [[ $JAVA_VER -lt 52 ]]; then
-    echo "Error: require JAVA with JDK version at least 1.8"
-    exit 1
-fi
+    # check java home
+    if [ -z "$JAVA_HOME" ]; then
+        export JAVACMD=$(which java)
+        JAVAP=$(which javap)
+    else
+        export JAVA="${JAVA_HOME}/bin/java"
+        JAVAP="${JAVA_HOME}/bin/javap"
+    fi
 
-# check maven
-MVN_CMD=mvn
-if [[ ! -z ${CUSTOM_MVN} ]]; then
-    MVN_CMD=${CUSTOM_MVN}
-fi
-if ! ${MVN_CMD} --version; then
-    echo "Error: mvn is not found"
-    exit 1
+    if [ ! -x "$JAVA" ]; then
+        echo "The JAVA_HOME environment variable is not defined correctly"
+        echo "This environment variable is needed to run this program"
+        echo "NB: JAVA_HOME should point to a JDK not a JRE"
+        exit 1
+    fi
+
+    JAVA_VER=$(${JAVAP} -verbose java.lang.String | grep "major version" | cut 
-d " " -f5)
+    if [[ $JAVA_VER -lt 52 ]]; then
+        echo "Error: require JAVA with JDK version at least 1.8"
+        exit 1
+    fi
+
+    # check maven
+    MVN_CMD=mvn
+    if [[ ! -z ${CUSTOM_MVN} ]]; then
+        MVN_CMD=${CUSTOM_MVN}
+    fi
+    if ! ${MVN_CMD} --version; then
+        echo "Error: mvn is not found"
+        exit 1
+    fi
+    export MVN_CMD
 fi
-export MVN_CMD
 
 CMAKE_CMD=cmake
 if [[ ! -z ${CUSTOM_CMAKE} ]]; then
diff --git a/thirdparty/CHANGELOG.md b/thirdparty/CHANGELOG.md
index cd5fd11..6764b8d 100644
--- a/thirdparty/CHANGELOG.md
+++ b/thirdparty/CHANGELOG.md
@@ -2,6 +2,11 @@
 
 This file contains version of the third-party dependency libraries in the 
build-env image. The docker build-env image is apache/incubator-doris, and the 
tag is `build-env-${version}`
 
+## v20211229
+
+- Modified: OpenSSL with --with-rand-seed=devrandom
+- Modified: brpc 1.0.0-rc02 -> 1.0.0
+
 ## v20211220
 
 - Modified: OpenSSL 1.0.2k -> 1.1.1m
diff --git a/thirdparty/build-thirdparty.sh b/thirdparty/build-thirdparty.sh
index 0f2e544..cedec49 100755
--- a/thirdparty/build-thirdparty.sh
+++ b/thirdparty/build-thirdparty.sh
@@ -82,7 +82,9 @@ echo "Get params:
 
 # include custom environment variables
 if [[ -f ${DORIS_HOME}/env.sh ]]; then
+    export BUILD_THIRDPARTY_WIP=1
     . ${DORIS_HOME}/env.sh
+    export BUILD_THIRDPARTY_WIP=
 fi
 
 if [[ ! -f ${TP_DIR}/download-thirdparty.sh ]]; then
@@ -226,7 +228,7 @@ build_openssl() {
     LDFLAGS="-L${TP_LIB_DIR}" \
     CFLAGS="-fPIC" \
     LIBDIR="lib" \
-    ./Configure --prefix=$TP_INSTALL_DIR -zlib -shared ${OPENSSL_PLATFORM}
+    ./Configure --prefix=$TP_INSTALL_DIR --with-rand-seed=devrandom -zlib 
-shared ${OPENSSL_PLATFORM}
     make -j $PARALLEL && make install_sw
     # NOTE(zc): remove this dynamic library files to make libcurl static link.
     # If I don't remove this files, I don't known how to make libcurl link 
static library
@@ -265,7 +267,7 @@ build_protobuf() {
     rm -fr gmock
     mkdir gmock && cd gmock && tar xf ${TP_SOURCE_DIR}/${GTEST_NAME} \
     && mv ${GTEST_SOURCE} gtest && cd $TP_SOURCE_DIR/$PROTOBUF_SOURCE && 
./autogen.sh
-    CXXFLAGS="-fPIC -O2 -I ${TP_INCLUDE_DIR}" \
+    CXXFLAGS="-fPIC -O2 -I${TP_INCLUDE_DIR}" \
     LDFLAGS="-L${TP_LIB_DIR} -static-libstdc++ -static-libgcc" \
     ./configure --prefix=${TP_INSTALL_DIR} --disable-shared --enable-static 
--with-zlib=${TP_INSTALL_DIR}/include
     cd src
@@ -879,7 +881,9 @@ build_xml2() {
     sh autogen.sh
     make distclean
     mkdir -p $BUILD_DIR && cd $BUILD_DIR
-    ../configure --prefix=$TP_INSTALL_DIR --enable-shared=no --with-pic 
--with-python=no
+    CPPLAGS="-I${TP_INCLUDE_DIR}" \
+    LDFLAGS="-L${TP_LIB_DIR}" \
+    ../configure --prefix=$TP_INSTALL_DIR --enable-shared=no --with-pic 
--with-python=no --with-lzma=$TP_INSTALL_DIR
     make -j $PARALLEL && make install
 }
 
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 6950db4..560be05 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -173,12 +173,10 @@ LEVELDB_SOURCE=leveldb-1.20
 LEVELDB_MD5SUM="298b5bddf12c675d6345784261302252"
 
 # brpc
-# incubator-brpc-1.0.0-rc02 is a stable version。 Due to the issue of the 
version release process, 
-# there may not be an official version
-BRPC_DOWNLOAD="https://github.com/apache/incubator-brpc/archive/1.0.0-rc02.tar.gz";
-BRPC_NAME=incubator-brpc-1.0.0-rc02.tar.gz
-BRPC_SOURCE=incubator-brpc-1.0.0-rc02
-BRPC_MD5SUM="863b9e53f3642fd31eeb438dbfc4f55c"
+BRPC_DOWNLOAD="https://github.com/apache/incubator-brpc/archive/refs/tags/1.0.0.tar.gz";
+BRPC_NAME="1.0.0.tar.gz"
+BRPC_SOURCE="incubator-brpc-1.0.0"
+BRPC_MD5SUM="73b201192a10107628e3af5ccd643676"
 
 # rocksdb
 ROCKSDB_DOWNLOAD="https://github.com/facebook/rocksdb/archive/v5.14.2.tar.gz";

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

Reply via email to