Having problems (re-)building i686 wine staging rpm's on fedora

Hin-Tak Leung htl10 at users.sourceforge.net
Sat Jun 11 18:35:22 CDT 2022


Due to having a few modifications considered unsuitable for upstreaming, I have been grabbing the official fedora rpm's since at least wine-1.9.20 / 2016 , patching the spec file, adding my patches, plus a "Epoch: 100" line, so it blocks auto--upgrades, until I rebuild it myself every two or three wine releases. This has worked well for 6+ years, until 7.3+ . I last built 7.2 staging with 

(rpmbuild -bb wine.spec && rpmbuild --target=i686 -bb wine.spec) 2>&1 | tee build-log .

Fedora's koji build farm only have 7.3, 7.5, 7.9, and 7.10.

I tried 7.10 and the x86_64 part finished (*see notes below), but the i686 part just wouldn't go ahead, due to some PE-related collisions.

I back-tracked, and found the failure was between 7.3 and 7.5.


===

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':
dlls/windowscodecs/libjpeg.c:180:40: warning: assignment to 'boolean (*)(struct jpeg_decompress_struct *)' {aka 'int (*)(struct jpeg_decompress_struct *)'} from incompatible pointer type 'boolean (*)(struct jpeg_decompress_struct *)' {aka 'unsigned char (*)(struct jpeg_decompress_struct *)'} [-Wincompatible-pointer-types]
  180 |     This->source_mgr.fill_input_buffer = source_mgr_fill_input_buffer;
      |                                        ^
dlls/windowscodecs/libjpeg.c: In function 'jpeg_encoder_initialize':
dlls/windowscodecs/libjpeg.c:466:40: warning: assignment to 'boolean (*)(struct jpeg_compress_struct *)' {aka 'int (*)(struct jpeg_compress_struct *)'} from incompatible pointer type 'boolean (*)(struct jpeg_compress_struct *)' {aka 'unsigned char (*)(struct jpeg_compress_struct *)'} [-Wincompatible-pointer-types]
  466 |     This->dest_mgr.empty_output_buffer = dest_mgr_empty_output_buffer;
      |                                        ^
make: *** [Makefile:127914: dlls/windowscodecs/libjpeg.cross.o] Error 1
===

I tried setting PNG_PE_CFLAGS, ZLIB_PE_CFLAGS, LCMS2_PE_CFLAGS, JPEG_PE_CFLAGS, JPEG_PE_LIBS etc explicitly, and sometimes it get worse.

Anyway, I have tried some many things that I thought it might be worth reaching out to the people who maintain the fedora rpm's as well as well wine-devel.

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.

-  I don't understand why --target=x86_64 rebuild works, built --target=i686 rebuild fails with the above error. My list of mingw32-* packages and mingw64-* packages are almost identical, I think, and certainly regarding libjpeg (zlib/png dependencies) .

I have the 29MB combined x86-64 and i686 build-log of 7.3, plus the 15MB x86-64 and ~3MB i686 failure of each of 7.5/7.9/7.10 ; but it is kind of difficult to see what to check. Any hints on what to look at at config.log would be useful.


*note rpmbuild detects isdn4k-utils on my system so I needed to add these two lines 

+%{_libdir}/wine/%{winesodir}/capi2032.so
+%{_libdir}/wine/%{winepedir}/capi2032.dll

to my modified spec. I suppose I should formalize this part of my diff with one furthe line of BuildRequires: isdn4k-utils-devel as a reminder to myself.



More information about the wine-devel mailing list