[poppler] poppler and TeX Live -- request for a few modifications

Peter Breitenlohner peb at mppmu.mpg.de
Tue Oct 18 02:59:06 PDT 2011


On Mon, 17 Oct 2011, Albert Astals Cid wrote:

> Well, that is your choice, you can still link against a static poppler build
> instead of embedding code the code in your repo.

Hi Albert,

yes we could. However, we prefer the repo to be as self consistent as
possible.

> Anyway:
>
> * patch-01-PDF_PARSER_ONLY
> Applied, does not make much sense having PDF_PARSER_ONLY in poppler

Thanks

> * patch-10-exclude-body-of-Page_getDefaultCTM
> Having PDF_PARSER_ONLY in poppler makes not much sense, so rejected

The idea was to apply either this or the previous patch but not both.

> * patch-04-mingw
> Having PDF_PARSER_ONLY in poppler makes not much sense, so rejected. Maybe you
> can actually fix the problem instead of workarounding it?

Indeed.  All we need to do is adding '-lgdi32'.  That library is useless for
our purposes but so what.

> * patch-03-POPPLER_VERSION
> Is this for when you use the embedded copy or for when you link against the
> external lib?

Actually for both. For xpdf there was xpdfVersion defined in xpdf/config.h,
but you have decided to make the poppler version info available only via the
c++ wrapper library and corresponding headers.

Having POPPLER_VERSION (possibly under a different name) available in
poppler-config.h would be helpful when not using libpoppler-cpp.

> * patch-02-warnings
> Which compiler/flags give you the need for this?

The compiler is gcc-3.4.6.  When compiling poppler, your configure yields
   CXXFLAGS = -Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor \
   -Wcast-align -fno-exceptions -fno-check-new -fno-common -O2 -ansi $(PTHREAD_CFLAGS)
in the various Makefiles, resulting in these warnings:

../../poppler-0.18.0/goo/PNGWriter.cc: In member function `virtual bool PNGWriter::init(FILE*, int, int, int, int)':
../../poppler-0.18.0/goo/PNGWriter.cc:95: warning: converting of negative value `-0x00000000000000001' to `png_byte'
../../poppler-0.18.0/goo/PNGWriter.cc:96: warning: converting of negative value `-0x00000000000000001' to `png_byte'
../../poppler-0.18.0/goo/PNGWriter.cc:119: warning: passing `double' for converting 3 of `void png_set_pHYs(png_struct*, png_info*, png_uint_32, png_uint_32, int)'
../../poppler-0.18.0/goo/PNGWriter.cc:119: warning: passing `double' for converting 4 of `void png_set_pHYs(png_struct*, png_info*, png_uint_32, png_uint_32, int)'
In file included from ../../poppler-0.18.0/poppler/GfxState_helpers.h:23,
                  from ../../poppler-0.18.0/splash/SplashBitmap.cc:338:
../../poppler-0.18.0/poppler/GfxState.h: In function `Guchar dblToByte(double)':
../../poppler-0.18.0/poppler/GfxState.h:103: warning: converting to `Guchar' from `double'
In file included from ../../poppler-0.18.0/poppler/Gfx.h:40,
                  from ../../poppler-0.18.0/poppler/SplashOutputDev.cc:51:
../../poppler-0.18.0/poppler/GfxState.h: In function `Guchar dblToByte(double)':
../../poppler-0.18.0/poppler/GfxState.h:103: warning: converting to `Guchar' from `double'
In file included from ../../poppler-0.18.0/poppler/Gfx.h:40,
                  from ../../poppler-0.18.0/poppler/Annot.cc:48:
../../poppler-0.18.0/poppler/GfxState.h: In function `Guchar dblToByte(double)':
../../poppler-0.18.0/poppler/GfxState.h:103: warning: converting to `Guchar' from `double'
../../poppler-0.18.0/poppler/Annot.cc: In member function `virtual void AnnotTextMarkup::draw(Gfx*, GBool)':
../../poppler-0.18.0/poppler/Annot.cc:2646: warning: passing `double' for converting 1 of `int abs(int)'

and many many more of the same kind.  Of course, gcc-3.4.6 is not exactly
recent.  However, looking at your code there are many instances with
explicit typecasts, and just a few without such casts causing these
warnings.

But as I said in the original mail, it would be nice if these warnings could
be avoided, but this is by no means necessary.

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>


More information about the poppler mailing list