Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925204 - cross-i686-w64-mingw32/gcc-13.2.1_p20240210 build failure No rule to make target '../build-x86_64-pc-linux-gnu/fixincludes/fixinc.sh', needed by 'stmp-fixinc'
Summary: cross-i686-w64-mingw32/gcc-13.2.1_p20240210 build failure No rule to make tar...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
: 925255 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-21 23:25 UTC by Chris Henhawke
Modified: 2024-03-07 18:37 UTC (History)
4 users (show)

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


Attachments
emerge --info (info,7.02 KB, text/plain)
2024-02-21 23:26 UTC, Chris Henhawke
Details
full build log (gcc-build-logs.tar.xz,87.70 KB, application/x-xz)
2024-02-21 23:26 UTC, Chris Henhawke
Details
toolchain-eclass-fixincludes-for-mingw.patch (foo.patch,466 bytes, patch)
2024-02-22 12:47 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Henhawke 2024-02-21 23:25:59 UTC
Trying to upgrade the crossdev-mingw gcc for wine, and I'm running into build failures...

(snip)                                                                                                                                                                                                                     
/bin/sh /var/tmp/portage/cross-i686-w64-mingw32/gcc-13.2.1_p20240210/work/gcc-13-20240210/gcc/../move-if-change tmp-fixinc_list fixinc_list                                                                 
echo timestamp > s-fixinc_list                                                                                                                                                                                                              
make[2]: *** No rule to make target '../build-x86_64-pc-linux-gnu/fixincludes/fixinc.sh', needed by 'stmp-fixinc'.  Stop.                                                                                                        
make[2]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/gcc-13.2.1_p20240210/work/build/gcc'              
make[1]: *** [Makefile:4280: all-gcc] Error 2                                                                                                                                                                                               
make[1]: Leaving directory '/var/tmp/portage/cross-i686-w64-mingw32/gcc-13.2.1_p20240210/work/build'                                                                                                                                        
make: *** [Makefile:1040: all] Error 2    

Reproducible: Always

Steps to Reproduce:
1. crossdev -t x86_64-w64-mingw32 i686-w64-mingw32 etc following wiki article
2. wait a few weeks for package updates
3. try upgrading world

Actual Results:  
gcc build failures


Expected Results:  
gcc builds successfully
Comment 1 Chris Henhawke 2024-02-21 23:26:26 UTC
Created attachment 885661 [details]
emerge --info
Comment 2 Chris Henhawke 2024-02-21 23:26:51 UTC
Created attachment 885662 [details]
full build log
Comment 3 Chris Henhawke 2024-02-21 23:32:16 UTC
For what it's worth, this is the same threadripper machine I had other random gcc/boost issues (https://bugs.gentoo.org/724314), I don't know if it's related.  This pc is quite cursed in general.
Comment 4 Ionen Wolkens gentoo-dev 2024-02-22 02:59:08 UTC
Hm, feel like this should've been fixed 2 days ago (Feb 19) in bug #905118 but your emerge --info shows Feb 21 (am I correct in assuming that you've tried with the currently reported sync?)

If so, maybe there is something else still? Haven't tried myself though.

