Skip to content

Commit 40c96b1

Browse files
fix build for ubuntu24.04 (#157)
* fix build for ubuntu24.04 * revert Dockerfile * fix bison&flex * Update ubuntu-2404.Dockerfile
1 parent 0f5c388 commit 40c96b1

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

docker/buildx/ubuntu-2404.Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ RUN apt update \
2929
flex \
3030
gperf \
3131
gettext \
32+
autopoint \
3233
ninja-build \
3334
groff-base \
3435
texinfo \

project/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
cmake_minimum_required(VERSION 3.23.1) #Limited by faiss
2-
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.19")
2+
if(POLICY CMP0114)
33
cmake_policy(SET CMP0114 OLD)
44
endif()
55

66
# Not to pull submodules when an empty string is given
7-
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16")
7+
if(POLICY CMP0097)
88
cmake_policy(SET CMP0097 NEW)
99
endif()
1010

1111
if(POLICY CMP0135) #Since cmake 3.24 it will make some download warning
12-
cmake_policy(SET CMP0135 NEW)
12+
cmake_policy(SET CMP0135 OLD)
1313
endif()
1414

1515
project("Nebula Third Party" C CXX)

project/externals/arrow.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ else()
1212
endif()
1313

1414
set(ARROW_CMAKE_ARGS
15-
${common_cmake_args}
1615
-DProtobuf_SOURCE=SYSTEM
1716
-Dre2_SOURCE=SYSTEM
1817
-DBoost_ROOT=${CMAKE_INSTALL_PREFIX}

project/externals/bison.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ ExternalProject_Add(
1313
STAMP_DIR ${BUILD_INFO_DIR}
1414
DOWNLOAD_DIR ${DOWNLOAD_DIR}
1515
SOURCE_DIR ${source_dir}
16+
PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/patches/${name}.patch
1617
CONFIGURE_COMMAND
1718
${common_configure_envs}
18-
./configure ${common_configure_args}
19-
--quiet
19+
./configure ${common_configure_args} --quiet
2020
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
2121
BUILD_IN_SOURCE 1
2222
INSTALL_COMMAND make -s install -j${BUILDING_JOBS_NUM}

project/externals/flex.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ExternalProject_Add(
1717
${common_configure_envs}
1818
./configure ${common_configure_args}
1919
--enable-static --disable-shared
20-
BUILD_COMMAND make -s
20+
BUILD_COMMAND make -s -j${BUILDING_JOBS_NUM}
2121
BUILD_IN_SOURCE 1
2222
INSTALL_COMMAND make -s install
2323
LOG_CONFIGURE TRUE

project/patches/bison.patch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/configure.ac 2024-11-29 14:13:59.817559244 +0800
2+
+++ b/configure.ac 2024-11-29 14:14:16.668261779 +0800
3+
@@ -44,7 +44,7 @@
4+
color-tests parallel-tests
5+
silent-rules]
6+
m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[-_]],
7+
- [gnu], [gnits]))
8+
+ [gnu], [gnu]))
9+
AM_SILENT_RULES([yes])
10+
AC_CONFIG_HEADERS([lib/config.h:lib/config.in.h])
11+

0 commit comments

Comments
 (0)