From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA18D3858D28; Mon, 10 Apr 2023 03:10:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA18D3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681096218; bh=VPEZbn5UEsaM6/WBsyLa9GZuSbtrLmFzdmzHvF3tbcg=; h=From:To:Subject:Date:From; b=R5fjEYQj1NR7RRT9Pz+beVd6LiWw7MoHWxzi0BQ8oo9uK6znbt+lghL1rkwQwolE2 K3fhbRxSW2Y4PY41ldqjUmkzZCut3n4BNkYnGt2+ubXNNS8IcePtegjslA05/kD0Bp kYwpCCWxkJ4U52Yzt1JYoPsNUN3ecbnXhoLkXk9U= From: "fanghuaqi at vip dot qq.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch Date: Mon, 10 Apr 2023 03:10:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fanghuaqi at vip dot qq.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109460 Bug ID: 109460 Summary: Build gcc for win32 failed in gcc13 master branch Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fanghuaqi at vip dot qq.com Target Milestone: --- Hi there, I tried to build gcc 13 for windows host using mingw gcc in linux. But I am facing the following issue. i686-w64-mingw32-g++ -fno-PIE -c /work/gcc/gcc/config/i386/sym-mingw32.cc sym-mingw32.o i686-w64-mingw32-g++: error: sym-mingw32.o: No such file or directory echo timestamp > s-bversion It seems the sym-mingw32.o is not generated via this command, and I thought= it should be like gcc -c hello.c -o hello.o, so I changed gcc/config/i386/x-mingw32-utf8 diff --git a/gcc/config/i386/x-mingw32-utf8 b/gcc/config/i386/x-mingw32-utf8 index 2783dd259a6..b008497ca0b 100644 --- a/gcc/config/i386/x-mingw32-utf8 +++ b/gcc/config/i386/x-mingw32-utf8 @@ -34,7 +34,7 @@ utf8rc-mingw32.o : $(srcdir)/config/i386/utf8-mingw32.rc \ # Create an object file that just exports the global symbol # HOST_EXTRA_OBJS_SYMBOL sym-mingw32.o : $(srcdir)/config/i386/sym-mingw32.cc - $(COMPILER) -c $< $@ + $(COMPILER) -c $< -o $@ This issue disappeared, but other issue like this happened, I didn't have i= deas to how to fix it. utf8-mingw32.o: In function `WinMainCRTStartup': ./mingw-w64-crt/crt/crtexe.c:171: multiple definition of `WinMainCRTStartup' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/../../../../i686-w64-mingw32/lib/..= /lib/crt2.o:./mingw-w64-crt/crt/crtexe.c:171: first defined here utf8-mingw32.o: In function `mainCRTStartup': ./mingw-w64-crt/crt/crtexe.c:199: multiple definition of `mainCRTStartup' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/../../../../i686-w64-mingw32/lib/..= /lib/crt2.o:./mingw-w64-crt/crt/crtexe.c:199: first defined here /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 117. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 97. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. utf8-mingw32.o:cygming-crtbegin.c:(.text+0x500): multiple definition of `__gcc_register_frame' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/crtbegin.o:cygming-crtbegin.c:(.tex= t+0x0): first defined here utf8-mingw32.o:cygming-crtbegin.c:(.text+0x520): multiple definition of `__gcc_deregister_frame' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/crtbegin.o:cygming-crtbegin.c:(.tex= t+0x20): first defined here /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 97. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. utf8-mingw32.o:crtexe.c:(.CRT$XIAA+0x0): multiple definition of `mingw_pcin= it' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/../../../../i686-w64-mingw32/lib/..= /lib/crt2.o:crtexe.c:(.CRT$XIAA+0x0): first defined here /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 97. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. utf8-mingw32.o:crtexe.c:(.data+0x0): multiple definition of `__mingw_winmain_nShowCmd' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/../../../../i686-w64-mingw32/lib/..= /lib/crt2.o:crtexe.c:(.data+0x0): first defined here /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 97. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. utf8-mingw32.o:crtexe.c:(.CRT$XCAA+0x0): multiple definition of `mingw_pcppinit' /usr/lib/gcc/i686-w64-mingw32/7.3-win32/../../../../i686-w64-mingw32/lib/..= /lib/crt2.o:crtexe.c:(.CRT$XCAA+0x0): first defined here main.o: In function `main': /work/gcc/gcc/main.cc:35: multiple definition of `main' utf8-mingw32.o:./mingw-w64-crt/crt/crtexe.c:118: first defined here /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 117. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1599555406) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1230261845) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1414356820) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 97. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (6644847) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1685024119) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (1684826487) greater than= or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Offset (7496040) greater than or equal to .debug_line size (9993). /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101. /usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 110. utf8-mingw32.o:crtexe.c:(.text.startup+0x39): undefined reference to `WinMain@16' collect2: error: ld returned 1 exit status /work/gcc/gcc/c/Make-lang.in:86: recipe for target 'cc1.exe' failed make[2]: *** [cc1.exe] Error 1 make[2]: Leaving directory '/work/LocalBuilds/2023.04.06_20230407_013756/build-gcc-newlib-stage1/gcc' Makefile:4642: recipe for target 'all-gcc' failed make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory '/work/LocalBuilds/2023.04.06_20230407_013756/build-gcc-newlib-stage1' Makefile:1057: recipe for target 'all' failed make: *** [all] Error 2 Is there any guidance about how to fix it, thanks. Thanks=