add openGauss-finance with open features

This commit is contained in:
z00793368
2023-08-29 15:21:40 +08:00
parent 58db3bf37d
commit 8d085df374
10 changed files with 125 additions and 42 deletions

View File

@ -144,6 +144,8 @@ else
declare CMAKE_BUILD_DIR=${ROOT_DIR}/tmp_build
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}"
elif [ "$product_mode"x == "finance"x ]; then
declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_FINANCE_MODE=ON ${extra_cmake_opt}"
else
declare CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_MOT=ON ${extra_cmake_opt}"
fi

View File

@ -443,6 +443,7 @@ function install_gaussdb()
export THIRD_BIN_PATH="${binarylibs_path}"
export PREFIX_HOME="${BUILD_DIR}"
export ENABLE_LITE_MODE=ON
export ENABLE_FINANCE_MODE=ON
if [ "$version_mode"x == "release"x ]; then
CMAKE_OPT="-DENABLE_MULTIPLE_NODES=OFF -DENABLE_PRIVATEGAUSS=OFF -DENABLE_THREAD_SAFETY=ON -DENABLE_LITE_MODE=ON"

View File

@ -183,6 +183,21 @@ function install_gaussdb()
./configure $shared_opt CFLAGS="-O0 ${GAUSSDB_EXTRA_FLAGS}" --enable-debug --enable-cassert CC=g++ $extra_config_opt --enable-lite-mode>> "$LOG_FILE" 2>&1
fi
fi
elif [ "$product_mode"x == "finance"x ]; then
shared_opt="--gcc-version=${gcc_version}.${gcc_sub_version} --prefix="${BUILD_DIR}" --3rd=${binarylib_dir} --enable-thread-safety ${enable_readline} ${with_tassl} --without-zlib --without-gssapi --without-krb5"
if [ "$version_mode"x == "release"x ]; then
# configure -D__USE_NUMA -D__ARM_LSE with arm single mode
if [ "$PLATFORM_ARCH"X == "aarch64"X ] ; then
echo "configure -D__USE_NUMA -D__ARM_LSE with arm single mode"
GAUSSDB_EXTRA_FLAGS=" -D__USE_NUMA -D__ARM_LSE"
fi
./configure $shared_opt CFLAGS="-O2 -g3 ${GAUSSDB_EXTRA_FLAGS}" CC=g++ $extra_config_opt --enable-finance-mode >> "$LOG_FILE" 2>&1
elif [ "$version_mode"x == "memcheck"x ]; then
./configure $shared_opt CFLAGS='-O0' --enable-debug --enable-cassert --enable-memory-check CC=g++ $extra_config_opt --enable-finance-mode >> "$LOG_FILE" 2>&1
else
./configure $shared_opt CFLAGS="-O0 ${GAUSSDB_EXTRA_FLAGS}" --enable-debug --enable-cassert CC=g++ $extra_config_opt --enable-finance-mode>> "$LOG_FILE" 2>&1
fi
fi
if [ $? -ne 0 ]; then
die "configure failed."

View File

@ -56,6 +56,7 @@ option(ENABLE_LCOV "enable lcov, the old is --enable-lcov" OFF)
option(ENABLE_MULTIPLE_NODES "enable distribute,the old is --enable-multiple-nodes" OFF)
option(ENABLE_PRIVATEGAUSS "enable privategauss,the old is --enable-pribategauss" OFF)
option(ENABLE_LITE_MODE "enable lite in single_node mode,the old is --enable-lite-mode" OFF)
option(ENABLE_FINANCE_MODE "enable finance in single_node mode,the old is --enable-finance-mode" OFF)
option(ENABLE_DEBUG "enable privategauss,the old is --enable-pribategauss" OFF)
option(ENABLE_MOT "enable mot in single_node mode,the old is --enable-mot" OFF)
option(ENABLE_NUMA "enable numa,the old is --enable-numa" ON)
@ -355,3 +356,7 @@ endif()
if("${ENABLE_MULTIPLE_NODES}" STREQUAL "ON" AND "${ENABLE_LITE_MODE}" STREQUAL "ON")
message(FATAL_ERROR "error: --enable-lite-mode option is not supported with --enable-multiple-nodes option")
endif()
if("${ENABLE_FINANCE_NODES}" STREQUAL "ON" AND "${ENABLE_LITE_MODE}" STREQUAL "ON")
message(FATAL_ERROR "error: --enable-lite-mode option is not supported with --enable-finance-nodes option")
endif()

View File

@ -119,6 +119,9 @@ function get_gs_version()
if [ "${ENABLE_LITE_MODE}" == "ON" ]; then
product="$product-lite"
fi
if [ "${ENABLE_FINANCE_MODE}" == "ON" ]; then
product="$product-finance"
fi
if test "$enable_ccache" = yes; then
default_gs_version="(${product} ${version} build 1f1f1f1f) compiled at 2100-00-00 00:00:00 commit 9999 last mr 9999 debug"
else

