From ca11c5128c8ed9630e1deeff84d78bd5182cbdff Mon Sep 17 00:00:00 2001 From: Bhargava Shastry Date: Tue, 16 Jul 2019 15:10:45 +0200 Subject: [PATCH] Install protobuf-mutator toolchain before building solidity (#2611) --- projects/solidity/Dockerfile | 4 ++-- projects/solidity/build.sh | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/solidity/Dockerfile b/projects/solidity/Dockerfile index eff72f6af..3e78860cc 100644 --- a/projects/solidity/Dockerfile +++ b/projects/solidity/Dockerfile @@ -16,10 +16,10 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y make autoconf automake libtool \ - build-essential cmake libbz2-dev ninja-build zlib1g-dev + build-essential cmake libbz2-dev ninja-build zlib1g-dev wget 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 (mkdir LPM && cd LPM && cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release && ninja) +RUN (mkdir LPM && cd LPM && cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" && ninja && ninja install && cd external.protobuf && cp -Rf bin lib include /usr) COPY build.sh $SRC/ diff --git a/projects/solidity/build.sh b/projects/solidity/build.sh index 857c97a8b..3ce2930d5 100755 --- a/projects/solidity/build.sh +++ b/projects/solidity/build.sh @@ -27,8 +27,7 @@ cd $SRC/boost # Compile proto C++ bindings -cd $SRC -LPM/external.protobuf/bin/protoc \ +protoc \ --proto_path=$SRC/solidity/test/tools/ossfuzz yulProto.proto \ --cpp_out=$SRC/solidity/test/tools/ossfuzz