Skip to content

Commit 20e30f5

Browse files
committed
Replace base-clang by ossfuzz base-builder
1 parent d750b9d commit 20e30f5

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

scripts/docker/buildpack-deps/Dockerfile.ubuntu.clang.ossfuzz

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
#
2222
# (c) 2016-2021 solidity contributors.
2323
#------------------------------------------------------------------------------
24-
FROM gcr.io/oss-fuzz-base/base-clang:latest as base
25-
LABEL version="8"
24+
# FIXME: Workaround for Boost 1.83.0 build failure when using Clang 18 (default since https://github.com/google/oss-fuzz/pull/11714)
25+
# See: https://github.com/google/oss-fuzz/blob/5a9322260c4c66e7eb3e5d922b9fee6621ffd8da/projects/solidity/Dockerfile#L17C1-L18C139
26+
FROM gcr.io/oss-fuzz-base/base-builder@sha256:19782f7fe8092843368894dbc471ce9b30dd6a2813946071a36e8b05f5b1e27e AS base
27+
LABEL version="9"
2628

2729
ARG DEBIAN_FRONTEND=noninteractive
2830

@@ -44,6 +46,7 @@ RUN apt-get update; \
4446
openjdk-8-jdk \
4547
pkg-config \
4648
python3-pip \
49+
python3-dev \
4750
software-properties-common \
4851
sudo \
4952
texinfo \
@@ -59,32 +62,25 @@ RUN apt-get update; \
5962
pygments-lexer-solidity \
6063
pylint \
6164
requests \
62-
tabulate \
63-
z3-solver;
64-
65-
# Install cmake 3.21.2 (minimum requirement is cmake 3.10)
66-
RUN wget https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2-Linux-x86_64.sh; \
67-
test "$(sha256sum cmake-3.21.2-Linux-x86_64.sh)" = "3310362c6fe4d4b2dc00823835f3d4a7171bbd73deb7d059738494761f1c908c cmake-3.21.2-Linux-x86_64.sh"; \
68-
chmod +x cmake-3.21.2-Linux-x86_64.sh; \
69-
./cmake-3.21.2-Linux-x86_64.sh --skip-license --prefix="/usr"
65+
tabulate;
7066

7167
FROM base AS libraries
7268

7369
# Boost
7470
RUN set -ex; \
7571
cd /usr/src; \
76-
wget -q 'https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.bz2' -O boost.tar.bz2; \
77-
test "$(sha256sum boost.tar.bz2)" = "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1 boost.tar.bz2" && \
72+
wget -q 'https://archives.boost.io/release/1.83.0/source/boost_1_83_0.tar.bz2' -O boost.tar.bz2; \
73+
test "$(sha256sum boost.tar.bz2)" = "6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e boost.tar.bz2" && \
7874
tar -xf boost.tar.bz2; \
7975
rm boost.tar.bz2; \
80-
cd boost_1_74_0; \
81-
CXXFLAGS="-stdlib=libc++ -pthread" LDFLAGS="-stdlib=libc++" ./bootstrap.sh --with-toolset=clang --prefix=/usr; \
76+
cd boost_1_83_0; \
77+
CXXFLAGS="-std=c++17 -stdlib=libc++ -pthread" LDFLAGS="-stdlib=libc++" ./bootstrap.sh --with-toolset=clang --prefix=/usr; \
8278
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" headers; \
8379
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" \
8480
link=static variant=release runtime-link=static \
8581
system filesystem unit_test_framework program_options \
8682
install -j $(($(nproc)/2)); \
87-
rm -rf /usr/src/boost_1_74_0
83+
rm -rf /usr/src/boost_1_83_0
8884

8985
# Z3
9086
RUN set -ex; \

0 commit comments

Comments
 (0)