public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch
@ 2023-04-10  3:10 fanghuaqi at vip dot qq.com
  2023-04-10 19:54 ` [Bug c/109460] " costas.argyris at gmail dot com
                   ` (35 more replies)
  0 siblings, 36 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-10  3:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

            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 ideas
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:(.text+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:(.text+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_pcinit'
/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

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
@ 2023-04-10 19:54 ` costas.argyris at gmail dot com
  2023-04-10 20:41 ` ebotcazou at gcc dot gnu.org
                   ` (34 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-10 19:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #1 from Costas Argyris <costas.argyris at gmail dot com> ---
Can you give some more info on how exactly you are cross-building gcc for
windows host?

Did you add the -fno-PIE flag manually or was it part of the build process you
are following?

Seems like you are trying to compile an executable out of sym-mingw32.cc, but
this shouldn't be happening because this file gets compiled into a simple
object file only.    That's why it would help to know more about the build
process you are following.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
  2023-04-10 19:54 ` [Bug c/109460] " costas.argyris at gmail dot com
@ 2023-04-10 20:41 ` ebotcazou at gcc dot gnu.org
  2023-04-10 21:41 ` costas.argyris at gmail dot com
                   ` (33 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-10 20:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-04-10
     Ever confirmed|0                           |1

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Did you add the -fno-PIE flag manually or was it part of the build process
> you are following?

-fno-PIE is automatically set when the compiler is built.

> Seems like you are trying to compile an executable out of sym-mingw32.cc,
> but this shouldn't be happening because this file gets compiled into a
> simple object file only.    That's why it would help to know more about the
> build process you are following.

The missing -o looks genuine, does not it?

sym-mingw32.o : $(srcdir)/config/i386/sym-mingw32.cc
        $(COMPILER) -c $< $@

Note that:

tf8-mingw32.o : utf8rc-mingw32.o sym-mingw32.o
        $(COMPILER) -r utf8rc-mingw32.o sym-mingw32.o -o $@

can be rewritten using $^ instead of repeating the prerequisites.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
  2023-04-10 19:54 ` [Bug c/109460] " costas.argyris at gmail dot com
  2023-04-10 20:41 ` ebotcazou at gcc dot gnu.org
@ 2023-04-10 21:41 ` costas.argyris at gmail dot com
  2023-04-10 22:07 ` ebotcazou at gcc dot gnu.org
                   ` (32 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-10 21:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #3 from Costas Argyris <costas.argyris at gmail dot com> ---
"The missing -o looks genuine, does not it?"

Not to me because this has been built successfully before.    If this was the
problem then it would never build, right?

What happened in this case was that sym-mingw32.o was treated as an input to
the compiler (see "No such file or directory" error) rather than as an output
which it really is.

I suspect this had to do with -fno-PIE triggering building an executable, which
I still don't know where it is coming from and whether it should be used for
compiling this file, as this has nothing to do with an executable - we are only
compiling the .cc file to a .o file.

Still I think it is important to have details of the overall build process
followed to get some context.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (2 preceding siblings ...)
  2023-04-10 21:41 ` costas.argyris at gmail dot com
@ 2023-04-10 22:07 ` ebotcazou at gcc dot gnu.org
  2023-04-10 22:43 ` costas.argyris at gmail dot com
                   ` (31 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-10 22:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Not to me because this has been built successfully before.    If this was
> the problem then it would never build, right?

This looks like a bug in any case and thus needs to be fixed.

> What happened in this case was that sym-mingw32.o was treated as an input to
> the compiler (see "No such file or directory" error) rather than as an
> output which it really is.

Yes, because -o is missing.

> I suspect this had to do with -fno-PIE triggering building an executable,
> which I still don't know where it is coming from and whether it should be
> used for compiling this file, as this has nothing to do with an executable -
> we are only compiling the .cc file to a .o file.

-fno-PIE is just a standard -f compilation option, nothing more.

> Still I think it is important to have details of the overall build process
> followed to get some context.

No disagreement.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (3 preceding siblings ...)
  2023-04-10 22:07 ` ebotcazou at gcc dot gnu.org
@ 2023-04-10 22:43 ` costas.argyris at gmail dot com
  2023-04-11  1:45 ` fanghuaqi at vip dot qq.com
                   ` (30 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-10 22:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #5 from Costas Argyris <costas.argyris at gmail dot com> ---
>> Yes, because -o is missing.

I don't understand why -o missing is a problem some times but not others
(because this has been succesfully built before with -o missing).

Adding a "-o" flag seems OK to me if it solves this issue, but Huaqi still
reported problems even after adding it:

utf8-mingw32.o: In function `WinMainCRTStartup':
...

this object file should never have such a function, so something went very
wrong in this build process.    Looks like something was attempted to get built
as an executable, when it shouldn't.    All three object files:

utf8rc-mingw32.o
sym-mingw32.o
utf8-mingw32.o

should be without any such main function.    What caused this main function to
appear in this object file in this particular build process?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (4 preceding siblings ...)
  2023-04-10 22:43 ` costas.argyris at gmail dot com
@ 2023-04-11  1:45 ` fanghuaqi at vip dot qq.com
  2023-04-11  8:54 ` costas.argyris at gmail dot com
                   ` (29 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-11  1:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #6 from Huaqi <fanghuaqi at vip dot qq.com> ---
I think it might be introduced by this commit
https://github.com/gcc-mirror/gcc/commit/304c7d44a2212e6fd618587331cea2c266dc10bf,
since I tested this commit
https://github.com/gcc-mirror/gcc/commit/4872e46e080c6695dfe1f9dc9db26b4703bc348c
it works for win32 build. After this commit, it failed.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (5 preceding siblings ...)
  2023-04-11  1:45 ` fanghuaqi at vip dot qq.com
@ 2023-04-11  8:54 ` costas.argyris at gmail dot com
  2023-04-11  9:01 ` costas.argyris at gmail dot com
                   ` (28 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-11  8:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #7 from Costas Argyris <costas.argyris at gmail dot com> ---
Still can't do much without detailed info on how exactly you are building gcc,
what is your build setup, what is your cross-compiler version, OS, how you
configure etc etc...    Ideally, solid reproduction steps would be optimal.   
Also, isolated logs from a single file are not that helpful, could you please
paste more context from the build log around the error?

Also, is this happening only for the 32-bit windows host, meaning that the
64-bit windows host is succeeding, or you haven't tried the 64-bit windows host
at all?

The patch you pointed at has been built successfully with some common build
setups, both cross and native, for both 32 and 64-bit windows hosts, so it
can't be completely broken - we just have to figure out what is different in
your particular build process and is causing problems, which is why I am asking
for more info and reproduction steps.

Also, as I said before, the fact that you ended up with this line:

utf8-mingw32.o: In function `WinMainCRTStartup':

indicates that something went horribly wrong because these object files have no
relation to any main function, and yet they were somehow attempted to be built
as executables.    This should never have happened, so I am curious how exactly
you ended up in this situation.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (6 preceding siblings ...)
  2023-04-11  8:54 ` costas.argyris at gmail dot com
@ 2023-04-11  9:01 ` costas.argyris at gmail dot com
  2023-04-11  9:15 ` fanghuaqi at vip dot qq.com
                   ` (27 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-11  9:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #8 from Costas Argyris <costas.argyris at gmail dot com> ---
Are you building the cross-compiler itself or just using an existing
cross-compiler to build for the windows host?

You may have to build the cross-compiler first from the latest gcc sources, and
then use that newly-built cross-compiler to build the same gcc sources into a
windows-hosted compiler.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (7 preceding siblings ...)
  2023-04-11  9:01 ` costas.argyris at gmail dot com
@ 2023-04-11  9:15 ` fanghuaqi at vip dot qq.com
  2023-04-11 10:12 ` costas.argyris at gmail dot com
                   ` (26 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-11  9:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #9 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hi, Costas Argyris,

I am using this repo to help build toolchain, the repo link is here:

https://github.com/riscv-collab/riscv-gnu-toolchain

clone this source code and its submodule, and change gcc to upstream version

git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git
git submodule update --init --recursive --depth 1
cd gcc
# fetch upstream gcc source code
git fetch --all
git checkout master
cd ..

Tested in Ubuntu 18.04, with packages binutils-mingw-w64-i686
gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 installed and
other requirements in
https://github.com/riscv-collab/riscv-gnu-toolchain#prerequisites.


build command:

mkdir build
cd build
../configure --prefix=$(pwd)/install --with-host=i686-w64-mingw32 
--enable-multilib
make -j16

Then you will be able to reproduce this issue.

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (8 preceding siblings ...)
  2023-04-11  9:15 ` fanghuaqi at vip dot qq.com
@ 2023-04-11 10:12 ` costas.argyris at gmail dot com
  2023-04-11 12:03 ` costas.argyris at gmail dot com
                   ` (25 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-11 10:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #10 from Costas Argyris <costas.argyris at gmail dot com> ---
Hi Huaqi,

This is building a larger project, which gcc is part of.    I am not familiar
with that larger project and I have never built it.

Could we extract only the gcc-specific part out of the entire build process,
such that I can reproduce the gcc build failure on its own, just by using gcc's
configure?    In other words, I would like to debug gcc's build process only,
not a larger project's build process which includes building gcc.    If there
is indeed a problem with gcc due to that patch, it should be possible to
isolate it and reproduce it by building gcc only by itself.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug c/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (9 preceding siblings ...)
  2023-04-11 10:12 ` costas.argyris at gmail dot com
@ 2023-04-11 12:03 ` costas.argyris at gmail dot com
  2023-04-12  4:11 ` [Bug bootstrap/109460] " fanghuaqi at vip dot qq.com
                   ` (24 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-11 12:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #11 from Costas Argyris <costas.argyris at gmail dot com> ---
As I said before, I think adding the "-o" flag to

$(COMPILER) -c $< -o $@

is a good and harmless change, but, as per your own report, it didn't solve
your issues because you still got that mysterious line:

utf8-mingw32.o: In function `WinMainCRTStartup':

which doesn't make sense to me.    This makes me suspect that the problem is
something else and not the abscence of "-o".    These object files have nothing
to do with such main functions that are associated with executables.    So
unless you come up with gcc-specific reproduction steps for me to investigate,
you have to figure out why this object file even has a WinMainCRTStartup
function after adding the "-o" flag.

I also noticed you are using gcc 7.3 as the cross-compiler.    Would it be
possible to use a more recent version, just to see if that makes a difference?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (10 preceding siblings ...)
  2023-04-11 12:03 ` costas.argyris at gmail dot com
@ 2023-04-12  4:11 ` fanghuaqi at vip dot qq.com
  2023-04-12  4:13 ` fanghuaqi at vip dot qq.com
                   ` (23 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12  4:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #12 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hello, this is the command used to configure gcc

/work/gcc/configure --target=riscv64-unknown-elf --host=i686-w64-mingw32
--prefix=/work/LocalInstall/win32/newlibc/2023.04-eng2/gcc --disable-shared
--di
sable-threads --enable-languages=c,c++ --with-pkgversion=g465fcab6ea9
--with-system-zlib --enable-tls --with-newlib
--with-sysroot=/work/LocalInstall/win32/n
ewlibc/2023.04-eng2/gcc/riscv64-unknown-elf
--with-native-system-header-dir=/include --disable-libmudflap --disable-libssp
--disable-libquadmath --disable-li
bgomp --disable-nls --disable-tm-clone-registry --src=/work/gcc
--enable-multilib
--with-multilib-generator=rv32emc-ilp32e--;rv32emac-ilp32e--;rv32imc-ilp32-
-;rv32imac-ilp32--;rv32imafc-ilp32f--;rv32imafdc-ilp32d--;rv32imac_zba_zbb_zbc_zbs-ilp32--;rv32imafc_zba_zbb_zbc_zbs-ilp32f--;rv32imafdc_zba_zbb_zbc_zbs-ilp3
2d--;rv64imac-lp64--;rv64imafc-lp64f--;rv64imafdc-lp64d--;rv64imac_zba_zbb_zbc_zbs-lp64--;rv64imafc_zba_zbb_zbc_zbs-lp64f--;rv64imafdc_zba_zbb_zbc_zbs-lp64d-
-; --with-abi=lp64 --with-arch=rv64ima --with-tune=rocket --with-isa-spec=2.2
CFLAGS_FOR_TARGET=-Os   -mcmodel=medany CXXFLAGS_FOR_TARGET=-Os   -mcmodel=meda
ny

and then do command below

make

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (11 preceding siblings ...)
  2023-04-12  4:11 ` [Bug bootstrap/109460] " fanghuaqi at vip dot qq.com
@ 2023-04-12  4:13 ` fanghuaqi at vip dot qq.com
  2023-04-12  6:54 ` costas.argyris at gmail dot com
                   ` (22 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12  4:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #13 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hello, I didn't take a try with other mingw gcc version, locally I just revert
304c7d44a2212e6fd618587331cea2c266dc10bf commit, then it works for me.

Thanks
Huaqi

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (12 preceding siblings ...)
  2023-04-12  4:13 ` fanghuaqi at vip dot qq.com
@ 2023-04-12  6:54 ` costas.argyris at gmail dot com
  2023-04-12  7:09 ` fanghuaqi at vip dot qq.com
                   ` (21 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12  6:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #14 from Costas Argyris <costas.argyris at gmail dot com> ---
What is the version of the cross-compiler, cross-binutils and make that you are
using to build gcc for windows from linux?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (13 preceding siblings ...)
  2023-04-12  6:54 ` costas.argyris at gmail dot com
@ 2023-04-12  7:09 ` fanghuaqi at vip dot qq.com
  2023-04-12  8:21 ` costas.argyris at gmail dot com
                   ` (20 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12  7:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #15 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hello, this is the version I am using.

OS environment: 
root@1aae7bc8a1f6:/work# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.6 LTS"

packages installed


binutils-mingw-w64-i686/bionic,now 2.30-7ubuntu1+8ubuntu1 amd64 [installed]
g++-mingw-w64-i686/bionic,now 7.3.0-11ubuntu1+20.2build1 amd64 [installed]
gcc-mingw-w64-i686/bionic,now 7.3.0-11ubuntu1+20.2build1 amd64 [installed]
mingw-w64-i686-dev/bionic,now 5.0.3-1 all [installed,automatic]



root@1aae7bc8a1f6:/work# make -v
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@1aae7bc8a1f6:/work# i686-w64-mingw32-gcc -v
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/7.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr
--includedir='/usr/include' --mandir='/usr/share/man'
--infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var
--disable-silent-rules --libdir='/usr/lib/x86_64-linux-gnu'
--libexecdir='/usr/lib/x86_64-linux-gnu' --disable-maintainer-mode
--disable-dependency-tracking --prefix=/usr --enable-shared --enable-static
--disable-multilib --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes
--with-tune=generic --with-headers=/usr/i686-w64-mingw32/include
--enable-version-specific-runtime-libs --enable-fully-dynamic-string
--enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-lto
--with-plugin-ld --enable-threads=win32 --program-suffix=-win32
--program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32
--with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld
--enable-libatomic --enable-libstdcxx-filesystem-ts=yes
Thread model: win32
gcc version 7.3-win32 20180312 (GCC)
root@1aae7bc8a1f6:/work# i686-w64-mingw32-ld -v
GNU ld (GNU Binutils) 2.30


I have upload the docker image I am using to
https://hub.docker.com/r/nucleisoftware/gnutoolchain-ubuntu18.04

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (14 preceding siblings ...)
  2023-04-12  7:09 ` fanghuaqi at vip dot qq.com
@ 2023-04-12  8:21 ` costas.argyris at gmail dot com
  2023-04-12  9:32 ` fanghuaqi at vip dot qq.com
                   ` (19 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12  8:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #16 from Costas Argyris <costas.argyris at gmail dot com> ---
Created attachment 54838
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54838&action=edit
Improve make rule for sym-mingw32.o

Could you please apply this patch after you get the latest gcc sources and
before starting a clean build?

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (15 preceding siblings ...)
  2023-04-12  8:21 ` costas.argyris at gmail dot com
@ 2023-04-12  9:32 ` fanghuaqi at vip dot qq.com
  2023-04-12 10:00 ` costas.argyris at gmail dot com
                   ` (18 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12  9:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #17 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hi, I have apply this patch, but it failed like what I do before.


libcommon.a ../libcpp/libcpp.a  -liconv ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a 
-L/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/./isl/.libs
 -lisl
-L/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/./gmp/.libs
-L/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/./mpfr/src/.libs
-L/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/./mpc/src/.libs
-lmpc -lmpfr -lgmp   -lz -lzstd
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:(.text+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:(.text+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_pcinit'
/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/lto/Make-lang.in:95: recipe for target 'lto1.exe' failed
make[2]: *** [lto1.exe] Error 1
make[2]: *** Waiting for unfinished jobs....
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:(.text+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:(.text+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_pcinit'
/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/lto/Make-lang.in:101: recipe for target 'lto-dump.exe' failed
make[2]: *** [lto-dump.exe] Error 1
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:(.text+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:(.text+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_pcinit'
/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
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:(.text+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:(.text+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_pcinit'
/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/cp/Make-lang.in:135: recipe for target 'cc1plus.exe' failed
make[2]: *** [cc1plus.exe] Error 1
rm fsf-funding.pod cpp.pod gfdl.pod gpl.pod gcov-dump.pod gcc.pod gcov.pod
lto-dump.pod gcov-tool.pod
make[2]: Leaving directory
'/work/LocalBuilds/2023.04-eng2_20230412_014350/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-eng2_20230412_014350/build-gcc-newlib-stage1'
Makefile:631: recipe for target 'stamps/build-gcc-newlib-stage1' failed
make: *** [stamps/build-gcc-newlib-stage1] Error 2

I found the object file gcc/utf8-mingw32.o also provide symbols provided by
/usr/i686-w64-mingw32/lib/crt2.o

see as below

root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1#
i686-w64-mingw32-objdump -t /usr/i686-w64-mingw32/lib/crt2.o |grep
 -i startup
[ 11](sec  1)(fl 0x00)(ty  20)(scl   3) (nx 0) 0x00000170 ___tmainCRTStartup
[ 14](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x000004c0 _WinMainCRTStartup
[ 15](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x000004e0 _mainCRTStartup
[ 66](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000
___native_startup_lock
[ 67](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000
___native_startup_state
[ 75](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000
__imp__GetStartupInfoA@4
root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1#
i686-w64-mingw32-objdump -t gcc/utf8-mingw32.o|grep -i startup
[ 11](sec  1)(fl 0x00)(ty  20)(scl   3) (nx 0) 0x00000170 ___tmainCRTStartup
[ 14](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x000004c0 _WinMainCRTStartup
[ 15](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x000004e0 _mainCRTStartup
[104](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .text.startup
[1072](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000050 .text.startup
[1095](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000004
___native_startup_lock
[1126](sec 40)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000018
__imp__GetStartupInfoA@4
[1129](sec  0)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000004
___native_startup_state
[1150](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00001700 _GetStartupInfoA@4

So this cause the final link fail.

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (16 preceding siblings ...)
  2023-04-12  9:32 ` fanghuaqi at vip dot qq.com
@ 2023-04-12 10:00 ` costas.argyris at gmail dot com
  2023-04-12 10:01 ` ebotcazou at gcc dot gnu.org
                   ` (17 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 10:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #18 from Costas Argyris <costas.argyris at gmail dot com> ---
For some reason you are compiling gcc/utf8-mingw32.o as an executable, which
shouldn't be happening.

This is the rule for it in gcc\gcc\config\i386\x-mingw32-utf8

utf8-mingw32.o : utf8rc-mingw32.o sym-mingw32.o
        $(COMPILER) -r utf8rc-mingw32.o sym-mingw32.o -o $@

This simply takes the two .o files and combines them into one.    No
executables or main functions are involved here whatsoever.

Did you perhaps change anything in this rule while trying to fix it?   
Otherwise I don't know why your utf8-mingw32.o has a main function and mine
doesn't.

The linker comes to mind - I noticed your gcc is configured to explicitly use:

--with-ld=/usr/bin/i686-w64-mingw32-ld

but I don't know why that would cause such behavior.

You are also getting a bunch of errors like this:

/usr/bin/i686-w64-mingw32-ld: Dwarf Error: Could not find abbrev number 101.

which again are coming from the linker.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (17 preceding siblings ...)
  2023-04-12 10:00 ` costas.argyris at gmail dot com
@ 2023-04-12 10:01 ` ebotcazou at gcc dot gnu.org
  2023-04-12 10:04 ` ebotcazou at gcc dot gnu.org
                   ` (16 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-12 10:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #19 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It's the -r option passed to the compiler, it was not really supported in older
compiler (and certainly not documented).

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (18 preceding siblings ...)
  2023-04-12 10:01 ` ebotcazou at gcc dot gnu.org
@ 2023-04-12 10:04 ` ebotcazou at gcc dot gnu.org
  2023-04-12 10:40 ` fanghuaqi at vip dot qq.com
                   ` (15 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-12 10:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #20 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Can you add -nostdlib alongside -r in the command?

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (19 preceding siblings ...)
  2023-04-12 10:04 ` ebotcazou at gcc dot gnu.org
@ 2023-04-12 10:40 ` fanghuaqi at vip dot qq.com
  2023-04-12 10:41 ` fanghuaqi at vip dot qq.com
                   ` (14 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12 10:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #21 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hi, I tried to change it like this


$ git diff
diff --git a/gcc/config/i386/x-mingw32-utf8 b/gcc/config/i386/x-mingw32-utf8
index 2783dd259a6..e4a6c7f3d3a 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 $<

 # Combine the two object files into one which has both the
 # compiled utf8 resource and the HOST_EXTRA_OBJS_SYMBOL symbol.
@@ -45,7 +45,7 @@ sym-mingw32.o : $(srcdir)/config/i386/sym-mingw32.cc
 # get linked into the compiler proper eventually.
 # Therefore we need to request the symbol at compiler link time.
 utf8-mingw32.o : utf8rc-mingw32.o sym-mingw32.o
-       $(COMPILER) -r utf8rc-mingw32.o sym-mingw32.o -o $@
+       $(COMPILER) -r -nostdlib utf8rc-mingw32.o sym-mingw32.o -o $@


It seems to works for me now.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (20 preceding siblings ...)
  2023-04-12 10:40 ` fanghuaqi at vip dot qq.com
@ 2023-04-12 10:41 ` fanghuaqi at vip dot qq.com
  2023-04-12 10:47 ` ebotcazou at gcc dot gnu.org
                   ` (13 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12 10:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #22 from Huaqi <fanghuaqi at vip dot qq.com> ---
(In reply to Eric Botcazou from comment #20)
> Can you add -nostdlib alongside -r in the command?

Hi, I have tried this, it works.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (21 preceding siblings ...)
  2023-04-12 10:41 ` fanghuaqi at vip dot qq.com
@ 2023-04-12 10:47 ` ebotcazou at gcc dot gnu.org
  2023-04-12 11:17 ` costas.argyris at gmail dot com
                   ` (12 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-12 10:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #23 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Hi, I have tried this, it works.

Great, thanks.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (22 preceding siblings ...)
  2023-04-12 10:47 ` ebotcazou at gcc dot gnu.org
@ 2023-04-12 11:17 ` costas.argyris at gmail dot com
  2023-04-12 11:33 ` fanghuaqi at vip dot qq.com
                   ` (11 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 11:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #24 from Costas Argyris <costas.argyris at gmail dot com> ---
So this is because of the old (7.3) gcc version not supporting -r.

Indeed, in the 7.3 doc

https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Link-Options.html#Link-Options

there is no '-r' option while there is in the current doc:

https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options

However, I don't understand how the proposed solution works:

+       $(COMPILER) -r -nostdlib utf8rc-mingw32.o sym-mingw32.o -o $@

since we are still using the -r flag which we just found out doesn't work in
7.3

The fact that -nostdlib somehow makes it work seems like magic to me, and I
can't propose such a patch for that reason.    I also don't know if this fixes
this case of using an old compiler but breaks others.

If Eric feels confident about this and can test that it doesn't break currently
working builds, please propose a patch.

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (23 preceding siblings ...)
  2023-04-12 11:17 ` costas.argyris at gmail dot com
@ 2023-04-12 11:33 ` fanghuaqi at vip dot qq.com
  2023-04-12 11:37 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-12 11:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #25 from Huaqi <fanghuaqi at vip dot qq.com> ---
Hi here is what I tested in Ubuntu 18.04

root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/gcc#
i686-w64-mingw32-gcc -nostdlib -r utf8rc-mingw32.o sym-mingw32.o -o
utf8-mingw32.o
root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/gcc#
i686-w64-mingw32-gcc -v
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/7.3-win32/lto-wrapper
Target: i686-w64-mingw32
Configured with: ../../src/configure --build=x86_64-linux-gnu --prefix=/usr
--includedir='/usr/include' --mandir='/usr/share/man'
--infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var
--disable-silent-rules --libdir='/usr/lib/x86_64-linux-gnu'
--libexecdir='/usr/lib/x86_64-linux-gnu' --disable-maintainer-mode
--disable-dependency-tracking --prefix=/usr --enable-shared --enable-static
--disable-multilib --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes
--with-tune=generic --with-headers=/usr/i686-w64-mingw32/include
--enable-version-specific-runtime-libs --enable-fully-dynamic-string
--enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-lto
--with-plugin-ld --enable-threads=win32 --program-suffix=-win32
--program-prefix=i686-w64-mingw32- --target=i686-w64-mingw32
--with-as=/usr/bin/i686-w64-mingw32-as --with-ld=/usr/bin/i686-w64-mingw32-ld
--enable-libatomic --enable-libstdcxx-filesystem-ts=yes
Thread model: win32
gcc version 7.3-win32 20180312 (GCC)
root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/gcc#
i686-w64-mingw32-objdump -t utf8-mingw32.o|grep -i startup
root@1aae7bc8a1f6:/work/LocalBuilds/2023.04-eng2_20230412_014350/build-gcc-newlib-stage1/gcc#

gcc 7.2 with -r works for me.

Thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (24 preceding siblings ...)
  2023-04-12 11:33 ` fanghuaqi at vip dot qq.com
@ 2023-04-12 11:37 ` jakub at gcc dot gnu.org
  2023-04-12 11:40 ` ebotcazou at gcc dot gnu.org
                   ` (9 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-04-12 11:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As I said on IRC, even GCC 4.8 passes -r through to linker invocation, but only
since
r9-2994 gcc -r acts effectively the same as -r -nostdlib, before that one had
to use both options to avoid linking crt files, standard libraries and the like
even during the relocatable link.
An open question remains if mingw/cygwin supports other host compilers for
stage1, like clang, icc, msvc and the like, and whether -r or -r -nostdlib
works for those.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (25 preceding siblings ...)
  2023-04-12 11:37 ` jakub at gcc dot gnu.org
@ 2023-04-12 11:40 ` ebotcazou at gcc dot gnu.org
  2023-04-12 11:58 ` costas.argyris at gmail dot com
                   ` (8 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-04-12 11:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #27 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> As I said on IRC, even GCC 4.8 passes -r through to linker invocation, but
> only since
> r9-2994 gcc -r acts effectively the same as -r -nostdlib, before that one
> had to use both options to avoid linking crt files, standard libraries and
> the like even during the relocatable link.
> An open question remains if mingw/cygwin supports other host compilers for
> stage1, like clang, icc, msvc and the like, and whether -r or -r -nostdlib
> works for those.

Yes, if we could avoid partial linking altogether, that would be best.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (26 preceding siblings ...)
  2023-04-12 11:40 ` ebotcazou at gcc dot gnu.org
@ 2023-04-12 11:58 ` costas.argyris at gmail dot com
  2023-04-12 13:16 ` costas.argyris at gmail dot com
                   ` (7 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #28 from Costas Argyris <costas.argyris at gmail dot com> ---
I am not aware of any cases of building windows-hosted gcc with msvc or clang.

If the combination -r -nostdlib fixes this case without breaking all the others
that don't need -nostdlib (which sounds like it is the case), then I suggest we
move forwards with this solution.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (27 preceding siblings ...)
  2023-04-12 11:58 ` costas.argyris at gmail dot com
@ 2023-04-12 13:16 ` costas.argyris at gmail dot com
  2023-04-12 14:41 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 13:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Costas Argyris <costas.argyris at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54838|0                           |1
        is obsolete|                            |

--- Comment #29 from Costas Argyris <costas.argyris at gmail dot com> ---
Created attachment 54841
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54841&action=edit
New patch including -nostdlib next to -r

Tested this in cross-compile from Debian (building the cross-compiler itself as
well) and native-compile from Windows in MSYS2.

Didn't try building with earlier gcc version myself because OP reported that
the fix worked for them using gcc 7.3

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (28 preceding siblings ...)
  2023-04-12 13:16 ` costas.argyris at gmail dot com
@ 2023-04-12 14:41 ` burnus at gcc dot gnu.org
  2023-04-12 14:45 ` costas.argyris at gmail dot com
                   ` (5 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: burnus at gcc dot gnu.org @ 2023-04-12 14:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #30 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I see commit r13-7153-g3beeebd6934654f3453209730b98c7a1fd0305b6
"mingw: Support building with older gcc versions"

And I see in the associated email to that commit:
> This is proposed to fix PR109460 where an older version of
> gcc (7.3) was used to build for windows (mingw) host.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (29 preceding siblings ...)
  2023-04-12 14:41 ` burnus at gcc dot gnu.org
@ 2023-04-12 14:45 ` costas.argyris at gmail dot com
  2023-04-12 15:09 ` segher at gcc dot gnu.org
                   ` (4 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 14:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #31 from Costas Argyris <costas.argyris at gmail dot com> ---
(In reply to Tobias Burnus from comment #30)
> I see commit r13-7153-g3beeebd6934654f3453209730b98c7a1fd0305b6
> "mingw: Support building with older gcc versions"
> 
> And I see in the associated email to that commit:
> > This is proposed to fix PR109460 where an older version of
> > gcc (7.3) was used to build for windows (mingw) host.

If you are wondering why this PR wasn't automatically updated by the commit, I
am wondering the same thing.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (30 preceding siblings ...)
  2023-04-12 14:45 ` costas.argyris at gmail dot com
@ 2023-04-12 15:09 ` segher at gcc dot gnu.org
  2023-04-12 15:17 ` segher at gcc dot gnu.org
                   ` (3 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: segher at gcc dot gnu.org @ 2023-04-12 15:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #32 from Segher Boessenkool <segher at gcc dot gnu.org> ---
> If you are wondering why this PR wasn't automatically updated by the commit,
> I am wondering the same thing.

You need to note "PR109460" or preferably "PR bootstrap/109460" in the
changelog.

You can paste the commit message here yourself, but let me do that for you :-)


author  Costas Argyris <costas.argyris@gmail.com>       
Wed, 12 Apr 2023 07:48:18 +0000 (08:48 +0100)
committer       Jonathan Yong <10walls@gmail.com>       
Wed, 12 Apr 2023 14:35:33 +0000 (14:35 +0000)
commit  3beeebd6934654f3453209730b98c7a1fd0305b6
tree    ee01b276eba9f13284d1880794371e7ba6cca8c1        tree
parent  56529056cb42baa382c40de7d239d02dbf72c94f        commit | diff
mingw: Support building with older gcc versions

The $@ argument to the compiler is causing
only a warning in some gcc versions but an
error in others. In any case, $@ was never
necessary so remove it completely, just like
the rules in x-mingw32 where the object file
gets named after the source file.

This fixes both warnings and errors about
sym-mingw32.o appearing in the command line
unnecessarily.

The -nostdlib flag is required along with -r
for older gcc versions that don't apply it
automatically with -r, resulting in main
functions erroneously entering a partial link.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
gcc/ChangeLog:

* config/i386/x-mingw32-utf8: Remove extrataneous $@

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (31 preceding siblings ...)
  2023-04-12 15:09 ` segher at gcc dot gnu.org
@ 2023-04-12 15:17 ` segher at gcc dot gnu.org
  2023-04-12 15:30 ` costas.argyris at gmail dot com
                   ` (2 subsequent siblings)
  35 siblings, 0 replies; 37+ messages in thread
From: segher at gcc dot gnu.org @ 2023-04-12 15:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #33 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Fixed (says Costas :-) )

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (32 preceding siblings ...)
  2023-04-12 15:17 ` segher at gcc dot gnu.org
@ 2023-04-12 15:30 ` costas.argyris at gmail dot com
  2023-04-13  3:09 ` fanghuaqi at vip dot qq.com
  2023-04-13  9:12 ` costas.argyris at gmail dot com
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-12 15:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #34 from Costas Argyris <costas.argyris at gmail dot com> ---
Hi Huaqi,

Patch has been pushed to master, you should now be able to get the latest gcc
sources and build without having to apply it manually.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (33 preceding siblings ...)
  2023-04-12 15:30 ` costas.argyris at gmail dot com
@ 2023-04-13  3:09 ` fanghuaqi at vip dot qq.com
  2023-04-13  9:12 ` costas.argyris at gmail dot com
  35 siblings, 0 replies; 37+ messages in thread
From: fanghuaqi at vip dot qq.com @ 2023-04-13  3:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #35 from Huaqi <fanghuaqi at vip dot qq.com> ---
OK, thanks

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [Bug bootstrap/109460] Build gcc for win32 failed in gcc13 master branch
  2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
                   ` (34 preceding siblings ...)
  2023-04-13  3:09 ` fanghuaqi at vip dot qq.com
@ 2023-04-13  9:12 ` costas.argyris at gmail dot com
  35 siblings, 0 replies; 37+ messages in thread
From: costas.argyris at gmail dot com @ 2023-04-13  9:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109460

--- Comment #36 from Costas Argyris <costas.argyris at gmail dot com> ---
Regarding usage of the -r flag:

Building windows(mingw)-hosted gcc with clang at this point seems highly
experimental at best, and impossible with msvc.

With clang (lld linker), -r is supported with ELF, but not with COFF (windows).

This sounds like incomplete support on the lld side though, and therefore not
something that should prevent us from using -r (I think lld should support it
for COFF as it does for ELF, because it is meant to be a drop-in replacement
after all).

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2023-04-13  9:12 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-10  3:10 [Bug c/109460] New: Build gcc for win32 failed in gcc13 master branch fanghuaqi at vip dot qq.com
2023-04-10 19:54 ` [Bug c/109460] " costas.argyris at gmail dot com
2023-04-10 20:41 ` ebotcazou at gcc dot gnu.org
2023-04-10 21:41 ` costas.argyris at gmail dot com
2023-04-10 22:07 ` ebotcazou at gcc dot gnu.org
2023-04-10 22:43 ` costas.argyris at gmail dot com
2023-04-11  1:45 ` fanghuaqi at vip dot qq.com
2023-04-11  8:54 ` costas.argyris at gmail dot com
2023-04-11  9:01 ` costas.argyris at gmail dot com
2023-04-11  9:15 ` fanghuaqi at vip dot qq.com
2023-04-11 10:12 ` costas.argyris at gmail dot com
2023-04-11 12:03 ` costas.argyris at gmail dot com
2023-04-12  4:11 ` [Bug bootstrap/109460] " fanghuaqi at vip dot qq.com
2023-04-12  4:13 ` fanghuaqi at vip dot qq.com
2023-04-12  6:54 ` costas.argyris at gmail dot com
2023-04-12  7:09 ` fanghuaqi at vip dot qq.com
2023-04-12  8:21 ` costas.argyris at gmail dot com
2023-04-12  9:32 ` fanghuaqi at vip dot qq.com
2023-04-12 10:00 ` costas.argyris at gmail dot com
2023-04-12 10:01 ` ebotcazou at gcc dot gnu.org
2023-04-12 10:04 ` ebotcazou at gcc dot gnu.org
2023-04-12 10:40 ` fanghuaqi at vip dot qq.com
2023-04-12 10:41 ` fanghuaqi at vip dot qq.com
2023-04-12 10:47 ` ebotcazou at gcc dot gnu.org
2023-04-12 11:17 ` costas.argyris at gmail dot com
2023-04-12 11:33 ` fanghuaqi at vip dot qq.com
2023-04-12 11:37 ` jakub at gcc dot gnu.org
2023-04-12 11:40 ` ebotcazou at gcc dot gnu.org
2023-04-12 11:58 ` costas.argyris at gmail dot com
2023-04-12 13:16 ` costas.argyris at gmail dot com
2023-04-12 14:41 ` burnus at gcc dot gnu.org
2023-04-12 14:45 ` costas.argyris at gmail dot com
2023-04-12 15:09 ` segher at gcc dot gnu.org
2023-04-12 15:17 ` segher at gcc dot gnu.org
2023-04-12 15:30 ` costas.argyris at gmail dot com
2023-04-13  3:09 ` fanghuaqi at vip dot qq.com
2023-04-13  9:12 ` costas.argyris at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).