contrib/oss-fuzz/build.sh: other attempt at fixing build failure

This commit is contained in:
Even Rouault 2019-11-28 14:18:38 +01:00
parent ad25410d09
commit b52fb8a91d
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -51,8 +51,7 @@ mv "$SRC"/jbigkit/libjbig/*.h "$WORK/include/"
popd popd
if [ "$ARCHITECTURE" = "i386" ]; then if [ "$ARCHITECTURE" = "i386" ]; then
dpkg --add-architecture i386 # Nothing
apt-get install -y liblzma-dev:i386
else else
apt-get install -y liblzma-dev apt-get install -y liblzma-dev
fi fi
@ -61,10 +60,17 @@ cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DBUILD_SHARED_LIBS=off
make -j$(nproc) make -j$(nproc)
make install make install
$CXX $CXXFLAGS -std=c++11 -I$WORK/include \ if [ "$ARCHITECTURE" = "i386" ]; then
$SRC/libtiff/contrib/oss-fuzz/tiff_read_rgba_fuzzer.cc -o $OUT/tiff_read_rgba_fuzzer \ $CXX $CXXFLAGS -std=c++11 -I$WORK/include \
$LIB_FUZZING_ENGINE $WORK/lib/libtiffxx.a $WORK/lib/libtiff.a $WORK/lib/libz.a $WORK/lib/libjpeg.a \ $SRC/libtiff/contrib/oss-fuzz/tiff_read_rgba_fuzzer.cc -o $OUT/tiff_read_rgba_fuzzer \
$WORK/lib/libjbig.a $WORK/lib/libjbig85.a -Wl,-Bstatic -llzma -Wl,-Bdynamic $LIB_FUZZING_ENGINE $WORK/lib/libtiffxx.a $WORK/lib/libtiff.a $WORK/lib/libz.a $WORK/lib/libjpeg.a \
$WORK/lib/libjbig.a $WORK/lib/libjbig85.a
else
$CXX $CXXFLAGS -std=c++11 -I$WORK/include \
$SRC/libtiff/contrib/oss-fuzz/tiff_read_rgba_fuzzer.cc -o $OUT/tiff_read_rgba_fuzzer \
$LIB_FUZZING_ENGINE $WORK/lib/libtiffxx.a $WORK/lib/libtiff.a $WORK/lib/libz.a $WORK/lib/libjpeg.a \
$WORK/lib/libjbig.a $WORK/lib/libjbig85.a -Wl,-Bstatic -llzma -Wl,-Bdynamic
fi
mkdir afl_testcases mkdir afl_testcases
(cd afl_testcases; tar xf "$SRC/afl_testcases.tgz") (cd afl_testcases; tar xf "$SRC/afl_testcases.tgz")