Skip to content

Commit ff80b35

Browse files
committed
feat: Fix some errors when compiling on Ubuntu:22.04
1 parent 6eeaa26 commit ff80b35

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ LABEL org.opencontainers.image.source https://github.com/4paradigm/OpenMLDB
2424
COPY ./*.sh /
2525

2626
RUN apt update -y && \
27-
apt install -y build-essential python3-dev openjdk-11-jdk flex doxygen lcov git && \
27+
apt install -y build-essential python3-dev openjdk-11-jdk flex doxygen lcov git curl && \
2828
apt clean cache && \
2929
curl -Lo zookeeper.tar.gz https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz && \
3030
mkdir -p /deps/src && \
31-
tar xzf zookeeper.tar.gz -C /deps/src && \
31+
tar xf zookeeper.tar.gz -C /deps/src && \
3232
/setup_deps.sh -z "$ZETASQL_VERSION" -t "$THIRDPARTY_VERSION" && \
3333
rm -v /*.sh
3434

docker/setup_deps.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pushd "$(dirname "$0")"
7777

7878
curl -Lo cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-linux-"$ARCH".tar.gz && \
7979
echo "downloaded cmake.tar.gz for $ARCH"
80-
tar xzf cmake.tar.gz -C /usr/local/ --strip-components=1
80+
tar xf cmake.tar.gz -C /usr/local/ --strip-components=1
8181
rm -v cmake.tar.gz
8282

8383
mkdir -p /deps/usr
@@ -86,19 +86,19 @@ if [[ "$ARCH" = "x86_64" ]]; then
8686
curl -Lo thirdparty.tar.gz "https://github.com/4paradigm/hybridsql-asserts/releases/download/v${THIRDPARTY_VERSION}/thirdparty-${THIRDPARTY_VERSION}-linux-gnu-x86_64-centos.tar.gz" && \
8787
echo "downloaded thirdparty.tar.gz version $THIRDPARTY_VERSION for $ARCH"
8888
curl -Lo zetasql.tar.gz "https://github.com/4paradigm/zetasql/releases/download/v${ZETASQL_VERSION}/libzetasql-${ZETASQL_VERSION}-linux-gnu-x86_64-centos.tar.gz" && \
89-
echo "downloaed zetasql.tar.gz version $ZETASQL_VERSION for $ARCH"
89+
echo "downloaded zetasql.tar.gz version $ZETASQL_VERSION for $ARCH"
9090
elif [[ "$ARCH" = "aarch64" ]]; then
9191
curl -Lo thirdparty.tar.gz "https://github.com/4paradigm/hybridsql-asserts/releases/download/v${THIRDPARTY_VERSION}/thirdparty-${THIRDPARTY_VERSION}-linux-gnu-${ARCH}.tar.gz" && \
9292
echo "downloaded thirdparty.tar.gz version $THIRDPARTY_VERSION for $ARCH"
9393
curl -Lo zetasql.tar.gz "https://github.com/4paradigm/zetasql/releases/download/v${ZETASQL_VERSION}/libzetasql-${ZETASQL_VERSION}-linux-gnu-${ARCH}.tar.gz" && \
94-
echo "downloaed zetasql.tar.gz version $ZETASQL_VERSION for $ARCH"
94+
echo "downloaded zetasql.tar.gz version $ZETASQL_VERSION for $ARCH"
9595
else
9696
echo "no pre-compiled deps for arch=$ARCH"
9797
exit 1
9898
fi
9999

100-
tar xzf thirdparty.tar.gz -C /deps/usr --strip-components=1
101-
tar xzf zetasql.tar.gz -C /deps/usr --strip-components=1
100+
tar xf thirdparty.tar.gz -C /deps/usr --strip-components=1
101+
tar xf zetasql.tar.gz -C /deps/usr --strip-components=1
102102
rm -v ./*.tar.gz
103103

104104
popd

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ function(compile_lib LIB_NAME DIR DEPEND_FILE_LIST)
5656
set(FILE_STR_LIST "${FILE_STR_LIST} ${DEPEND_FILE_LIST}")
5757
string(REPLACE " " ";" FILE_LIST ${FILE_STR_LIST})
5858
add_library(${LIB_NAME} STATIC ${FILE_LIST} $<TARGET_OBJECTS:openmldb_proto>)
59+
target_compile_options(${LIB_NAME} PRIVATE
60+
$<$<COMPILE_LANGUAGE:CXX>:-Wno-error=nonnull>
61+
$<$<COMPILE_LANGUAGE:C>:-Wno-error=nonnull>
62+
)
5963
endfunction(compile_lib)
6064

6165
set(TEST_LIBS

src/client/ns_client.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <algorithm>
2323
#include <map>
2424
#include <memory>
25+
#include <optional>
2526
#include <set>
2627
#include <string>
2728
#include <vector>

third-party/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ set(MAKEOPTS "$ENV{MAKEOPTS}" CACHE STRING "Extra options to make")
7676
message(STATUS "Install bundled dependencies into ${DEPS_INSTALL_DIR}")
7777

7878
set(HYBRIDSQL_ASSERTS_HOME https://github.com/4paradigm/hybridsql-asserts)
79-
set(HYBRIDSQL_ASSERTS_VERSION 0.7.0)
79+
set(HYBRIDSQL_ASSERTS_VERSION 0.7.1)
8080

8181
function(get_linux_lsb_release_information)
8282
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/get-lsb-release.sh

0 commit comments

Comments
 (0)