[poppler] Cross compiling poppler 0.63.0 with mingw fails

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Wed Mar 21 13:02:52 UTC 2018


Dear Luigi,

Also I am sorry that st_mtim issue made you troubled.
and, thanks to Adam for forwarding this.

>> 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).

I want to know more about this. If I can provide a patch for
autotool to check st_mtim and set the macro appropriately,
it could be a solution? Although solving the problem within
poppler is better solution, if an external patch for texlive
can help, I would try.

Regards,
mpsuzuki


Adam Reichold wrote:
> 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
>>
> 



More information about the poppler mailing list