Does not sound related to your hardware anyhow :)
Comment 5 Ionen Wolkens gentoo-dev 2024-02-22 03:12:26 UTC
(In reply to Ionen Wolkens from comment #4)
> Hm, feel like this should've been fixed 2 days ago (Feb 19) in bug #905118
Or, actually looking closer the error is different. I do assume it's related though.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-22 06:04:27 UTC
OK, --disable-fixincludes got passed. The error is weird though.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-22 06:14:28 UTC
mliska's commit to add the configure option was:

commit r13-2319-gbe9dd80f933480
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Aug 31 21:55:45 2022 +0200

    Support --disable-fixincludes.

gcc/configure.ac has:
```
if test x$enable_fixincludes = xno;
then
    STMP_FIXINC=''
fi
```

gcc/Makefile.in has:
```
# Build fixed copies of system files.
# Abort if no system headers available, unless building a crosscompiler.
# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: gsyslimits.h macro_list fixinc_list \
  $(build_objdir)/fixincludes/fixincl \
  $(build_objdir)/fixincludes/fixinc.sh
```

That rule doesn't seem to account for disabled fixincludes at all even if its deps existed?

The only interesting thing I see is:
```
gcc/config/i386/t-cygming:56:STMP_FIXINC=stmp-fixinc
```

so maybe we really do need fixincludes on some targets?
Comment 8 Ionen Wolkens gentoo-dev 2024-02-22 12:09:44 UTC
*** Bug 925255 has been marked as a duplicate of this bug. ***
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-22 12:47:03 UTC
gcc/config/i386/t-cygming:56:STMP_FIXINC=stmp-fixinc
gcc/config/mips/t-sdemtk:34:STMP_FIXINC = stmp-sdefixinc

so uh, maybe we can just do (in lieu of some easy way to map CTARGET -> config/*/t-$x):

--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1309,6 +1309,14 @@ toolchain_src_configure() {
                        GCC_RUN_FIXINCLUDES=1
                fi

+               case ${CBUILD}-${CHOST}-${CTARGET} in
+                       *i686-w64-mingw32*)
+                               GCC_RUN_FIXINCLUDES=1
+                               ;;
+                       *)
+                               ;;
+               esac
+
                if [[ ${GCC_RUN_FIXINCLUDES} == 1 ]] ; then
                        confgcc+=( --enable-fixincludes )
                else

not tested at all though; would help if someone hitting this could
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-22 12:47:55 UTC
Created attachment 885711 [details, diff]
toolchain-eclass-fixincludes-for-mingw.patch

(Proper version should do *mingw* or whatever).
Comment 11 sergiotarxz 2024-02-22 12:51:31 UTC
This worked for me:
        case ${CTARGET} in
            x86_64-*-mingw*|*-w64-mingw*)
                GCC_RUN_FIXINCLUDES=1
                ;;
        esac

before this line
        if [[ ${GCC_RUN_FIXINCLUDES} == 1 ]] ; then
Comment 12 Chris Henhawke 2024-02-22 15:38:56 UTC
Hi, didn't expect so many replies, just going through all the messages...

> am I correct in assuming that you've tried with the currently reported sync?

Yes, I synced again just now and same thing.

I thought this was another issue with my threadripper, but I tried it on one of my raptorlake systems and its also not working there either.  I guess there was a delay in gcc being stabilized and 905118, so I didn't notice it until I went to update my threadripper.

> not tested at all though; would help if someone hitting this could

I used "*i686-w64-mingw32*|*x86_64-w64-mingw32*" just to be sure I could upgrade both, seems to work.  

Thanks
Comment 13 Larry the Git Cow gentoo-dev 2024-02-23 07:46:15 UTC
The bug has been closed via the following commit(s):

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

commit 0c5af65cfb92b7702f170999488c970fc278d9a2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-23 07:16:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-23 07:46:08 +0000

    toolchain.eclass: allow fixincludes for mingw & special MIPS target
    
    config/i386/t-cygming always sets STMP_FIXINC regardless of the configure
    arg for fixincludes, so don't disable it there.
    
    The only other case is config/mips/t-sdemtk which I've handled too.
    
    Exposed by 0b75d3ce0bae8240c28c6a8f191f5130548f8475.
    
    Bug: https://bugs.gentoo.org/905118
    Closes: https://bugs.gentoo.org/925204
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-23 07:46:43 UTC
Sorry for the breakage. I don't have mingw in my usual setup.
Comment 15 Larry the Git Cow gentoo-dev 2024-03-07 18:37:59 UTC
The bug has been referenced in the following commit(s):

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

commit e4dfb164264174461dd6ac8a826fb01b00e5dbf8
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-07 18:36:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-07 18:36:18 +0000

    Revert "sys-devel/gcc: drop obsolete cross fixincludes patch for 13"
    
    This reverts commit 456eee6e374b50a4d9108a642ca29c5573ac5cb8.
    
    Restore the fixincludes revert. The situation has improved a bit though,
    because we now only run fixincludes when it's truly needed, so having
    this patch is less risky to begin with.
    
    Caveat emptor for trying to remove this in future: make sure to test
    clean builds without mingw already built, and with.
    
    Bug: https://bugs.gentoo.org/905118
    Bug: https://bugs.gentoo.org/925204
    Closes: https://bugs.gentoo.org/926059
    Signed-off-by: Sam James <sam@gentoo.org>

 .../gcc/files/gcc-13-fix-cross-fixincludes.patch      | 19 +++++++++++++++++++
 sys-devel/gcc/gcc-12.3.1_p20240223.ebuild             |  1 +
 sys-devel/gcc/gcc-12.3.1_p20240301.ebuild             |  1 +
 sys-devel/gcc/gcc-13.2.1_p20240113-r1.ebuild          |  1 +
 sys-devel/gcc/gcc-13.2.1_p20240210.ebuild             |  1 +
 sys-devel/gcc/gcc-13.2.1_p20240224.ebuild             |  1 +
 sys-devel/gcc/gcc-13.2.1_p20240302.ebuild             |  1 +
 sys-devel/gcc/gcc-14.0.1_pre20240225.ebuild           |  1 +
 sys-devel/gcc/gcc-14.0.1_pre20240303-r1.ebuild        |  1 +
 9 files changed, 27 insertions(+)