Hello Hin-Tak,
On 6/11/22 18:35, Hin-Tak Leung wrote:
i686-w64-mingw32-gcc -c -o dlls/windowscodecs/libjpeg.cross.o dlls/windowscodecs/libjpeg.c -Idlls/windowscodecs -Iinclude -Iinclude/msvcrt \ -I/usr/include -I./libs/png -D__WINESRC__ -D_UCRT -D__WINE_PE_BUILD -Wall -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self \ -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits \ -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op -Wabsolute-value \ -fno-omit-frame-pointer -gdwarf-4 -g -O2 In file included from include/objbase.h:20, from dlls/windowscodecs/libjpeg.c:31: include/rpcndr.h:73:23: error: conflicting types for 'boolean'; have 'unsigned char' 73 | typedef unsigned char boolean; | ^~~~~~~ In file included from /usr/include/jpeglib.h:31, from dlls/windowscodecs/libjpeg.c:24: /usr/include/jmorecfg.h:207:13: note: previous declaration of 'boolean' with type 'boolean' {aka 'int'} 207 | typedef int boolean; | ^~~~~~~ dlls/windowscodecs/libjpeg.c: In function 'jpeg_decoder_initialize':
This should be prevented by HAVE_BOOLEAN, defined in jconfig.h for win32 targets. It seems that the host libjpeg headers are being included instead.
I have some guesses as to how this happened, but I'm not fully sure. Can you please attach your config.log?
A few questions/thoughts:
- it seems that the build system is getting confused occasionally about say, native headers vs mingw headers like jpeg-devel; at some point, I got a error saying I was trying to build one of the unixlib.c's with mingw headers, for example. But I see for example that in the generated Makefile for dlls/windowscodecs/ , It is feeding *PE_FLAGS to unixlib.c (plus the PE stub), and I explicitly put -I...mingw32/include to *PE_FLAGS. That seems wrong.
There's no unixlib.c in windowscodecs. Are you referring to a different DLL?
What error did you get?