Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 760018

Summary: =cross-i686-w64-mingw32/mingw64-runtime-8.0.0 fails to build: configure failed for mingw-w64-crt
Product: Gentoo Linux Reporter: Bob Wya <bob.mt.wya>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cross, jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
cross-i686-w64-mingw32-binutils.log
cross-i686-w64-mingw32-mingw64-runtime-headers.log
cross-i686-w64-mingw32-gcc-stage1.log
cross-i686-w64-mingw32-mingw64-runtime.log
cross-i686-w64-mingw32-gcc-stage2.log

Description Bob Wya 2020-12-14 19:40:42 UTC
I've been trying to rebuild (the previously working) cross-build environments:
i686-w64-mingw32 & x86_64-w64-mingw32

Hitting a brick wall with cross-i686-w64-mingw32/mingw64-runtime:
checking _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ./configure failed for mingw-w64-crt

The _mingw_mac.h header file is present in the cross build environment include directory...


Also with =cross-i686-w64-mingw32/binutils-2.35.1-r1:
mv: cannot stat '/tmp/portage/cross-i686-w64-mingw32/binutils-2.35.1-r1/image/usr/x86_64-pc-linux-gnu/i686-w64-mingw32/include': No such file or directory
mv: cannot stat '/tmp/portage/cross-i686-w64-mingw32/binutils-2.35.1-r1/image/usr/x86_64-pc-linux-gnu/i686-w64-mingw32/lib/*': No such file or directory
rm: cannot remove '/tmp/portage/cross-i686-w64-mingw32/binutils-2.35.1-r1/image/usr/x86_64-pc-linux-gnu/include': No such file or directory
rm: cannot remove '/tmp/portage/cross-i686-w64-mingw32/binutils-2.35.1-r1/image/usr/x86_64-pc-linux-gnu/lib': No such file or directory

- these lines looks a bit suspect!



Reproducible: Always

Steps to Reproduce:
1. crossdev -C -t i686-w64-mingw32
2. crossdev -t i686-w64-mingw32
Actual Results:  
environment is built, but with errors for:
cross-i686-w64-mingw32/mingw64-runtime (and cross-i686-w64-mingw32/gcc - stage 2)

Expected Results:  
environment is built, without build errors.

The cross-i686-w64-mingw32 target was building successfully back in Oct 2020...
I've not been able to pin down what is causing the build failures now...
Comment 1 Bob Wya 2020-12-14 19:43:08 UTC
Created attachment 678292 [details]
emerge --info
Comment 2 Bob Wya 2020-12-14 19:45:32 UTC
Created attachment 678295 [details]
cross-i686-w64-mingw32-binutils.log
Comment 3 Bob Wya 2020-12-14 19:46:21 UTC
Created attachment 678298 [details]
cross-i686-w64-mingw32-mingw64-runtime-headers.log
Comment 4 Bob Wya 2020-12-14 19:46:54 UTC
Created attachment 678301 [details]
cross-i686-w64-mingw32-gcc-stage1.log
Comment 5 Bob Wya 2020-12-14 19:47:31 UTC
Created attachment 678304 [details]
cross-i686-w64-mingw32-mingw64-runtime.log
Comment 6 Bob Wya 2020-12-14 19:47:59 UTC
Created attachment 678307 [details]
cross-i686-w64-mingw32-gcc-stage2.log
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2020-12-14 19:58:21 UTC
> * EXTRA_ECONF='--enable-threads=posix'

Where does it come from?

gcc's pthreads can only be enable after mingw64-runtime provides pthread stubs. But it can't be enabled until gcc-stage2 is built.
Comment 8 Ionen Wolkens gentoo-dev 2020-12-14 21:08:28 UTC
(In reply to Sergei Trofimovich from comment #7)
> > * EXTRA_ECONF='--enable-threads=posix'
> 
> Where does it come from?
Typically added because it's needed build dxvk, some wikis/overlays/ebuilds will ask users to set it.
e.g. https://wiki.gentoo.org/wiki/DXVK

I use =posix as well but haven't run crossdev script in a long time (portage been keeping my mingw toolchain updated without issues, formerly was with gcc 9.2.x but now upgraded to 10.2.0-r3), so won't confirm any issues.

(on a side-note, =posix is _not_ needed for USE=mingw on wine, and there's many convenient ways to get dxvk prebuilt dlls)
Comment 9 Ionen Wolkens gentoo-dev 2020-12-14 21:16:53 UTC
(In reply to Sergei Trofimovich from comment #7)
> gcc's pthreads can only be enable after mingw64-runtime provides pthread
> stubs. But it can't be enabled until gcc-stage2 is built.
And right, this makes sense. I did not add this until I had the toolchain working myself.
Comment 10 Bob Wya 2020-12-14 22:13:44 UTC
(In reply to Ionen Wolkens from comment #8)

> (on a side-note, =posix is _not_ needed for USE=mingw on wine, and there's
> many convenient ways to get dxvk prebuilt dlls)

Useful to know... But I do like to be able to build dxvk as well. ;-)
Comment 11 James Le Cuirot gentoo-dev 2020-12-27 15:50:11 UTC
I think slyfox has a better handle on this than I do. I'll just watch from the sidelines.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-03 12:50:05 UTC
Let's dupe against older bug to provide some reasonable way to enable pthreads.

*** This bug has been marked as a duplicate of bug 631460 ***