On 02.11.2016 00:27, Albert Astals Cid wrote: > El dimarts, 1 de novembre de 2016, a les 16:10:06 CET, Stephan > Bergmann va escriure: >> >> * For 0004-Work-around-fsanitize-shift.patch, an input file that >> shows the error is >> >> <https://cgit.freedesktop.org/libreoffice/core/plain/sd/qa/unit/data/pdf/txtpic.pdf?id=acf531be6a423f9b74997b29a8cafe82aa18423c>: > >> > Oh, i didn't realize this is for the unmaintained self-grown > DCTStream decoder, any reason you're not using the libjpeg based > one? > > Honestly i'm a bit hesitant to touch code that we recommend people > not to use.
apparently the commit that replaced xpdf with poppler added the --disable-libjpeg flag, among others (such as --disable-openjpeg, which also prints a warning, but currently we don't bundle "openjpeg" in LO). while i don't know the original reason, currently it appears to be "it doesn't actually work".... the poppler configure.ac always finds the jpeg library on the system, not the one we bundle with LO. due to the various autoconf macros it was a bit non-obvious to figure out that, unlike LIBJPEG_CFLAGS, LIBJPEG_LIBS is a variable that is always overwritten by configure and effectively cannot be set from the outside; i could set LIBJPEG_CFLAGS to include the link parameters but i can't prevent configure from checking for a libjpeg6b.so so if such exists on a system (it doesn't on Fedora) then it's possible that we get funny DT_NEEDEDs from "-ljpeg -ljpeg6b". so i wrote the attached patch. then it occurred to me that we actually build poppler as a static library, so there won't be funny DT_NEEDEDs currently, but ... better safe than sorry? LO patch to use --enable-libjpeg is at https://gerrit.libreoffice.org/30496
>From ad2176854336ab0a6c29e01b7479879e1d22da0e Mon Sep 17 00:00:00 2001 From: Michael Stahl <[email protected]> Date: Wed, 2 Nov 2016 14:06:58 +0100 Subject: [PATCH] configure: do not override user supplied LIBJPEG_LIBS --- m4/libjpeg.m4 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/m4/libjpeg.m4 b/m4/libjpeg.m4 index 1a5057a..b041106 100644 --- a/m4/libjpeg.m4 +++ b/m4/libjpeg.m4 @@ -58,13 +58,16 @@ fi AC_DEFUN([POPPLER_FIND_JPEG], [ dnl first look for libraries -KDE_FIND_JPEG_HELPER(6b, 6b, - KDE_FIND_JPEG_HELPER(normal, [], - [ - LIBJPEG_LIBS= - ] - ) -) +dnl do not override user supplied LIBJPEG_LIBS +if test -z "$LIBJPEG_LIBS"; then + KDE_FIND_JPEG_HELPER(6b, 6b, + KDE_FIND_JPEG_HELPER(normal, [], + [ + LIBJPEG_LIBS= + ] + ) + ) +fi dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h dnl requires system dependent includes loaded before it) -- 2.7.4
_______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
