Description of problem: mingw32-gcc's ld segfaults when compiling Google Go. Version-Release number of selected component (if applicable): mingw32-gcc-4.4.2-2.fc13.x86_64 How reproducible: Always Steps to Reproduce: 1. Read http://golang.org/doc/install.html 2. hg clone -r release https://go.googlecode.com/hg/ go (might need tip) 3. cd go 4. hg patch --no-commit go_make_mingw.diff 5. cd src 6. AR=i686-pc-mingw32-ar GOHOSTARCH=386 CC=i686-pc-mingw32-gcc GOOS=windows GOARCH=386 ./make.bash Actual results: quietgcc -o 8g -L"/home/alberts/go"/lib ../8l/enam.o list.o galign.o gobj.o ggen.o gsubr.o cgen.o cgen64.o cplx.o peep.o reg.o ../gc/gc.a -lbio -l9 -lm i686-pc-mingw32-gcc: Internal error: Segmentation fault (program ld) Please submit a full bug report. See <http://bugzilla.redhat.com/bugzilla> for instructions. Expected results: 8g command should compile Additional info:
Created attachment 454029 [details] Small patch for Google Go so that build will use AR from environment
*** Bug 643800 has been marked as a duplicate of this bug. ***
I'm unclear on the bug report. Is gcc or ld or ar segfaulting, and what does the AR patch have to do with it?
The patch fixes the Go makefiles to use MinGW ar when one sets AR= environment variable. This allows the build to proceed until ld segfaults while linking a Go binary called "8g".
I guess that makes this a binutils bug. I have: mingw32-binutils-2.19.51.0.14-1.fc12.x86_64
The command that runs is: /usr/lib64/gcc/i686-pc-mingw32/4.4.2/../../../../i686-pc-mingw32/bin/ld --sysroot=/usr/i686-pc-mingw32/sys-root -Bdynamic -o 8l /usr/i686-pc-mingw32/sys-root/mingw/lib/crt2.o /usr/lib64/gcc/i686-pc-mingw32/4.4.2/crtbegin.o -L/home/alberts/go/lib -L/usr/lib64/gcc/i686-pc-mingw32/4.4.2 -L/usr/lib64/gcc/i686-pc-mingw32/4.4.2/../../../../i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib asm.o data.o dwarf.o elf.o enam.o go.o lib.o list.o macho.o obj.o optab.o pass.o pe.o prof.o span.o symtab.o -lbio -l9 -lm -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_eh -lgcc -lmoldname -lmingwex -lmsvcrt /usr/lib64/gcc/i686-pc-mingw32/4.4.2/crtend.o Installed the debuginfo: Program received signal SIGSEGV, Segmentation fault. 0x0000000000446591 in _bfd_coff_generic_relocate_section (output_bfd=<value optimized out>, info=<value optimized out>, input_bfd=0x7086d0, input_section=0x7523f0, contents=<value optimized out>, relocs=<value optimized out>, syms=<value optimized out>, sections=<value optimized out>) at ../../bfd/cofflink.c:2970 2970 val = h2->root.u.def.value Backtrace: #0 0x0000000000446591 in _bfd_coff_generic_relocate_section (output_bfd=<value optimized out>, info=<value optimized out>, input_bfd=0x7086d0, input_section=0x7523f0, contents=<value optimized out>, relocs=<value optimized out>, syms=<value optimized out>, sections=<value optimized out>) at ../../bfd/cofflink.c:2970 #1 0x00000000004486fc in _bfd_coff_link_input_bfd (finfo=<value optimized out>, input_bfd=<value optimized out>) at ../../bfd/cofflink.c:2345 #2 0x000000000044a977 in _bfd_coff_final_link (abfd=<value optimized out>, info=0x6e1a80) at ../../bfd/cofflink.c:905 #3 0x000000000041614c in ldwrite () at ../../ld/ldwrite.c:567 #4 0x00000000004151ec in main (argc=47, argv=0x7fffffffe088) at ../../ld/ldmain.c:495
Upgrading to: mingw32-binutils-2.20.1-1.fc14.x86_64 mingw32-cpp-4.5.0-1.fc14.x86_64 mingw32-gcc-4.5.0-1.fc14.x86_64 fixed the problem.
This message is a reminder that Fedora 13 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '13'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 13's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 13 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.