diff --git a/README.md b/README.md index d8a2f5d7ec5cf7e2eeb77d27cf0a0fad86e0c4ae..2a6c10b7023bf9734af4c5a10731c6ac02cb47d8 100644 --- a/README.md +++ b/README.md @@ -724,9 +724,9 @@ openGauss-server中的build.sh是编译过程中的重要脚本工具。该工 ``` # cmake编译版本选择由第二步中 DEBUG_TYPE 环境变量配置 mkdir cmake_build && cd cmake_build - cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON + cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_READLINE=ON -DENABLE_MOT=ON # openEuler22.03或openEuler24.03版本 - cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON -DENABLE_OPENEULER_MAJOR=ON + cmake .. -DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_READLINE=ON -DENABLE_MOT=ON -DENABLE_OPENEULER_MAJOR=ON ``` > **注意** diff --git a/build/script/build_opengauss.sh b/build/script/build_opengauss.sh index b04dde70ab08b05382cf6e47c9ad980bd88e923e..0529fd5be1a0cbc3824ee8d7fef4aa6112f162c6 100755 --- a/build/script/build_opengauss.sh +++ b/build/script/build_opengauss.sh @@ -154,15 +154,15 @@ else declare CMAKE_BUILD_DIR=${ROOT_DIR}/tmp_build os_version=$(cat /etc/os-release | grep 'VERSION_ID=' | cut -d'=' -f2 | tr -d '"') if [ "$product_mode"x == "lite"x ]; then - declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON ${extra_cmake_opt}" + declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_READLINE=ON -DENABLE_LITE_MODE=ON ${extra_cmake_opt}" elif [ "$product_mode"x == "finance"x ]; then export ENABLE_FINANCE_MODE=ON - declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_FINANCE_MODE=ON ${extra_cmake_opt}" + declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_READLINE=ON -DENABLE_FINANCE_MODE=ON ${extra_cmake_opt}" else if [[ "$os_version" == "22.03" || "$os_version" == "24.03" ]]; then - declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON -DENABLE_OPENEULER_MAJOR=ON ${extra_cmake_opt}" + declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON -DENABLE_READLINE=ON -DENABLE_OPENEULER_MAJOR=ON ${extra_cmake_opt}" else - declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON ${extra_cmake_opt}" + declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_READLINE=ON -DENABLE_MOT=ON ${extra_cmake_opt}" fi fi echo "[cmake options] cmake options is:${CMAKE_OPT}" >> "$LOG_FILE" 2>&1 diff --git a/cmake/src/build_options.cmake b/cmake/src/build_options.cmake index 27056f4f271dc5749553113f53f3c2ec8f0b3937..557d74dc0d698b3b509a177bf9af0e20a8412892 100755 --- a/cmake/src/build_options.cmake +++ b/cmake/src/build_options.cmake @@ -102,6 +102,7 @@ option(HAVE_POSIX_SIGNALS "enable posix signals, this set to default" ON) option(HAVE_GCC_INT_ATOMICS "enable gcc buildin atomics operations, this set to default" ON) option(FLEXIBLE_ARRAY_MEMBER "pq_ce need" ON) option(ENABLE_OPENEULER_MAJOR "support openEuler 22.03 LTS, this set to default" OFF) +option(ENABLE_READLINE "enable readline,the old is --enable-readline" OFF) # we will differ compile flags and definitions by different vars set(DB_COMMON_DEFINE "") @@ -160,6 +161,10 @@ if(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON") add_definitions(-DOPENEULER_MAJOR) endif() +if(${ENABLE_READLINE} STREQUAL "ON") + add_definitions(-DHAVE_READLINE_READLINE_H) +endif() + set(PROTECT_OPTIONS -fwrapv -std=c++14 -fnon-call-exceptions ${OPTIMIZE_LEVEL}) set(WARNING_OPTIONS -Wall -Wendif-labels -Wformat-security) set(OPTIMIZE_OPTIONS -pipe -pthread -fno-aggressive-loop-optimizations -fno-expensive-optimizations -fno-omit-frame-pointer -fno-strict-aliasing -freg-struct-return) diff --git a/src/bin/psql/CMakeLists.txt b/src/bin/psql/CMakeLists.txt index 3b69e494c64122f7e195dd4322d31c3a39a3320f..3d0060f2878976425f421282c49bcfc73eb0b412 100755 --- a/src/bin/psql/CMakeLists.txt +++ b/src/bin/psql/CMakeLists.txt @@ -72,9 +72,9 @@ endif() set(gsql_COMPILE_OPTIONS ${OPTIMIZE_OPTIONS} ${OS_OPTIONS} ${PROTECT_OPTIONS} ${WARNING_OPTIONS} ${BIN_SECURE_OPTIONS} ${CHECK_OPTIONS}) set(gsql_LINK_OPTIONS ${BIN_LINK_OPTIONS}) if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") - set(gsql_LINK_LIBS utils_aes_aes libelog.a libpgport.a -lcrypt -ldl -lm -lssl -lcrypto -l${SECURE_C_CHECK} -pthread -lrt -lz -lminiunz -ledit -lcjson -lcurl -lpq_ce -lncurses) + set(gsql_LINK_LIBS utils_aes_aes libelog.a libpgport.a -lcrypt -ldl -lm -lssl -lcrypto -l${SECURE_C_CHECK} -pthread -lrt -lz -lminiunz -lreadline -ledit -lcjson -lcurl -lpq_ce -lncurses) else() - set(gsql_LINK_LIBS utils_aes_aes libelog.a libpgport.a -lcrypt -ldl -lm -lssl -lcrypto -l${SECURE_C_CHECK} -pthread -lrt -lz -lminiunz -ledit -lcjson -lcurl -lpq -lncurses) + set(gsql_LINK_LIBS utils_aes_aes libelog.a libpgport.a -lcrypt -ldl -lm -lssl -lcrypto -l${SECURE_C_CHECK} -pthread -lrt -lz -lminiunz -lreadline -ledit -lcjson -lcurl -lpq -lncurses) endif() if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON") list(APPEND gsql_LINK_LIBS -lgssapi_krb5_gauss -lgssrpc_gauss -lkrb5_gauss -lkrb5support_gauss -lk5crypto_gauss -lcom_err_gauss) diff --git a/src/gausskernel/ddes/ddes_commit_id b/src/gausskernel/ddes/ddes_commit_id index 5efef49fa41a0c7134dd94df258985295816d92e..f35247229a0a15a202df5b3acbb8aaf1f3f109f3 100644 --- a/src/gausskernel/ddes/ddes_commit_id +++ b/src/gausskernel/ddes/ddes_commit_id @@ -1,3 +1,3 @@ -dms_commit_id=2de2ea6b4b38dd053757a30fe7fd59dd6e817eaa +dms_commit_id=a83ad9aae9ca0ca01942d9100b174b9c1c516f94 dss_commit_id=43fdadc37c967214e10a3d58e459ec482cdc7fa4 cbb_commit_id=0a9fe182799f7cff7a4943b3c09c87a05326de0c \ No newline at end of file