diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2021-09-12 03:19:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 01:19:47 +0100 |
commit | 88bd3d7406de5e24297f4048f64b8be3998ed385 (patch) | |
tree | ab30b948041475b2b40a30c3c3a8c2cd55728048 /projects/libass | |
parent | a517dca16725f39d4973b702a840f488aacefeed (diff) | |
download | oss-fuzz-88bd3d7406de5e24297f4048f64b8be3998ed385.tar.gz |
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.
Diffstat (limited to 'projects/libass')
-rw-r--r-- | projects/libass/Dockerfile | 9 | ||||
-rwxr-xr-x | projects/libass/build.sh | 12 | ||||
-rw-r--r-- | projects/libass/project.yaml | 5 |
3 files changed, 9 insertions, 17 deletions
diff --git a/projects/libass/Dockerfile b/projects/libass/Dockerfile index 9cd284493..88801cc85 100644 --- a/projects/libass/Dockerfile +++ b/projects/libass/Dockerfile @@ -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/ diff --git a/projects/libass/build.sh b/projects/libass/build.sh index 44006e37f..8e313fdfd 100755 --- a/projects/libass/build.sh +++ b/projects/libass/build.sh @@ -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/ diff --git a/projects/libass/project.yaml b/projects/libass/project.yaml index bfcb93edc..9fdaf42f9 100644 --- a/projects/libass/project.yaml +++ b/projects/libass/project.yaml @@ -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 |