7
7
export DEBIAN_FRONTEND=noninteractive
8
8
[ -z " ${ABSEIL_CPP_VERSION} " ] && export ABSEIL_CPP_VERSION=" 20240116.1"
9
9
10
+ TOPDIR=` pwd`
11
+
10
12
BUILD_DIR=/tmp/
11
13
INSTALL_DIR=/usr/local/
12
14
pushd $BUILD_DIR
@@ -22,6 +24,41 @@ if [ ! -z "${CXX_STANDARD}" ]; then
22
24
ABSEIL_CPP_BUILD_OPTIONS=(${ABSEIL_CPP_BUILD_OPTIONS[@]} " -DCMAKE_CXX_STANDARD=${CXX_STANDARD} " )
23
25
fi
24
26
27
+ #
28
+ # ABSEIL_CPP_VERSION="20240116.1" fails to build with CMake 3.30
29
+ # ABSEIL_CPP_VERSION="20240116.2" fails to build with CMake 3.30
30
+ # note that somehow the same builds with CMake 3.29.6
31
+ #
32
+ # Error reported:
33
+ # CMake Error at CMake/AbseilHelpers.cmake:317 (target_link_libraries):
34
+ # The link interface of target "test_allocator" contains:
35
+ #
36
+ # GTest::gmock
37
+ #
38
+ # but the target was not found. Possible reasons include:
39
+ #
40
+ # * There is a typo in the target name.
41
+ # * A find_package call is missing for an IMPORTED target.
42
+ # * An ALIAS target is missing.
43
+ #
44
+ # Call Stack (most recent call first):
45
+ # absl/container/CMakeLists.txt:206 (absl_cc_library)
46
+ #
47
+ # Root cause:
48
+ # https://github.com/abseil/abseil-cpp/pull/1536
49
+ #
50
+ # Applying fix from abseil commit 779a3565ac6c5b69dd1ab9183e500a27633117d5
51
+ #
52
+ # TODO(marcalff) Cleanup once abseil is upgraded to the next LTS
53
+
54
+
55
+ if [ " ${ABSEIL_CPP_VERSION} " = " 20240116.1" ] || [ " ${ABSEIL_CPP_VERSION} " = " 20240116.2" ]; then
56
+ echo " Patching abseil"
57
+ patch -p1 < ${TOPDIR} /ci/fix-abseil-cpp-issue-1536.patch
58
+ else
59
+ echo " Not patching abseil"
60
+ fi
61
+
25
62
mkdir build && pushd build
26
63
cmake " ${ABSEIL_CPP_BUILD_OPTIONS[@]} " ..
27
64
make -j $( nproc)
0 commit comments