Nerijus Baliunas schreef op do 07-07-2011 om 04:04 [+0300]:
I am trying to compile poppler-0.16.7 on Fedora 15. mingw32-configure fails to link
checking for opj_cio_open in -lopenjpeg... no
checking openjpeg.h usability... yes
checking openjpeg.h presence... yes
checking for openjpeg.h... yes
Why? But running mingw32-cmake instead of mingw32-configure enables libopenjpeg support.
Apparently the configure script of poppler tries to find a function
named opj_cio_open in the openjpeg library, but fails to do so.
I'm not familiar with openjpeg, but it might be possible that the
version of openjpeg bundled in Fedora is too old or broken. Adam Goode
) is the package maintainer of
mingw32-openjpeg. Perhaps he can help you with this?
Later it fails:
In file included from /usr/i686-pc-mingw32/sys-root/mingw/include/winnt.h:192:0,
/usr/i686-pc-mingw32/sys-root/mingw/include/basetsd.h:52:13: error: conflicting
declaration 'typedef int INT32'
/usr/i686-pc-mingw32/sys-root/mingw/include/jmorecfg.h:164:14: error: 'INT32' has
a previous declaration as 'typedef long int INT32'
This is a known issue which is completely unrelated to openjpeg. As the
configure check for openjpeg failed, the poppler configure script
decided to use mingw32-libjpeg as fallback.
The conflict happens when some .c file tries to #include both basetsd.h
and jmorecfg.h. Both contain a declaration for the INT32 data type. To
workaround it you can try to strip the #include <basetsd.h> from the
file JpegWriter.cc (perhaps other files are affected too).
In Fedora Rawhide this problem is already solved in a more proper way.
Recently, the package mingw32-libjpeg was replaced by
mingw32-libjpeg-turbo. Several (upstreamed!) changes have been done to
prevent these kind of conflicts. If it's possible, I would recommend you
to use the mingw32 packages which are currently in Fedora Rawhide.
Erik van Pienbroek