Skip to content

gccgo: running gcc failed: Can't build #15038

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tsirolnik opened this issue Mar 31, 2016 · 2 comments
Closed

gccgo: running gcc failed: Can't build #15038

tsirolnik opened this issue Mar 31, 2016 · 2 comments

Comments

@tsirolnik
Copy link

  1. What version of Go are you using (go version)?
    go version1.5.1 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    amd64 linux (debian stretch) running on vmware
  3. What did you do?
    I've just tried to build my app using go build .
  4. What did you expect to see?
    Compiled program
  5. What did you see instead?
/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o: unrecognized relocation (0x2a) in section '.init'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

I've tried rebooting, upgrading and etc but nothing works

@bradfitz bradfitz changed the title running gcc failed: Can't build gccgo: running gcc failed: Can't build Mar 31, 2016
@ianlancetaylor
Copy link
Contributor

This is not a gccgo problem. This is a variant of #13114 . Your system linker (/usr/bin/ld) is not up to date with your compiler/assembler. It's not a Go problem at all.

@sjackman
Copy link

sjackman commented Apr 8, 2016

Upgrading binutils (for /usr/bin/ld) did not help. Setting CGO_ENABLED=0 did help. See Linuxbrew/legacy-linuxbrew#1057

@golang golang locked and limited conversation to collaborators Apr 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants