solidity: Upgrade boost (#4546)

This commit is contained in:
Bhargava Shastry 2020-10-19 17:13:23 +02:00 committed by GitHub
parent b10939e212
commit bca4ff4ee8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 30 deletions

View File

@ -17,27 +17,29 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool \
build-essential libbz2-dev ninja-build zlib1g-dev wget python python-dev \
liblzma-dev uuid-dev pkg-config openjdk-8-jdk unzip
liblzma-dev uuid-dev pkg-config openjdk-8-jdk unzip mlton
RUN git clone --recursive https://github.com/ethereum/solidity.git solidity
RUN git clone --depth 1 https://github.com/ethereum/solidity-fuzzing-corpus.git
RUN git clone --recursive -b boost-1.69.0 https://github.com/boostorg/boost.git \
boost
RUN git clone --depth 1 https://github.com/google/libprotobuf-mutator.git
RUN git clone --branch="v0.4.0" --recurse-submodules \
https://github.com/ethereum/evmone.git
# Install statically built dependencies in "/usr" directory
# Install boost
RUN cd $SRC/boost; \
./bootstrap.sh --with-toolset=clang --prefix=/usr; \
./b2 clean; \
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" \
headers; \
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" \
link=static variant=release runtime-link=static \
system regex filesystem unit_test_framework program_options \
install -j $(($(nproc)/2));
RUN cd $SRC; \
wget -q 'https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2' -O boost.tar.bz2; \
test "$(sha256sum boost.tar.bz2)" = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402 boost.tar.bz2"; \
tar -xf boost.tar.bz2; \
rm boost.tar.bz2; \
cd boost_1_73_0; \
CXXFLAGS="-stdlib=libc++ -pthread" LDFLAGS="-stdlib=libc++" ./bootstrap.sh --with-toolset=clang --prefix=/usr; \
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" headers; \
./b2 toolset=clang cxxflags="-stdlib=libc++ -pthread" linkflags="-stdlib=libc++ -pthread" \
link=static variant=release runtime-link=static \
system filesystem unit_test_framework program_options \
install -j $(($(nproc)/2)); \
rm -rf $SRC/boost_1_73_0
# Install libprotobuf-mutator
RUN mkdir $SRC/LPM; \
@ -58,22 +60,4 @@ RUN cd $SRC/evmone; \
ninja; \
ninja install;
# Antlr4 Runtime
RUN set -ex; \
cd /usr/src; \
wget https://www.antlr.org/download/antlr4-cpp-runtime-4.8-source.zip; \
rm -rf antlr4-runtime && mkdir antlr4-runtime; \
unzip antlr4-cpp-runtime-4.8-source.zip -d antlr4-runtime; \
cd antlr4-runtime && mkdir build && cd build; \
cmake .. -DWITH_LIBCXX=On -DCMAKE_BUILD_TYPE=Release -DWITH_DEMO=False; \
make -j; \
DESTDIR=run make install; \
# Manually copy needed library and includes since install script
# does not respect -DCMAKE_INSTALL_DIR and there is no option
# to disable shared library build/installation
cp -Rf run/usr/local/include/antlr4-runtime /usr/include; \
cp -f run/usr/local/lib/libantlr4-runtime.a /usr/lib; \
rm -rf /usr/src/antlr4-cpp-runtime-4.8-source.zip; \
rm -rf /usr/src/antlr4-runtime
COPY build.sh $SRC/