Skip to content

Commit b9ac9e6

Browse files
authored
Fix poppler build. (#13331)
- Fix same issue as #13325. - Pin libpng to avoid a build failure.
1 parent 4b3a39b commit b9ac9e6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

projects/poppler/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ RUN git clone --depth 1 https://github.com/madler/zlib.git
2222
RUN git clone --depth 1 https://gitlab.freedesktop.org/freetype/freetype.git
2323
RUN git clone --depth 1 https://github.com/mm2/Little-CMS.git
2424
RUN git clone --depth 1 https://github.com/uclouvain/openjpeg
25-
RUN git clone --depth 1 https://github.com/glennrp/libpng.git
25+
# Pin libpng to avoid a build failure:
26+
# configure: pkgconfig directory is ${libdir}/pkgconfig
27+
# ./configure: line 10024: syntax error near unexpected token `)'
28+
# ./configure: line 10024: ` riscv*)'
29+
RUN git clone https://github.com/glennrp/libpng.git && cd libpng && git checkout b4800bae3379f1abf82359703c28e727b5df4135
2630
RUN git clone --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig.git
2731
RUN git clone --depth 1 https://gitlab.freedesktop.org/cairo/cairo.git
2832
RUN git clone --depth 1 --branch=5.15 git://code.qt.io/qt/qtbase.git

projects/poppler/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ rm -rf $WORK/*
2727
rm -rf $BUILD
2828
mkdir -p $BUILD
2929

30+
# Temporarily Add -D_GNU_SOURCE to CFLAGS to fix freetype's dependence on GNU
31+
# extensions for dlsym to dynamically load harfbuzz. This feature
32+
# should potentially be disabled instead of fixing the compilation. But that is
33+
# not possible to do from the OSS-Fuzz repo :-)
34+
# See https://github.com/google/oss-fuzz/pull/13325 for more details.
35+
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
36+
3037
# Install Boost headers
3138
cd $SRC/
3239
tar jxf boost_1_87_0.tar.bz2

0 commit comments

Comments
 (0)