opengauss-server/cmake_compile.patch
2024-05-20 18:26:42 +08:00

278 lines
11 KiB
Diff

diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake
*** openGauss-server-5.0.1/cmake/src/set_thirdparty_path.cmake 2024-05-07 20:16:38.988794109 +0800
--- openGauss-server-5.0.1-edit/cmake/src/set_thirdparty_path.cmake 2024-05-09 14:15:39.965184154 +0800
***************
*** 158,163 ****
--- 158,165 ----
if(${WITH_OPENEULER_OS} STREQUAL "ON")
set(SECURE_C_CHECK boundscheck)
+ elseif(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON")
+ set(SECURE_C_CHECK boundscheck)
else()
set(SECURE_C_CHECK securec)
endif()
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/CMakeLists.txt openGauss-server-5.0.1-edit/src/CMakeLists.txt
*** openGauss-server-5.0.1/src/CMakeLists.txt 2024-05-07 20:16:39.156795348 +0800
--- openGauss-server-5.0.1-edit/src/CMakeLists.txt 2024-05-09 15:36:33.381689446 +0800
***************
*** 192,198 ****
endif()
if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF")
! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .)
endif()
if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON)
if(EXISTS ${DMS_LIB_PATH})
--- 192,200 ----
endif()
if("${ENABLE_MULTIPLE_NODES}" STREQUAL "OFF")
! if(EXISTS ${DCF_LIB_PATH})
! install(DIRECTORY ${DCF_LIB_PATH} DESTINATION .)
! endif()
endif()
if(${ENABLE_MULTIPLE_NODES}_${ENABLE_PRIVATEGAUSS} STREQUAL OFF_OFF AND NOT ${ENABLE_LITE_MODE} STREQUAL ON)
if(EXISTS ${DMS_LIB_PATH})
***************
*** 206,218 ****
endif()
endif()
- install(DIRECTORY ${ZSTD_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE)
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .)
install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs)
endif()
! install(DIRECTORY ${CJSON_LIB_PATH} DESTINATION .)
! install(DIRECTORY ${CJSON_INCLUDE_PATH}/cjson DESTINATION include/postgresql/server)
if(NOT ${ENABLE_LITE_MODE} STREQUAL ON)
install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .)
install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .)
--- 208,218 ----
endif()
endif()
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
install(DIRECTORY ${LIBOBS_LIB_PATH} DESTINATION .)
install(DIRECTORY ${LIBOBS_INCLUDE_PATH} DESTINATION include/postgresql/server/access/obs)
endif()
!
if(NOT ${ENABLE_LITE_MODE} STREQUAL ON)
install(DIRECTORY ${ETCD_BIN_PATH} DESTINATION .)
install(DIRECTORY ${IPERF_LIB_PATH} DESTINATION .)
***************
*** 222,242 ****
install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .)
endif()
endif()
- install(DIRECTORY ${LIBCURL_LIB_PATH} DESTINATION .)
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin)
install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .)
install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .)
endif()
! install(DIRECTORY ${LZ4_LIB_PATH} DESTINATION .)
! install(DIRECTORY ${LZ4_BIN_PATH} DESTINATION .)
! install(DIRECTORY ${LIBOPENSSL_BIN_PATH} DESTINATION .)
! install(DIRECTORY ${LIBOPENSSL_LIB_PATH} DESTINATION . PATTERN "*.a" EXCLUDE )
install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*")
list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA)
if(NOT ${RET_NUMA} EQUAL -1)
! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .)
endif()
if("${ENABLE_MOT}" STREQUAL "ON")
--- 222,240 ----
install(DIRECTORY ${KMC_LIB_PATH} DESTINATION .)
endif()
endif()
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
install(DIRECTORY ${KERBEROS_SBIN_PATH}/ DESTINATION bin)
install(DIRECTORY ${KERBEROS_BIN_PATH} DESTINATION .)
install(DIRECTORY ${KERBEROS_LIB_PATH} DESTINATION .)
endif()
!
install(DIRECTORY ${ZLIB_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libz.*")
list(FIND MACRO_OPTIONS "-D__USE_NUMA" RET_NUMA)
if(NOT ${RET_NUMA} EQUAL -1)
! if(EXISTS ${NUMA_LIB_PATH})
! install(DIRECTORY ${NUMA_LIB_PATH} DESTINATION .)
! endif()
endif()
if("${ENABLE_MOT}" STREQUAL "ON")
***************
*** 251,261 ****
install(CODE "message(\"-- Created symlink: libatomic.so.1 -> libatomic.so.1.2.0\")")
endif()
- install(FILES ${SECUREDYNAMICLIB_HOME}/libsecurec.so DESTINATION lib)
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgcc_s.so.1 DESTINATION lib)
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so DESTINATION lib)
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1 DESTINATION lib)
- install(FILES ${BUILDTOOLS_PATH}/gcc7.3/gcc/lib64/libgomp.so.1.0.0 DESTINATION lib)
install(FILES ${XGBOOST_LIB_PATH}/libxgboost.so DESTINATION lib)
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
install(FILES ${PLJAVA_HOME}/lib/libpljava.so DESTINATION lib)
--- 249,254 ----
***************
*** 273,295 ****
install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib
FILES_MATCHING PATTERN "libatomic.so*")
endif()
-
- install(FILES ${GCC_LIB_PATH}/lib64/libgcc_s.so.1 DESTINATION lib)
- install(DIRECTORY ${GCC_LIB_PATH}/lib64/ DESTINATION lib
- FILES_MATCHING PATTERN "libgomp.so*")
-
- install(CODE "execute_process(
- COMMAND cp ${GCC_LIB_PATH}/lib64/libstdc++.so.6.0.24 ${prefix_home}/lib/libstdc++.so.6
- WORKING_DIRECTORY ${prefix_home}/lib)"
- )
-
- # install(DIRECTORY ${LIBCGROUP_LIB_PATH} DESTINATION . FILES_MATCHING PATTERN "libcgroup.so*")
- install(CODE "execute_process(
- COMMAND cp ${LIBCGROUP_LIB_PATH}/libcgroup.so.1.0.42 ${prefix_home}/lib/libcgroup.so
- COMMAND ln -fs libcgroup.so libcgroup.so.1
- WORKING_DIRECTORY ${prefix_home}/lib)"
- )
- install(CODE "message(\"-- Created symlink: libcgroup.so.1 -> libcgroup.so\")")
# fastcheck part
install(FILES ${PROJECT_SRC_DIR}/test/regress/stub/roach_api_stub/roach_api_stub.control
--- 266,271 ----
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt
*** openGauss-server-5.0.1/src/common/interfaces/libpq/CMakeLists.txt 2024-05-07 20:16:39.540798180 +0800
--- openGauss-server-5.0.1-edit/src/common/interfaces/libpq/CMakeLists.txt 2024-05-09 14:15:40.525188303 +0800
***************
*** 118,129 ****
set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS})
add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}")
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss securec ssl)
else()
! target_link_libraries(pq PRIVATE crypto securec ssl)
endif()
target_link_directories(pq PUBLIC
! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH} ${SECURE_LIB_PATH}
${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common
)
set_target_properties(pq PROPERTIES VERSION 5.5)
--- 118,129 ----
set(pq_LINK_OPTIONS ${LIB_LINK_OPTIONS})
add_shared_libtarget(pq TGT_pq_SRC TGT_pq_INC "${pq_DEF_OPTIONS}" "${pq_COMPILE_OPTIONS}" "${pq_LINK_OPTIONS}")
if(NOT "${ENABLE_LITE_MODE}" STREQUAL "ON")
! target_link_libraries(pq PRIVATE com_err_gauss crypto gssapi_krb5_gauss gssrpc_gauss k5crypto_gauss krb5_gauss krb5support_gauss ${SECURE_C_CHECK} ssl)
else()
! target_link_libraries(pq PRIVATE crypto ${SECURE_C_CHECK} ssl)
endif()
target_link_directories(pq PUBLIC
! ${LIBOPENSSL_LIB_PATH} ${KERBEROS_LIB_PATH}
${PROJECT_SRC_DIR}/common/port ${PROJECT_SRC_DIR}/gstrace/common
)
set_target_properties(pq PROPERTIES VERSION 5.5)
***************
*** 302,308 ****
endif()
add_dependencies(pq_ce libpq_ce cmk_entity_manager_hooks encryption_hooks client_logic_common client_logic_expressions client_logic_cache client_logic_processor client_logic_fmt client_logic_hooks client_logic_data_fetcher frontend_parser)
target_link_directories(pq_ce PUBLIC
- ${SECURE_LIB_PATH}
${KMC_LIB_PATH}
${LIBOPENSSL_LIB_PATH}
${CJSON_LIB_PATH}
--- 302,307 ----
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp
*** openGauss-server-5.0.1/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:16:39.608798681 +0800
--- openGauss-server-5.0.1-edit/src/gausskernel/cbb/communication/libcomm_utils/libcomm_thread.cpp 2024-05-07 20:17:58.873383188 +0800
***************
*** 2417,2423 ****
#else
switch ((comm_sender_flower_pid = fork_process())) {
#endif
! case -1:
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
--- 2417,2423 ----
#else
switch ((comm_sender_flower_pid = fork_process())) {
#endif
! case (ThreadId)-1:
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
***************
*** 2454,2460 ****
#else
switch ((comm_receiver_flower_pid = fork_process())) {
#endif
! case -1:
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
--- 2454,2460 ----
#else
switch ((comm_receiver_flower_pid = fork_process())) {
#endif
! case (ThreadId)-1:
ereport(LOG, (errmsg("could not fork comm sender flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
***************
*** 2488,2494 ****
#else
switch ((comm_auxiliary_pid = fork_process())) {
#endif
! case -1:
ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
--- 2488,2494 ----
#else
switch ((comm_auxiliary_pid = fork_process())) {
#endif
! case (ThreadId)-1:
ereport(LOG, (errmsg("could not fork comm auxiliary flower process: %m")));
return 0;
#ifndef EXEC_BACKEND
***************
*** 2522,2528 ****
switch ((comm_receiver_pid = fork_process()))
#endif
{
! case -1:
ereport(LOG, (errmsg("could not fork comm receiver process: %m")));
return 0;
#ifndef EXEC_BACKEND
--- 2522,2528 ----
switch ((comm_receiver_pid = fork_process()))
#endif
{
! case (ThreadId)-1:
ereport(LOG, (errmsg("could not fork comm receiver process: %m")));
return 0;
#ifndef EXEC_BACKEND
diff -crN '--exclude=.git' '--exclude=.gitee' '--exclude=.vscode' openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp
*** openGauss-server-5.0.1/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:16:39.940801129 +0800
--- openGauss-server-5.0.1-edit/src/gausskernel/storage/smgr/smgr.cpp 2024-05-07 20:17:59.201385607 +0800
***************
*** 949,955 ****
return convertScalarToDatumT<UNKNOWNOID>;
}
default: {
! return convertScalarToDatumT<-2>;
}
}
}
--- 949,955 ----
return convertScalarToDatumT<UNKNOWNOID>;
}
default: {
! return convertScalarToDatumT<((Oid)-2)>;
}
}
}