mirror of https://github.com/google/oss-fuzz.git
libass: fix build, upgrade Ubuntu, update contacts (#6423)
* libass: update contact list One contact is retired; another is currently inactive. * libass: don't build HarfBuzz tests They won't be used, so this just wastes resources. * libass: upgrade to Ubuntu 20.04 The build failures on 20.04 were due to explicit listing of static library dependencies, which have changed on 20.04: png12 was replaced by png16, fontconfig was missing -luuid, and png needed -lz to follow it, not precede. Replace the explicit -l list by $(pkg-config --static --libs). However, -lm must be filtered out as it causes linker errors: > undefined reference to `_dl_x86_cpu_features' While we are at it, Ubuntu 20.04 comes with new-enough FriBidi, so we can stop building it. It also has new-enough HarfBuzz, but it depends on libgraphite2, which lacks a static library in the system package, and dynamically linking against a system library does not work in OSS-Fuzz as the shared object will not exist in the run-time environment. Reorder the dependencies alphabetically for consistency.
This commit is contained in:
parent
a517dca167
commit
88bd3d7406
|
@ -14,16 +14,11 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
# Using Ubuntu 16.04 because of breakage on Ubuntu 20.04.
|
||||
# See https://github.com/google/oss-fuzz/issues/6291 for more details.
|
||||
FROM gcr.io/oss-fuzz-base/base-builder:xenial
|
||||
# Delete line above and uncomment line below to upgrade to 20.04.
|
||||
# FROM gcr.io/oss-fuzz-base/base-builder
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libfreetype6-dev libfontconfig1-dev python3-pip && \
|
||||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config libfontconfig1-dev libfreetype-dev libfribidi-dev python3-pip && \
|
||||
pip3 install meson==0.53.0 ninja
|
||||
|
||||
RUN git clone --depth 1 https://github.com/libass/libass.git
|
||||
RUN git clone --depth 1 https://github.com/behdad/fribidi.git
|
||||
RUN git clone --depth 1 https://github.com/harfbuzz/harfbuzz.git
|
||||
|
||||
COPY build.sh libass_fuzzer.cc *.dict *.options $SRC/
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
cd $SRC/fribidi
|
||||
./autogen.sh --disable-docs --enable-static=yes --enable-shared=no --with-pic=yes --prefix=/work/
|
||||
make install
|
||||
|
||||
cd $SRC/harfbuzz
|
||||
|
||||
# setup
|
||||
|
@ -33,6 +29,7 @@ CFLAGS="$CFLAGS -fno-sanitize=vptr" \
|
|||
CXXFLAGS="$CXXFLAGS -fno-sanitize=vptr" \
|
||||
meson --default-library=static --wrap-mode=nodownload \
|
||||
-Dfuzzer_ldflags="$(echo $LIB_FUZZING_ENGINE)" \
|
||||
-Dtests=disabled \
|
||||
--prefix=/work/ --libdir=lib $build \
|
||||
|| (cat build/meson-logs/meson-log.txt && false)
|
||||
meson install -C $build
|
||||
|
@ -44,10 +41,11 @@ export PKG_CONFIG_PATH=/work/lib/pkgconfig
|
|||
./configure --disable-asm
|
||||
make -j$(nproc)
|
||||
|
||||
$CXX $CXXFLAGS -std=c++11 -I$SRC/libass -L/work/lib \
|
||||
$CXX $CXXFLAGS -std=c++11 -I$SRC/libass \
|
||||
$SRC/libass_fuzzer.cc -o $OUT/libass_fuzzer \
|
||||
$LIB_FUZZING_ENGINE libass/.libs/libass.a \
|
||||
-Wl,-Bstatic -lfontconfig -lfribidi -lfreetype -lharfbuzz -lz -lpng12 \
|
||||
-lexpat -Wl,-Bdynamic
|
||||
-Wl,-Bstatic \
|
||||
$(pkg-config --static --libs fontconfig freetype2 fribidi harfbuzz | sed 's/-lm //g') \
|
||||
-Wl,-Bdynamic
|
||||
|
||||
cp $SRC/*.dict $SRC/*.options $OUT/
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
homepage: "https://github.com/libass/libass"
|
||||
language: c++
|
||||
primary_contact: "greg@kinoho.net"
|
||||
primary_contact: "chortos@inbox.lv"
|
||||
auto_ccs:
|
||||
- "greg@kinoho.net"
|
||||
- "rodger.combs@gmail.com"
|
||||
- "nfxjfg@gmail.com"
|
||||
- "chortos@inbox.lv"
|
||||
- "vabnick@gmail.com"
|
||||
sanitizers:
|
||||
- address
|
||||
|
|
Loading…
Reference in New Issue