https://bugs.winehq.org/show_bug.cgi?id=38886
--- Comment #13 from Patrick Littlefighter1996@googlemail.com --- Thanks for the response. I'll try again with 8.0-rc5.
I'm indeed cross-compiling. Maybe that's the problem. I have already built the version of Wine 7.21 for my host machine and therefor have the wine-tools.
I'm using following configure command, after I've sourced the environment file:
../configure --enable-win64 --with-alsa CC="ccache /opt/tdx-xwayland/2.6.3/sysroots/x86_64-tdxsdk-linux/usr/bin/aarch64-tdx-linux/aarch64-tdx-linux-gcc --sysroot=/opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux" CXX="ccache /opt/tdx-xwayland/2.6.3/sysroots/x86_64-tdxsdk-linux/usr/bin/aarch64-tdx-linux/aarch64-tdx-linux-gcc --sysroot=/opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux" LD=/opt/tdx-xwayland/2.6.3/sysroots/x86_64-tdxsdk-linux/usr/bin/aarch64-tdx-linux/aarch64-tdx-linux-ld 'CFLAGS=-Og -gdwarf-4 --sysroot=/opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux' 'CROSSCFLAGS=-Og -gdwarf-4' 'LDFLAGS=--sysroot=/opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed' --host=aarch64-tdx-linux --with-wine-tools=../build-g-7.21 FREETYPE_CFLAGS=-I/opt/tdx-xwayland/2.6.3/sysroots/aarch64-tdx-linux/usr/include/freetype2 --without-gnutls --prefix=/opt/tdx-xwayland/2.6.3/wine --disable-win16 --disable-wow64 --disable-wow64win --disable-wow64cpu
GCC: aarch64-tdx-linux-gcc (GCC) 8.2.0 Clang: clang version 15.0.0 (4ba6a9c9f65bbc8bd06e3652cb20fd4dfc846137)
I've noticed that specifying the "--sysroot" parameter in CROSSCFLAGS as well breaks the build completely in my case. (Binary builds, but can't load DLLs, strings are corrupted. e.g tries to load "n.drv" instead of "winex11.drv")
So if I understood correctly, using gcc (for CC) AND llvm-mingw's clang through winegcc (for "CROSSCC"), as well as only using clang the build should actually work? If that's the case, I would try it again by emulating the target machine, setup a toolchain and try to run the build there. (After all, if clang works for you, it sounds like that's an issue with cross-compiling).
I assume there is a test that is being run to ensure that varargs don't break? If yes, maybe it only fails under certain circumstances that aren't covered, yet? I would like to run it, to determine if it passes or fails on my build.
(my program runs only: "_snwprintf_s(buffer, _countof(buffer), _countof(buffer) - 1, L"%Ts + %Ts", L"A", L"B");" and crashes)