mirror of https://github.com/google/oss-fuzz.git
Dav1d: fix build and disable logging (#2159)
Fixes build failure caused by unavailable https://www.nasm.us/ The nasm version in ubuntu xenial is too old. The package from bionic is new enough and usable without other dependencies from bionic.
This commit is contained in:
parent
43e2447ab3
commit
4db22401aa
|
@ -16,11 +16,14 @@
|
|||
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
MAINTAINER janne-vlc@jannau.net
|
||||
RUN apt-get update && apt-get install -y curl python3-pip wget && \
|
||||
|
||||
ADD bionic.list /etc/apt/sources.list.d/bionic.list
|
||||
ADD nasm_apt.pin /etc/apt/preferences
|
||||
|
||||
RUN apt-get update && apt-get install -y curl python3-pip nasm && \
|
||||
pip3 install meson ninja
|
||||
RUN wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.gz
|
||||
RUN curl --silent -O https://storage.googleapis.com/aom-test-data/fuzzer/dec_fuzzer_seed_corpus.zip
|
||||
RUN curl --silent -O https://jannau.net/dav1d_fuzzer_seed_corpus.zip
|
||||
RUN git clone --depth 1 https://code.videolan.org/videolan/dav1d.git dav1d
|
||||
WORKDIR dav1d
|
||||
COPY build.sh fuzzer.options $SRC/
|
||||
COPY build.sh $SRC/
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# use nasm 2.13.02 from bionic
|
||||
deb http://archive.ubuntu.com/ubuntu/ bionic universe
|
|
@ -29,27 +29,11 @@ BUILD_ASM="true"
|
|||
if [[ $CFLAGS = *sanitize=memory* ]]
|
||||
then
|
||||
BUILD_ASM="false"
|
||||
else
|
||||
# Build the specific nasm version without memory instrumentation.
|
||||
pushd $SRC
|
||||
|
||||
BUILD_DEPS="$SRC/build_deps"
|
||||
mkdir -p $BUILD_DEPS
|
||||
|
||||
tar xzf nasm-*
|
||||
cd nasm-*
|
||||
CFLAGS="" CXXFLAGS="" ./configure --prefix="$BUILD_DEPS"
|
||||
make clean
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
export PATH="$BUILD_DEPS/bin:$PATH"
|
||||
export LD_LIBRARY_PATH="$BUILD_DEPS/lib"
|
||||
popd
|
||||
fi
|
||||
|
||||
meson -Dbuild_asm=$BUILD_ASM -Dbuild_tools=false -Dfuzzing_engine=oss-fuzz \
|
||||
-Db_lundef=false -Ddefault_library=static -Dbuildtype=debugoptimized \
|
||||
-Dlogging=false \
|
||||
${build}
|
||||
ninja -j $(nproc) -C ${build}
|
||||
|
||||
|
@ -64,5 +48,4 @@ cp $SRC/dec_fuzzer_seed_corpus.zip ${WORK}/tmp/seed_corpus.zip
|
|||
for fuzzer in $(find ${build} -name 'dav1d_fuzzer*'); do
|
||||
cp "${fuzzer}" $OUT/
|
||||
cp ${WORK}/tmp/seed_corpus.zip $OUT/$(basename "$fuzzer")_seed_corpus.zip
|
||||
cp $SRC/fuzzer.options $OUT/$(basename "$fuzzer").options
|
||||
done
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[libfuzzer]
|
||||
# TODO: remove this when error logging can be suppressed during compilation.
|
||||
close_fd_mask = 2
|
|
@ -0,0 +1,7 @@
|
|||
Package: *
|
||||
Pin: release n=bionic
|
||||
Pin-Priority: 1
|
||||
|
||||
Package: nasm
|
||||
Pin: release n=bionic
|
||||
Pin-Priority: 555
|
Loading…
Reference in New Issue