Summary: | dev-util/mingw64-runtime USE=tools fails bootstrap (or builds target binaries), gendef and genidl are compiled for Windows | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | hanetzer |
Component: | Current packages | Assignee: | Ionen Wolkens <ionen> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | herrtimson, jfostiguy, luke-jr+gentoobugs, toolchain |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/25365 https://bugs.gentoo.org/show_bug.cgi?id=853250 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
runtime build.log
runtime config.log what it says on the tin cross-x86_64-w64-mingw32-mingw64-runtime.log |
Description
hanetzer
2018-01-14 15:35:03 UTC
Created attachment 565808 [details]
runtime build.log
Created attachment 565810 [details]
runtime config.log
Created attachment 565812 [details]
what it says on the tin
Was original bug report about build failure? (In reply to Fedja Beader from comment #3) > Created attachment 565812 [details] > what it says on the tin > configure:3432: i686-w64-mingw32-gcc -O2 -pipe -fomit-frame-pointer -march=core2 -I/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-6.0.0-r1/temp/tmproot/include -Wl,-O1 -Wl,--as-needed conftest.c >&5 > /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find crt2.o: No such file or directory > /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find -lmingw32 Do you have full cross-compiler installed to use USE=tools? Try 'USE=-tools crossdev ...' if it works. USE="-tools -hardened" FEATURES="-fail-clean" crossdev --ov-output /var/portage/crossdev/ --overlays gentoo -t i686-w64-mingw32 Produces a toolchain without failure. Thank you! Let's see if we can just skip tools building at headers-only stage. (In reply to Sergei Trofimovich from comment #4) > Was original bug report about build failure? No, it was about a 'successful' build which built the genidl/etc executables as windows binaries which are 'unusable' (without wine or so) on linux. Thank you! Updated the title. (In reply to Sergei Trofimovich from comment #7) > Thank you! Let's see if we can just skip tools building at headers-only > stage. They already seem to be. But this fails at *any* stage, because it's trying to build them for the wrong platform (which isn't bootstrapped yet) Created attachment 636272 [details]
cross-x86_64-w64-mingw32-mingw64-runtime.log
I am having this issue as well, it seems to be trying to build for a target that doesn't exist yet. I have tried all sorts of things but no workaround gets this to work and it is difficult to find anyone who knows anything about it, and mostly it just seems what it is trying to do is bizarre, as checking for whether the c compiler is capable of making an executable seems antiethical to the entire point of mingw in the first place. you might want to try to bootstrap the whole toolchain with USE="-tools" (flipping the libraries use flag might be also a good choice) and readd the useflags to cross-x86_64-w64-mingw32/mingw64-runtime when you're done with that. This way it should build, but the tools are still build as executables for windows. (In reply to anna from comment #11) > Created attachment 636272 [details] > cross-x86_64-w64-mingw32-mingw64-runtime.log I see you have --with-tools enabled. How do you enable USE=tools? Is it intentional? May have a look eventually if anything can be improved in a sane way here but, as already mentioned, meanwhile don't enable USE=tools during bootstrap. Renaming the USE could also be an option so it's less common and not enabled by accident by a global USE=tools. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b7c1923fca6533a51be68bfbacc793469a521d4 commit 4b7c1923fca6533a51be68bfbacc793469a521d4 Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2022-05-10 07:06:43 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2022-05-13 02:29:29 +0000 dev-util/mingw64-runtime: build tools for CHOST and add widl Non-native USE=tools never made much sense, If a package is cross-compiling for mingw using e.g. widl, it'll need to be able to run the tool. This also prevents build failure (bug #644556) during bootstrap given this won't be trying to link with mingw (note that can cross-emerge mingw64-runtime for old behavior). wrt widl, it is provided by wine but that is a heavy dependency and some upstreams (e.g. vkd3d-proton) default to using *-w64-mingw32-widl instead -- small tool so may as well install it. Closes: https://bugs.gentoo.org/644556 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> .../mingw64-runtime-10.0.0-r1.ebuild | 33 +++++++++++++++++++--- .../mingw64-runtime-8.0.0-r3.ebuild | 33 +++++++++++++++++++--- .../mingw64-runtime-9.0.0-r2.ebuild | 33 +++++++++++++++++++--- 3 files changed, 87 insertions(+), 12 deletions(-) (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... Full build.log? I don't quite see how tools would be using winnt.h considering it shouldn't be in any include paths (unless it's failing on something else entirely). And tools don't use CHOST for the target, when it switches it's to build mingw64 libraries, otherwise it'd be like building a .dll for x86_64-pc-linux-gnu. All the commit did wrt that is move the CHOST=$CTARGET lower down. x86_64 for 32bit target worked last I tried, e.g. cross-i686-w64-mingw32/mingw64-runtime[tools] gives me native tools as /usr/bin/i686-w64-mingw32-genidl and if cross-emerged for some reason, will get /usr/i686-w64-mingw32/bin/genidl.exe No idea if anything of note that's ppc64le specific. |