From c49fa494f93b81496d7c3394693aafa890e9b029 Mon Sep 17 00:00:00 2001 From: shouren Date: Wed, 4 Dec 2024 18:53:21 +0800 Subject: [PATCH] feat: Fix some errors when compiling on Ubuntu:22.04 --- docker/Dockerfile | 4 ++-- src/CMakeLists.txt | 4 ++++ src/client/ns_client.h | 1 + third-party/CMakeLists.txt | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 3c2df3b4823..aecf39c69e1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -24,11 +24,11 @@ LABEL org.opencontainers.image.source https://github.com/4paradigm/OpenMLDB COPY ./*.sh / RUN apt update -y && \ - apt install -y build-essential python3-dev openjdk-11-jdk flex doxygen lcov git && \ + apt install -y build-essential python3-dev openjdk-11-jdk flex doxygen lcov git curl && \ apt clean cache && \ curl -Lo zookeeper.tar.gz https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz && \ mkdir -p /deps/src && \ - tar xzf zookeeper.tar.gz -C /deps/src && \ + tar xf zookeeper.tar.gz -C /deps/src && \ /setup_deps.sh -z "$ZETASQL_VERSION" -t "$THIRDPARTY_VERSION" && \ rm -v /*.sh diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index abf7ecdf727..e5e34febe36 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -56,6 +56,10 @@ function(compile_lib LIB_NAME DIR DEPEND_FILE_LIST) set(FILE_STR_LIST "${FILE_STR_LIST} ${DEPEND_FILE_LIST}") string(REPLACE " " ";" FILE_LIST ${FILE_STR_LIST}) add_library(${LIB_NAME} STATIC ${FILE_LIST} $) + target_compile_options(${LIB_NAME} PRIVATE + $<$:-Wno-error=nonnull> + $<$:-Wno-error=nonnull> + ) endfunction(compile_lib) set(TEST_LIBS diff --git a/src/client/ns_client.h b/src/client/ns_client.h index 1ddd50963bf..dc2a9848fb1 100644 --- a/src/client/ns_client.h +++ b/src/client/ns_client.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index fde8c086b71..5d8b4b4b2cd 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -76,7 +76,7 @@ set(MAKEOPTS "$ENV{MAKEOPTS}" CACHE STRING "Extra options to make") message(STATUS "Install bundled dependencies into ${DEPS_INSTALL_DIR}") set(HYBRIDSQL_ASSERTS_HOME https://github.com/4paradigm/hybridsql-asserts) -set(HYBRIDSQL_ASSERTS_VERSION 0.7.0) +set(HYBRIDSQL_ASSERTS_VERSION 0.7.1) function(get_linux_lsb_release_information) execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/get-lsb-release.sh