From dbbcad5818dce82655bd88af45e1b22eb16b4bcc Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 2 Mar 2020 00:37:45 +0100 Subject: [PATCH] disable logging support in libtorrent, to avoid clang 10 ICE (#3447) * disable logging support in libtorrent, to avoid clang 10 ICE * pull boost from github instead of bintray --- projects/libtorrent/Dockerfile | 4 ++-- projects/libtorrent/build.sh | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/projects/libtorrent/Dockerfile b/projects/libtorrent/Dockerfile index 121226e85..acfe56f1b 100644 --- a/projects/libtorrent/Dockerfile +++ b/projects/libtorrent/Dockerfile @@ -18,8 +18,8 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER arvid@libtorrent.org RUN apt-get update && apt-get install -y wget libssl-dev -RUN wget --no-verbose https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz -RUN tar xzf boost_1_69_0.tar.gz +RUN git clone --depth 1 --single-branch --branch boost-1.72.0 --recurse-submodules https://github.com/boostorg/boost.git + RUN git clone --depth 1 --single-branch --branch RC_1_2 --recurse-submodules https://github.com/arvidn/libtorrent.git WORKDIR libtorrent diff --git a/projects/libtorrent/build.sh b/projects/libtorrent/build.sh index 2dd444cd1..062b01dd6 100755 --- a/projects/libtorrent/build.sh +++ b/projects/libtorrent/build.sh @@ -15,11 +15,12 @@ # ################################################################################ -export PATH=${PATH}:${PWD}/../boost_1_69_0/tools/build/src/engine/bin.linuxx86_64 -export BOOST_ROOT=${PWD}/../boost_1_69_0 -export BOOST_BUILD_PATH=${PWD}/../boost_1_69_0/tools/build - -(cd ${PWD}/../boost_1_69_0 && ./bootstrap.sh) +export PATH=${PATH}:${PWD}/../boost +export BOOST_ROOT=${PWD}/../boost +export BOOST_BUILD_PATH=${PWD}/../boost/tools/build +# when building b2, we don't want sanitizers enabled +ASAN_OPTIONS=detect_leaks=0 +(cd ${PWD}/../boost && ./bootstrap.sh && ./b2 headers) echo "CXX=$CXX" echo "CXXFLAGS=$CXXFLAGS" @@ -27,7 +28,8 @@ echo "CXXFLAGS=$CXXFLAGS" echo "using clang : ossfuzz : $CXX : \"$CXXFLAGS\" \"$CXXFLAGS\" \"${LIB_FUZZING_ENGINE}\" ;" >project-config.jam cat project-config.jam cd fuzzers -b2 clang-ossfuzz -j$(nproc) crypto=openssl fuzz=external sanitize=off stage-large +# we don't want sanitizers enabled on b2 itself +ASAN_OPTIONS=detect_leaks=0 b2 clang-ossfuzz -j$(nproc) crypto=openssl fuzz=external sanitize=off stage-large logging=off cp fuzzers/* $OUT wget --no-verbose https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_2_1/corpus.zip