View File

@ -920,6 +920,10 @@
* * (--enable-lite-mode) */
#cmakedefine ENABLE_LITE_MODE
/* Define to 1 if you want to generate gauss product as finance mode.
* * (--enable-lite-mode) */
#cmakedefine ENABLE_FINANCE_MODE
/* Define to 1 if you want to use mot
* --enable-mot */
#cmakedefine ENABLE_MOT

131
configure vendored
View File

@ -752,6 +752,7 @@ enable_jemalloc_debug
enable_privategauss
enable_multiple_nodes
enable_lite_mode
enable_finance_mode
enable_mot
enable_memory_check
enable_mysql_fdw
@ -837,6 +838,7 @@ enable_jemalloc_debug
enable_privategauss
enable_multiple_nodes
enable_lite_mode
enable_finance_mode
enable_mot
enable_memory_check
enable_mysql_fdw
@ -2876,47 +2878,6 @@ _ACEOF
fi
# Check whether --enable-mot was given.
if test "${enable_mot+set}" = set; then
enableval=$enable_mot;
case $enableval in
yes)
if test "$enable_multiple_nodes" = yes; then
{ { $as_echo "$as_me:$LINENO: error: --enable-mot option is not supported with --enable-multiple-nodes option" >&5
$as_echo "$as_me: error: --enable-mot option is not supported with --enable-multiple-nodes option" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
no)
:
;;
*)
{ { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-mot option" >&5
$as_echo "$as_me: error: no argument expected for --enable-mot option" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
enable_mot=no
fi
if test "$enable_multiple_nodes" = yes; then
enable_mot=no
fi
if test "$enable_mot" = yes; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_MOT 1
_ACEOF
fi
#
# '-memory-check'-like feature can be enabled
#
@ -3231,6 +3192,94 @@ _ACEOF
fi
#
# --enable-finance-mode enables
#
# Check whether --enable-finance-mode was given.
if test "${enable_finance_mode+set}" = set; then
enableval=$enable_finance_mode;
case $enableval in
yes)
if test "$enable_lite_nodes" = yes; then
{ { $as_echo "$as_me:$LINENO: error: --enable-finance-mode option is not supported with --enable-lite-nodes option" >&5
$as_echo "$as_me: error: --enable-finance-mode option is not supported with --enable-lite-nodes option" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
no)
:
;;
*)
{ { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-finance-mode option" >&5
$as_echo "$as_me: error: no argument expected for --enable-finance-mode option" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
enable_finance_mode=no
fi
if test "$enable_lite_nodes" = yes; then
enable_finance_mode=no
fi
if test "$enable_finance_mode" = yes; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_FINANCE_MODE 1
_ACEOF
fi
# Check whether --enable-mot was given.
if test "${enable_mot+set}" = set; then
enableval=$enable_mot;
case $enableval in
yes)
if test "$enable_multiple_nodes" = yes; then
{ { $as_echo "$as_me:$LINENO: error: --enable-mot option is not supported with --enable-multiple-nodes option" >&5
$as_echo "$as_me: error: --enable-mot option is not supported with --enable-multiple-nodes option" >&2;}
{ (exit 1); exit 1; }; }
fi
;;
no)
:
;;
*)
{ { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-mot option" >&5
$as_echo "$as_me: error: no argument expected for --enable-mot option" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
enable_mot=no
fi
if test "$enable_multiple_nodes" = yes; then
enable_mot=no
fi
if test "$enable_finance_mode" = yes; then
enable_mot=no
fi
if test "$enable_mot" = yes; then
cat >>confdefs.h <<\_ACEOF
#define ENABLE_MOT 1
_ACEOF
fi
#
# --with-openeuler-os enable

View File

@ -173,6 +173,7 @@ enable_jemalloc_debug = @enable_jemalloc_debug@
enable_privategauss = @enable_privategauss@
enable_multiple_nodes = @enable_multiple_nodes@
enable_lite_mode = @enable_lite_mode@
enable_finance_mode = @enable_finance_mode@
enable_mot = @enable_mot@
enable_mysql_fdw = @enable_mysql_fdw@
enable_oracle_fdw = @enable_oracle_fdw@

View File

@ -843,7 +843,7 @@ Oid CreateTableSpace(CreateTableSpaceStmt* stmt)
errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("tablespaces are not supported on this platform")));
#endif /* HAVE_SYMLINK */
return tablespaceoid;
return tablespaceoid;
}
/*

View File

@ -67,6 +67,9 @@
/* Define to 1 if you want to generate gauss product as lite mode. (--enable-lite-mode) */
#undef ENABLE_LITE_MODE
/* Define to 1 if you want to generate gauss product as finance mode. (--enable-finance-mode) */
#undef ENABLE_FINANCE_MODE
/* Define to 1 if you want MOT support. (--enable-mot).
Supported only in single_node mode, not supported with (--enable-multiple-nodes) */
#undef ENABLE_MOT