aboutsummaryrefslogtreecommitdiff
path: root/projects/msgpack-c
diff options
context:
space:
mode:
authorChris Wolfe <chriswwolfe@gmail.com>2020-07-19 12:53:00 -0700
committerGitHub <noreply@github.com>2020-07-19 12:53:00 -0700
commit077c2b5aed556f9d2efbfe44cf34ae214223d62b (patch)
tree0a1ff8bb80465b0979f3f09fd7a54bc0637ddd17 /projects/msgpack-c
parentb4bf7839051cc7bcc9f4d1989eaab82865bae367 (diff)
downloadoss-fuzz-077c2b5aed556f9d2efbfe44cf34ae214223d62b.tar.gz
[msgpack-c] fix build (#4157)
* msgpack-c is now header only, update to install boost as req as well
Diffstat (limited to 'projects/msgpack-c')
-rw-r--r--projects/msgpack-c/Dockerfile11
-rwxr-xr-xprojects/msgpack-c/build.sh7
2 files changed, 10 insertions, 8 deletions
diff --git a/projects/msgpack-c/Dockerfile b/projects/msgpack-c/Dockerfile
index 05b1e74a0..87efd7640 100644
--- a/projects/msgpack-c/Dockerfile
+++ b/projects/msgpack-c/Dockerfile
@@ -15,7 +15,14 @@
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
-RUN apt-get update && apt-get install -y cmake
-RUN git clone --depth 1 https://github.com/msgpack/msgpack-c.git msgpack-c
+RUN apt-get update && apt-get install -y cmake wget bzip2
+RUN git clone --depth 1 --single-branch --branch cpp_master https://github.com/msgpack/msgpack-c.git msgpack-c
+
+RUN wget https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.bz2 && \
+ tar xf boost_1_70_0.tar.bz2 && \
+ cd boost_1_70_0 && \
+ ./bootstrap.sh --with-toolset=clang --prefix=/usr && \
+ ./b2 -j$(nproc) toolset=clang --with-chrono --with-context --with-filesystem --with-system --with-timer address-model=64 cflags="$CFLAGS" cxxflags="$CXXFLAGS" link=static variant=release runtime-link=static threading=multi install
+
WORKDIR msgpack-c
COPY build.sh $SRC/
diff --git a/projects/msgpack-c/build.sh b/projects/msgpack-c/build.sh
index 21faacfb8..9a065ffd2 100755
--- a/projects/msgpack-c/build.sh
+++ b/projects/msgpack-c/build.sh
@@ -15,11 +15,6 @@
#
################################################################################
-cmake -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" \
- -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
- -DMSGPACK_CXX11=ON .
-make -j$(nproc) all
-
for f in $SRC/msgpack-c/fuzz/*_fuzzer.cpp; do
# NOTE(derwolfe): the naming scheme for fuzzers and seed corpora is
# fuzzer = something_something_fuzzer.cpp
@@ -27,7 +22,7 @@ for f in $SRC/msgpack-c/fuzz/*_fuzzer.cpp; do
fuzzer=$(basename "$f" .cpp)
$CXX $CXXFLAGS -std=c++11 -Iinclude -I"$SRC/msgpack-c/include" \
"$f" -o "$OUT/${fuzzer}" \
- $LIB_FUZZING_ENGINE "$SRC/msgpack-c/libmsgpackc.a"
+ $LIB_FUZZING_ENGINE
if [ -d "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus" ]; then
zip -rj "$OUT/${fuzzer}_seed_corpus.zip" "$SRC/msgpack-c/fuzz/${fuzzer}_seed_corpus/"