Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: cmake may fail in swig and rapidjson #3864

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/other-os-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
export PATH=$PATH:`pwd`
source /opt/rh/devtoolset-8/enable
if [[ "${USE_DEPS_CACHE}" != "true" ]]; then
echo "build thirdparty, make opt is better than nproc?"
echo "build thirdparty, make opt is better than nproc"
make thirdparty CMAKE_INSTALL_PREFIX=${OPENMLDB_PREFIX} BUILD_BUNDLE=ON THIRD_PARTY_CMAKE_FLAGS=-DMAKEOPTS=-j8
# 5.8G ./.deps, avail 8G
rm -rf .deps/build # GitHub runner disk space is limited
Expand Down Expand Up @@ -119,10 +119,7 @@ jobs:
# rm build/hybridse build/src -rf
if [[ "${SQL_JAVASDK_ENABLE}" == "ON" ]]; then
echo "build java sdk"
cmake -S . -B `pwd`/build -DCMAKE_PREFIX_PATH=`pwd`/.deps/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DSQL_PYSDK_ENABLE=OFF -DSQL_JAVASDK_ENABLE=ON \
-DTESTING_ENABLE=OFF -DCMAKE_INSTALL_PREFIX=${OPENMLDB_PREFIX} \
-DHYBRIDSE_TESTING_ENABLE=OFF -DEXAMPLES_ENABLE=OFF -DEXAMPLES_TESTING_ENABLE=OFF
cmake -S . -B `pwd`/build -DSQL_PYSDK_ENABLE=OFF -DSQL_JAVASDK_ENABLE=ON
# if build the whole java, 7.6G ./build, 5.7G ./java, avail 331M
# so split it and build native only
# 7.6G ./build, 1.8G ./java, avail 5.2G
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ if (MAC_TABLET_ENABLE)
add_compile_definitions(__mac_tablet__=1)
endif ()

set(SWIG_DIR ${CMAKE_PREFIX_PATH}/share/swig/4.0.1)
find_package(SWIG REQUIRED)
include(UseSWIG)

Expand Down
9 changes: 9 additions & 0 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ function(add_contrib cmake_folder)
endfunction()

add_contrib(simdjson)
CMAKE_POLICY(GET CMP0077 var)
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif ()
set(RAPIDJSON_BUILD_DOC OFF)
set(RAPIDJSON_BUILD_EXAMPLES OFF)
set(RAPIDJSON_BUILD_TESTS OFF)
add_contrib(rapidjson)
cmake_policy(SET CMP0077 ${var})

add_contrib(farmhash)

if (BUILD_SHARED_LIBS)
Expand Down
6 changes: 5 additions & 1 deletion steps/centos6_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ function tool_install() {
echo "tools install"
yum install -y bison bison-devel byacc cppunit-devel patch devtoolset-8-gcc devtoolset-8-gcc-c++
echo "ID=centos" > /etc/os-release
if [ -f "bazel" ]; then
echo "bazel exists"
return
fi
if [ "$OPENMLDB_SOURCE" == "true" ]; then
echo "download bazel from openmldb.ai"
curl -SLo bazel https://openmldb.ai/download/legacy/bazel-1.0.0
Expand Down Expand Up @@ -71,7 +75,7 @@ if [ -e ".deps/build/src/zetasql-stamp/zetasql-build" ]; then
echo "zetasql already exists, skip add patch, if you want, rm .deps/build/src/zetasql-stamp/zetasql-build or whole .deps/build/src/zetasql*"
else
echo "modify in .deps needs a make first, download&build zetasql first(build will fail)"
cmake -S third-party -B "$(pwd)"/.deps -DSRC_INSTALL_DIR="$(pwd)"/thirdsrc -DDEPS_INSTALL_DIR="$(pwd)"/.deps/usr -DBUILD_BUNDLED=ON
cmake -S third-party -B "$(pwd)"/.deps -DSRC_INSTALL_DIR="$(pwd)"/thirdsrc -DDEPS_INSTALL_DIR="$(pwd)"/.deps/usr -DBUILD_BUNDLED=ON -DMAKEOPTS=-j8
cmake --build "$(pwd)"/.deps --target zetasql
echo "add patch in .deps zetasql"
sed -i'' "26s/lm'/lm:-lrt'/" .deps/build/src/zetasql/build_zetasql_parser.sh
Expand Down
Loading