https://bugs.winehq.org/show_bug.cgi?id=56049
Bug ID: 56049 Summary: Wine >= 9.0-rc1: 32+64 bit build with -march=znver1 broken (libtiff, regression, gcc-12.2.0, Debian-12) Product: Wine Version: 9.0-rc2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: windowscodecs Assignee: wine-bugs@winehq.org Reporter: kolAflash@kolahilft.de Distribution: ---
Compiling a combined 32+64 bit Wine with -march=znver1 is broken since at least Wine-9.0-rc1. Tested on Debian-12 (gcc-12.2.0). There seems to be a problem with libtiff.
I'm using the following commands to build Wine since years. They worked fine with Wine <= 8.21. (Wine source has been extracted to wine-*)
Please tell me if you think this is not a Wine regression, but a GCC bug. Then I'll report it at GCC.
export PREFIX="${HOME}"/wine-build export CFLAGS='-march=znver1' mkdir 64; cd 64
../wine-*/configure CROSSCFLAGS="${CFLAGS}" --enable-win64 --prefix="${PREFIX}" --disable-tests
make -j16 mkdir ../32; cd ../32
PKG_CONFIG_PATH="${PREFIX}"/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig ../wine-*/configure CROSSCFLAGS="${CFLAGS}" --with-wine64=../64 --prefix="${PREFIX}" --libdir="${PREFIX}"/lib --disable-tests
make -j16 install cd ../64; make install
Since Wine >= 9.0-rc1 I'm getting the following error in the final "cd ../64; make install" command when using "-march=znver1".
i686-w64-mingw32-gcc -c -o dlls/windowscodecs/i386-windows/dlldata.o dlls/windowscodecs/dlldata.c -Idlls/windowscodecs \ -I../wine-9.0-rc1/dlls/windowscodecs -Iinclude -I../wine-9.0-rc1/include \ -I../wine-9.0-rc1/include/msvcrt -I../wine-9.0-rc1/libs/tiff/libtiff -I../wine-9.0-rc1/libs/jpeg \ -I../wine-9.0-rc1/libs/png -D_UCRT -D__WINESRC__ -DENTRY_PREFIX=WIC_ -DPROXY_DELEGATION \ -DWINE_REGISTER_DLL -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 -mpreferred-stack-boundary=2 -march=znver1 i686-w64-mingw32-gcc -c -o libs/tiff/i386-windows/libtiff/tif_aux.o ../wine-9.0-rc1/libs/tiff/libtiff/tif_aux.c -Ilibs/tiff \ -I../wine-9.0-rc1/libs/tiff -Iinclude -I../wine-9.0-rc1/include -I../wine-9.0-rc1/include/msvcrt \ -I../wine-9.0-rc1/libs/tiff/libtiff -I../wine-9.0-rc1/libs/jpeg -I../wine-9.0-rc1/libs/zlib \ -D_UCRT -DFAR= -DZ_SOLO -D__WINE_PE_BUILD -fno-strict-aliasing -Wno-packed-not-aligned \ -fno-omit-frame-pointer -mpreferred-stack-boundary=2 -march=znver1 during RTL pass: split1 ../wine-9.0-rc1/libs/tiff/libtiff/tif_aux.c: In function ‘_TIFFUInt64ToFloat’: ../wine-9.0-rc1/libs/tiff/libtiff/tif_aux.c:415:1: internal compiler error: in assign_stack_local_1, at function.cc:429 415 | } | ^ 0x7feffaa461c9 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7feffaa46284 __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See https://gcc.gnu.org/bugs/ for instructions. make: *** [Makefile:224677: libs/tiff/i386-windows/libtiff/tif_aux.o] Error 1
https://bugs.winehq.org/show_bug.cgi?id=56049
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- An internal compiler error is always a GCC bug. There may be something we can do to work around it, though.
My first guess for the bad commit is 4b458775bb. Does reverting that commit allow Wine to build?
https://bugs.winehq.org/show_bug.cgi?id=56049
--- Comment #2 from kolAflash kolAflash@kolahilft.de --- (In reply to Zeb Figura from comment #1)
An internal compiler error is always a GCC bug. There may be something we can do to work around it, though.
Looks like Alex Henrie already reported a pretty similar GCC error in the GCC bugtracker. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111107#c8
My first guess for the bad commit is 4b458775bb. Does reverting that commit allow Wine to build?
Works fine with 4b458775bb reverted.
Note: https://gitlab.winehq.org/wine/wine/-/commit/4b458775bb
https://bugs.winehq.org/show_bug.cgi?id=56049
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTOURBUG
--- Comment #3 from Zeb Figura z.figura12@gmail.com --- (In reply to kolAflash from comment #2)
(In reply to Zeb Figura from comment #1)
An internal compiler error is always a GCC bug. There may be something we can do to work around it, though.
Looks like Alex Henrie already reported a pretty similar GCC error in the GCC bugtracker. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111107#c8
Ah yes, I had forgotten about that. Fortunately that means the bug should be fixed in newer gcc, 12.3 or 13.0.
https://bugs.winehq.org/show_bug.cgi?id=56049
--- Comment #4 from kolAflash kolAflash@kolahilft.de --- Fixed with 13.2.0-9+26.1 (amd64) on Debian-Unstable (2024-03-05).
Note: znver3 is also affected.
https://bugs.winehq.org/show_bug.cgi?id=56049
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com