Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 840662 - dev-util/mingw64-runtime-10.0.0 fails to emerge (failed check for __MINGW64__)
Summary: dev-util/mingw64-runtime-10.0.0 fails to emerge (failed check for __MINGW64__)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-24 19:45 UTC by Mathieu Chouinard
Modified: 2022-04-24 21:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,16.04 KB, text/plain)
2022-04-24 19:45 UTC, Mathieu Chouinard
Details
output of emerge --pqv (emerge-pqv,110 bytes, text/plain)
2022-04-24 19:46 UTC, Mathieu Chouinard
Details
build log (build.log,8.26 KB, text/x-log)
2022-04-24 19:46 UTC, Mathieu Chouinard
Details
environment (environment,70.23 KB, text/plain)
2022-04-24 19:46 UTC, Mathieu Chouinard
Details
output of x86_64-w64-mingw32-cpp (cpp-output,13.52 KB, text/plain)
2022-04-24 20:47 UTC, Mathieu Chouinard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Chouinard 2022-04-24 19:45:09 UTC
it fails after gcc stage1 with the following:

 configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
 * ERROR: cross-x86_64-w64-mingw32/mingw64-runtime-10.0.0::crossdev failed (configure phase):
 *   failed check for __MINGW64__

Reproducible: Always

Steps to Reproduce:
1.--target x86_64-w64-mingw32
2.
3.
Comment 1 Mathieu Chouinard 2022-04-24 19:45:44 UTC
Created attachment 774224 [details]
emerge --info
Comment 2 Mathieu Chouinard 2022-04-24 19:46:07 UTC
Created attachment 774227 [details]
output of emerge --pqv
Comment 3 Mathieu Chouinard 2022-04-24 19:46:23 UTC
Created attachment 774230 [details]
build log
Comment 4 Mathieu Chouinard 2022-04-24 19:46:35 UTC
Created attachment 774233 [details]
environment
Comment 5 Ionen Wolkens gentoo-dev 2022-04-24 20:21:49 UTC
Odd, this should only happen if it failed to call cpp / gcc -E, or grep failed

For a quick sanity check, do these two commands output anything other than "0 0"?

x86_64-w64-mingw32-cpp -dM - </dev/null | grep -q __MINGW64__; echo ${PIPESTATUS[*]}
x86_64-w64-mingw32-gcc -E -dM - </dev/null | grep -q __MINGW64__; echo ${PIPESTATUS[*]}

Tried with the stage1 gcc and it seems fine.
Comment 6 Mathieu Chouinard 2022-04-24 20:36:38 UTC
ok x86_64-w64-mingw32-cpp -dM - </dev/null | grep -q __MINGW64__; echo ${PIPESTATUS[*]} return nothing under zsh but with bash it return 2 0

same thing for the second one.
Comment 7 Ionen Wolkens gentoo-dev 2022-04-24 20:40:03 UTC
(In reply to Mathieu Chouinard from comment #6)
> ok x86_64-w64-mingw32-cpp -dM - </dev/null | grep -q __MINGW64__; echo
> ${PIPESTATUS[*]} return nothing under zsh but with bash it return 2 0
> 
> same thing for the second one.
Ah sorry, forgot to specify needed bash for PIPESTATUS.

That aside, does `x86_64-w64-mingw32-cpp -dM - </dev/null` report anything odd, errors? (it should just be showing a wall of #define)

For what it's worth, can check this too:

x86_64-w64-mingw32-cpp --version
Comment 8 Mathieu Chouinard 2022-04-24 20:47:01 UTC
x86_64-w64-mingw32-cpp (Gentoo 11.3.0 p4) 11.3.0
Comment 9 Mathieu Chouinard 2022-04-24 20:47:30 UTC
Created attachment 774299 [details]
output of x86_64-w64-mingw32-cpp
Comment 10 Larry the Git Cow gentoo-dev 2022-04-24 21:09:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2215adc4210cb2677d0457bddfb7d0be5cc7494

commit a2215adc4210cb2677d0457bddfb7d0be5cc7494
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2022-04-24 20:26:56 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2022-04-24 21:07:47 +0000

    dev-util/mingw64-runtime: revert to old style cpp check
    
    May return different error codes despite working properly,
    cause unknown but ideally should look at doing this
    differently. For now just revert to old behavior.
    
    While here, add guard for headers-only. Not an issue per-se
    given lib options don't matter, but it still uses wrong cpp
    at that stage.
    
    Closes: https://bugs.gentoo.org/840662
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 dev-util/mingw64-runtime/mingw64-runtime-10.0.0.ebuild   | 12 ++++++------
 dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r2.ebuild | 12 ++++++------
 dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r1.ebuild | 12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)