Skip to content

Commit

Permalink
build: upgrade thirdpary precompiled (4paradigm#1964)
Browse files Browse the repository at this point in the history
- zookeeper c client build should check pkg-config
- update docs
- build: upgrade thirdparty pre-compiled to 0.5.0
  • Loading branch information
aceforeverd authored Jun 17, 2022
1 parent ab8f2bb commit 74217a9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
FROM centos:7

ARG ZETASQL_VERSION=0.2.10
ARG THIRDPARTY_VERSION=0.5.0.b3
ARG THIRDPARTY_VERSION=0.5.0
ARG TARGETARCH

LABEL org.opencontainers.image.source https://github.com/4paradigm/OpenMLDB
Expand Down
8 changes: 4 additions & 4 deletions docker/setup_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ mkdir -p /deps/usr

if [[ "$ARCH" = "x86_64" ]]; then
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" && \
echo "downloaded thirdparty.tar.gz for $ARCH"
echo "downloaded thirdparty.tar.gz version $THIRDPARTY_VERSION for $ARCH"
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" && \
echo "downloaed zetasql.tar.gz for $ARCH"
echo "downloaed zetasql.tar.gz version $ZETASQL_VERSION for $ARCH"
elif [[ "$ARCH" = "aarch64" ]]; then
# NOTE(aceforeverd): thirdparty for arm is out-of-date
curl -Lo thirdparty.tar.gz https://github.com/4paradigm/hybridsql-asserts/releases/download/v0.4.0/thirdparty-2021-08-03-linux-gnu-aarch64.tar.gz && \
echo "downloaded thirdparty.tar.gz for $ARCH"
echo "downloaded thirdparty.tar.gz version 0.4.0 for $ARCH"
curl -Lo zetasql.tar.gz "https://github.com/4paradigm/zetasql/releases/download/v0.2.6/libzetasql-0.2.6-linux-gnu-aarch64-centos.tar.gz" && \
echo "downloaed zetasql.tar.gz for $ARCH"
echo "downloaed zetasql.tar.gz for version 0.2.6 $ARCH"
else
echo "no pre-compiled deps for arch=$ARCH"
exit 1
Expand Down
10 changes: 5 additions & 5 deletions third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set(SRC_INSTALL_DIR "${CMAKE_BINARY_DIR}/src" CACHE PATH "Source code install di
# By default, thirdparty dependencies was fetched/build into the same directory with OpenMLDB
option(BUILD_BUNDLED "Build dependencies from source" OFF)
option(BUILD_BUNDLED_ZETASQL "Build zetasql from source" ${BUILD_BUNDLED})
option(WITH_ZETASQL "Download or build zetasql" ON)
option(WITH_ZETASQL "Download and build zetasql" ON)

option(BUILD_BUNDLED_ABSL "Build abseil-cpp from source" ${BUILD_BUNDLED})
option(BUILD_BUNDLED_PROTOBUF "Build protobuf from source" ${BUILD_BUNDLED})
Expand Down Expand Up @@ -68,7 +68,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.5.0.b3)
set(HYBRIDSQL_ASSERTS_VERSION 0.5.0)

function(get_linux_lsb_release_information)
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/get-lsb-release.sh
Expand All @@ -90,17 +90,17 @@ function(init_hybridsql_thirdparty_urls)
else()
if (LSB_RELEASE_ID_SHORT STREQUAL "centos")
set(HYBRIDSQL_ASSERTS_URL "${HYBRIDSQL_ASSERTS_HOME}/releases/download/v${HYBRIDSQL_ASSERTS_VERSION}/thirdparty-${HYBRIDSQL_ASSERTS_VERSION}-linux-gnu-x86_64-centos.tar.gz" PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH 1858d7b8950f41fbbdb5293d9843ae15ec3aecd08b7bba5ffe263a8b9e6c8b81 PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH 959ba9e41f1faaae474484c7233b335a4e677ca87f408c04e0e43b012576d997 PARENT_SCOPE)
elseif(LSB_RELEASE_ID_SHORT STREQUAL "ubuntu")
set(HYBRIDSQL_ASSERTS_URL "${HYBRIDSQL_ASSERTS_HOME}/releases/download/v${HYBRIDSQL_ASSERTS_VERSION}/thirdparty-${HYBRIDSQL_ASSERTS_VERSION}-linux-gnu-x86_64-ubuntu.tar.gz" PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH eea077b3120fdcc59e64ef36f1c05d887689e4ae2f1daa58844385da83ca3729 PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH 885cc2a955b6c0610c7d68b8ca3b54d3f410f32d4eaaee0a82a1dbfc88a22f54 PARENT_SCOPE)
else()
message(FATAL_ERROR "no pre-compiled thirdparty for your operation system, try compile thirdparty from source with '-DBUILD_BUNDLED=ON'")
endif()
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(HYBRIDSQL_ASSERTS_URL "${HYBRIDSQL_ASSERTS_HOME}/releases/download/v${HYBRIDSQL_ASSERTS_VERSION}/thirdparty-${HYBRIDSQL_ASSERTS_VERSION}-darwin-i386.tar.gz" PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH 71cece443fba8bb5a21cf86399aaf093b3063c1f811cffcf65dd04c68ea10520 PARENT_SCOPE)
set(HYBRIDSQL_ASSERTS_HASH 0e964e82f664cb7f1c124e29a01ea8de25711549c8d1a0c5da07ed24edb1b264 PARENT_SCOPE)
endif()
endfunction()

Expand Down
4 changes: 4 additions & 0 deletions third-party/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ where compiled libraries are installed into `build/usr`, source code installed i

Source code install directory.

- WITH_ZETASQL:BOOL=ON

Download and build zetasql

## Guide to compile thirdparty all from source

By default, cmake will download pre-compiled thirdparty to speedup OpenMLDB building. However that may not always goes well since the pre-compiled thirdparty is not platform compatible.
Expand Down
1 change: 1 addition & 0 deletions third-party/cmake/FetchZookeeper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (BUILD_BUNDLED_ZOOKEEPER)
set(ZOOKEEPER_CONF COMMAND bash -c "CC=clang CFLAGS='-O3 -fPIC' ./configure --prefix=<INSTALL_DIR> --enable-shared=no")
else()
find_program(AUTORECONF NAMES autoreconf REQUIRED)
find_program(PKGCONF NAME pkg-config REQUIRED)
include(Findcppunit)
if (NOT CPPUNIT_FOUND)
message(FATAL_ERROR "zookeeper require cppunit")
Expand Down

0 comments on commit 74217a9

Please sign in to comment.