Created attachment 786536 [details] build log From https://bugs.gentoo.org/644556#c17, moving to a new issue here: (In reply to Larry the Git Cow from comment #16) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=4b7c1923fca6533a51be68bfbacc793469a521d4 I don't think this works right. Trying to build on ppc64le, I'm getting: In file included from ./include/windef.h:290, from src/hash.c:24: ./include/winnt.h:1655:2: error: #error You need to define a CONTEXT for your CPU But it doesn't make sense to be using winnt.h for a Linux system, nor to use host system parameters for the target. It seems likely this will mis-compile if building on a x86_64 host for a x86_32 target...
genidl/gendef tools built fine, but that commit also added widl which seems to be what's failing on ppc64le (winnt.h is a private header that's not installed, so it makes more sense now). As far I can see I /think/ this only support these: CONTEXT_I386_FULL CONTEXT_AMD64_FULL CONTEXT_ARM_FULL CONTEXT_ARM64_FULL (no PPC) Think best bet may be to skip it for everything else. Could you try to replace this: local tool= for tool in gendef genidl widl; do by local tool=widl if use !amd64 && use !x86 && use !arm && use !arm64; then einfo "Skipping widl due to unsupported platform" #853250 tool= fi for tool in gendef genidl ${tool}; do
(In reply to Ionen Wolkens from comment #1) > genidl/gendef tools built fine, but that commit also added widl which seems > to be what's failing on ppc64le (winnt.h is a private header that's not > installed, so it makes more sense now). > > As far I can see I /think/ this only support these: > CONTEXT_I386_FULL > CONTEXT_AMD64_FULL > CONTEXT_ARM_FULL > CONTEXT_ARM64_FULL > (no PPC) But it's supposed to be *targeting* amd64, so it shouldn't be acting on the host platform here. Doing so even for x86/ARM would be incorrect...
Like mentioned before, this does work for 64bit host with 32bit target (meaning it's seeing the right target just fine). To rule out ebuild issues (which is not impossible), you could probably try to build widl without the ebuild, e.g. cd mingw-w64-v10.0.0/mingw-w64-tools/widl ./configure --host=powerpc64le-unknown-linux-gnu --target=x86_64-w64-mingw32 make Unsure what this context stuff is so can't really answer if it needs this on the host or target. If the above is broken too you may need to take it upstream and/or give me another fix if you think skipping widl is not right.
From a quick look, winnt.h is just checking __arm__ __x86_64__ and similar (set by gcc), and the host compiler would set this. x86_64-pc-linux-gnu-gcc -E -dM - <<<"" | grep x86_64 #define __x86_64 1 (replaced by i386 with -m32) So sounds like it really doesn't support ppc* CHOST to me.
Also, to re-iterate, widl was newly added as a mean to skip requiring wine's widl at build time to build e.g. vkd3d-proton. USE=tools used to skip this either way.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33d7b158dc01843bd129d0f89cb301d9bf355d0a commit 33d7b158dc01843bd129d0f89cb301d9bf355d0a Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-06-21 03:31:49 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-06-29 17:22:36 +0000 dev-util/mingw64-runtime: disable widl on unsupported platforms Not tested, but should work in theory. Also drop redundant --prefix while here, but keep array so it's easy to add option if needed in the future. Closes: https://bugs.gentoo.org/853250 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> dev-util/mingw64-runtime/mingw64-runtime-10.0.0-r1.ebuild | 13 ++++++++----- dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild | 13 ++++++++----- dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild | 13 ++++++++----- 3 files changed, 24 insertions(+), 15 deletions(-)