Skip to content

Commit 0d43d91

Browse files
Add Ubuntu 24.04 support & upgrade arrow 18 (#151)
* add ubuntu 24.04 support;upgrade arrow18 * add libxml2 * Update build.yml * Update docker.yml * Update build.yml * Update docker.yml * Update libxml2.cmake * Update boost.cmake * Update boost.cmake * Update install-third-party.sh * Update build.yml * Update install-third-party.sh * Delete project/patches/arrow-11.0.0.patch * Update libxml2.cmake * Update arrow.cmake * Update libxml2.cmake * Update libxml2.cmake * Update build.yml
1 parent 6e04c3f commit 0d43d91

File tree

11 files changed

+161
-59
lines changed

11 files changed

+161
-59
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,11 @@ jobs:
4141
#- ubuntu1604
4242
#- ubuntu1804
4343
- ubuntu2004
44-
#- ubuntu2204
45-
compiler:
46-
- 9.3.0
47-
- ''
44+
- ubuntu2204
45+
- ubuntu2404
4846
arch:
4947
- x64
5048
- arm64
51-
exclude:
52-
- os: centos7
53-
compiler: ''
54-
#- os: centos8
55-
# compiler: ''
56-
#- os: ubuntu2204
57-
# compiler: '9.3.0'
5849
container:
5950
image: vesoft/third-party-build:${{ matrix.os }}
6051
steps:
@@ -63,11 +54,11 @@ jobs:
6354
run: find . -mindepth 1 -delete
6455
- uses: actions/checkout@v4
6556
- name: Set up environment
66-
if: matrix.compiler != ''
57+
if: matrix.os = 'centos7'
6758
run: |
6859
export URL=https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install
6960
bash <(curl -Ls $URL)
70-
install-gcc --version=${{ matrix.compiler }}
61+
install-gcc --version=9.5.0
7162
- name: Pre-Build
7263
run: |
7364
mkdir -p _build
@@ -76,8 +67,8 @@ jobs:
7667
cat .env
7768
- name: Build
7869
run: |
79-
if [[ -n "${{ matrix.compiler }}" ]]; then
80-
export TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/${{ matrix.compiler }}
70+
if [[ "${{ matrix.os }}" == "centos7" }}" ]]; then
71+
export TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/9.5.0
8172
export CC=${TOOLSET_GCC_DIR}/bin/gcc
8273
export CXX=${TOOLSET_GCC_DIR}/bin/g++
8374
export PATH=${TOOLSET_GCC_DIR}/bin:${PATH}

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- centos-8
2828
- ubuntu-2004
2929
- ubuntu-2204
30+
- ubuntu-2404
3031
steps:
3132
- name: Setup environment variables
3233
id: vars

docker/buildx/ubuntu-2404.Dockerfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
FROM ubuntu:24.04
2+
SHELL ["/bin/bash", "-c"]
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG GOLANG_VERSION=1.21.6
5+
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
6+
RUN apt update \
7+
&& apt install -y make \
8+
git \
9+
m4 \
10+
curl \
11+
wget \
12+
unzip \
13+
xz-utils \
14+
patch \
15+
python3 \
16+
python3-dev \
17+
lsb-release \
18+
zlib1g-dev \
19+
build-essential \
20+
libreadline-dev \
21+
libncurses-dev \
22+
cmake \
23+
libtool \
24+
automake \
25+
autoconf \
26+
autoconf-archive \
27+
autotools-dev \
28+
bison \
29+
flex \
30+
gperf \
31+
gettext \
32+
ninja-build \
33+
groff-base \
34+
texinfo \
35+
&& apt clean \
36+
&& rm -rf /var/lib/apt/lists/*
37+
38+
# Install golang
39+
RUN ARCH="$(uname -m)"; \
40+
case "${ARCH}" in \
41+
x86_64) GOARCH='amd64';; \
42+
aarch64) GOARCH='arm64';; \
43+
*) echo "Unsupported architecture: ${ARCH}" && exit 1;; \
44+
esac; \
45+
curl -L https://go.dev/dl/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz -o go.tar.gz && \
46+
tar -C /usr/local -xzf go.tar.gz && \
47+
rm go.tar.gz
48+
ENV PATH="/usr/local/go/bin:${PATH}"
49+
50+
# Install ossutil
51+
RUN curl https://gosspublic.alicdn.com/ossutil/install.sh | bash
52+
53+
# Install MinIO Client
54+
RUN if [ "$(uname -m)" = "aarch64" ]; then \
55+
curl -O https://dl.min.io/client/mc/release/linux-arm64/mc; \
56+
else \
57+
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc; \
58+
fi \
59+
&& chmod +x mc \
60+
&& mv mc /usr/local/bin
61+
62+
ENV PACKAGE_DIR=/usr/src/third-party
63+
RUN mkdir -p ${PACKAGE_DIR}
64+
WORKDIR ${PACKAGE_DIR}

install-third-party.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ source $this_dir/.env
2626

2727
# We consider two derivatives: Red Hat and Debian
2828
# Place preset libc versions of each from newer to older
29-
libc_preset_versions=( 2.35 2.34 2.31 2.28 2.27 2.23 2.17 )
30-
gcc_preset_versions=( 10.1.0 9.3.0 9.2.0 9.1.0 8.3.0 7.5.0 7.1.0 )
29+
+libc_preset_versions=( 2.35 2.34 2.31 2.28 2.17 )
30+
+gcc_preset_versions=( 13.2.0 11.4.0 9.5.0 9.4.0 9.3.0 8.5.0 )
3131

3232
selected_libc_version=
3333
selected_gcc_version=

project/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ set(ALL_TARGETS
246246
hnswlib
247247
openblas
248248
annoy
249+
libxml2
249250
)
250251

251252
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
@@ -334,7 +335,7 @@ maybe_add_dependencies(cachelib fbthrift sparsemap fizz googletest)
334335
# Here we build gtest after rocksdb intentionally
335336
maybe_add_dependencies(googletest rocksdb gflags)
336337

337-
maybe_add_dependencies(arrow openssl xsimd llvm boost jemalloc zstd utf8proc protobuf re2)
338+
maybe_add_dependencies(arrow openssl xsimd llvm boost jemalloc zstd utf8proc protobuf re2 libxml2)
338339
maybe_add_dependencies(protobuf zlib abseil)
339340
maybe_add_dependencies(re2 abseil)
340341
maybe_add_dependencies(grpc protobuf re2 c-ares openssl)

project/externals/arrow.cmake

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
#
33
# This source code is licensed under Apache 2.0 License.
44
# This source code is licensed under Apache 2.0 License.
5+
set(name arrow)
6+
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
7+
58
if(DISTRO_NAME STREQUAL "CentOS Linux" AND DISTRO_VERSION_ID STREQUAL "7")
69
set(USE_LLVM_CXX ON)
710
else()
811
set(USE_LLVM_CXX OFF)
912
endif()
1013

11-
set(name arrow)
12-
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
1314
set(ARROW_CMAKE_ARGS
14-
-DProtobuf_SOURCE=BUNDLED
15+
${common_cmake_args}
16+
-DProtobuf_SOURCE=SYSTEM
1517
-Dre2_SOURCE=SYSTEM
1618
-DBoost_ROOT=${CMAKE_INSTALL_PREFIX}
1719
-DGTest_ROOT=${CMAKE_INSTALL_PREFIX}
@@ -36,21 +38,24 @@ set(ARROW_CMAKE_ARGS
3638
-DARROW_BUILD_SHARED=ON
3739
-DARROW_TEST_MEMCHECK=OFF
3840
-DARROW_PYTHON=OFF
41+
-DARROW_PARQUET=ON
42+
-DARROW_ORC=ON
43+
-DARROW_DATASET=ON
3944
-DUSE_LLVM_CXX=${USE_LLVM_CXX}
4045
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=\$ORIGIN:\$ORIGIN/../3rd
4146
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
4247
)
4348

4449
ExternalProject_Add(
4550
${name}
46-
URL https://github.com/apache/arrow/archive/refs/tags/apache-arrow-11.0.0.tar.gz
47-
URL_HASH MD5=c31335b6f5422a352e2aef5a7a469c91
48-
DOWNLOAD_NAME apache-arrow-11.0.0.tar.gz
51+
URL https://github.com/apache/arrow/archive/refs/tags/apache-arrow-18.0.0.tar.gz
52+
URL_HASH MD5=4a6dfd10649ab03caf71d740edff4889
53+
DOWNLOAD_NAME apache-arrow-18.0.0.tar.gz
4954
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
5055
TMP_DIR ${BUILD_INFO_DIR}
5156
STAMP_DIR ${BUILD_INFO_DIR}
5257
DOWNLOAD_DIR ${DOWNLOAD_DIR}
53-
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/${name}-11.0.0.patch
58+
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/${name}-18.0.0.patch
5459
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" ${ARROW_CMAKE_ARGS} ./cpp
5560
BUILD_COMMAND
5661
"${MakeEnvs}"

project/externals/boost.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ExternalProject_Add_Step(${name} setup-compiler
6666
ExternalProject_Add_Step(${name} trim
6767
DEPENDEES install
6868
COMMAND
69-
rm -rf ${CMAKE_INSTALL_PREFIX}/include/boost/{wave,log,atomic,test,fusion,geometry,gil,phoenix,spirit,beast,asio,compute,polygon,proto,units,metaparse,qvm,vmd,xpressive}
69+
bash -c "rm -rf ${CMAKE_INSTALL_PREFIX}/include/boost/{wave,log,atomic,test,fusion,geometry,gil,phoenix,spirit,beast,asio,compute,polygon,proto,units,metaparse,qvm,vmd,xpressive}"
7070
WORKING_DIRECTORY ${source_dir}
7171
)
7272

project/externals/faiss.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ ExternalProject_Add_Step(${name} clean
4444
)
4545

4646
ExternalProject_Add_StepTargets(${name} clean)
47-

project/externals/libxml2.cmake

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright (c) 2024 vesoft inc. All rights reserved.
2+
#
3+
# This source code is licensed under Apache 2.0 License.
4+
5+
set(name libxml2)
6+
set(source_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/source)
7+
8+
ExternalProject_Add(
9+
${name}
10+
URL https://github.com/GNOME/libxml2/archive/refs/tags/v2.13.4.tar.gz
11+
URL_HASH MD5=69d7c63c7fe5858ba7a462f303939c4a
12+
DOWNLOAD_NAME libxml2-v2.13.4.tar.gz
13+
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
14+
TMP_DIR ${BUILD_INFO_DIR}
15+
STAMP_DIR ${BUILD_INFO_DIR}
16+
DOWNLOAD_DIR ${DOWNLOAD_DIR}
17+
SOURCE_DIR ${source_dir}
18+
CMAKE_ARGS
19+
${common_cmake_args}
20+
-DCMAKE_BUILD_TYPE=Release
21+
-DBUILD_SHARED_LIBS=ON
22+
-DLIBXML2_WITH_ICONV=OFF
23+
-DLIBXML2_WITH_LZMA=OFF
24+
-DLIBXML2_WITH_PYTHON=OFF
25+
-DLIBXML2_WITH_ZLIB=OFF
26+
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
27+
BUILD_IN_SOURCE 1
28+
INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM}
29+
LOG_CONFIGURE TRUE
30+
LOG_BUILD TRUE
31+
LOG_INSTALL TRUE
32+
)
33+
34+
ExternalProject_Add_Step(${name} clean
35+
EXCLUDE_FROM_MAIN TRUE
36+
ALWAYS TRUE
37+
DEPENDEES configure
38+
COMMAND make clean -j
39+
COMMAND rm -f ${BUILD_INFO_DIR}/${name}-build
40+
WORKING_DIRECTORY ${source_dir}
41+
)
42+
43+
ExternalProject_Add_StepTargets(${name} clean)

project/patches/arrow-11.0.0.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)