[poppler] Cross compiling poppler 0.63.0 with mingw fails

Adam Reichold adam.reichold at t-online.de
Wed Mar 21 11:04:22 UTC 2018


Hello Luigi,

I am sorry that you are having trouble with the change I made, hopefully
I can help you with resolving them. I am CC'ing the Poppler mailing list
in any case.

Concerning your patch, I think returning a reference to a mutable static
is a problem due to thread safety. Also, the same effect of synthesizing
a low-resolution struct timespec can be done without the preprocessor
and we can also adjust the return type as necessary, please c.f. the
attached patch.

But more importantly, these code paths might be completely unused in
Windows builds, so please check if commit

46543272dbe7655821e1c794ca3cc22e8cb4cef9

on Poppler's master branch has not already fixed your issue.

Best regards, Adam.

Am 20.03.2018 um 23:26 schrieb luigi scarso:
> Cross Compiling poppler 0.63.0 for TeX Live 2018
> from Ubuntu 16.04 with mingw-w64
> fails due the lack of st_mtim.
> 
> Using this patch
> 
> poppler-src/goo$ diff -u gfile.cc.orig gfile.cc
> --- gfile.cc.orig 2018-03-20 18:35:19.754922848 +0100
> +++ gfile.cc 2018-03-20 21:00:34.220373168 +0100
> @@ -80,7 +80,14 @@
>  struct StatMtim
>  {
>    static const struct timespec& value(const Stat& stbuf) {
> +#ifdef  HAVE_STRUCT_STAT_ST_MTIM
>      return stbuf.st_mtim;
> +#else
> +     static struct timespec t ;
> +     t.tv_sec=stbuf.st_mtime;
> +     t.tv_nsec=0;
> +     return t;
> +#endif
>    }
>  };
> 
> we can compile under linux, linux/mingw and Visual Studio 2015
> (note that st_mtim is defined under Windows  msys with gcc 7.3.0
> and perhaps also under cygwin).
> 
> Unfortunately,
> HAVE_STRUCT_STAT_ST_MTIM is defined by mean our autoconf  builder system
> (texlive doesn't use cmake) so the patch cannot  port as is into the
> source code of poppler
> (presuming that the patch itself is correct, of course).
> 
> Best regards,
> Scarso Luigi
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 525 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20180321/8cce37e1/attachment.sig>


More information about the poppler mailing list