-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/ld: Failure to link cgo program on darwin / Mac OS X 10.6 #8791
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
Labels
Milestone
Comments
Comment 1 by jobi@litl.com: I recompiled go to avoid passing -no_pie, but it then fails in a new way: $ go build -ldflags -linkmode=external ld: in /var/folders/iw/iwdRbYdtH1etu4cSq1ucFk+++TI/-Tmp-//go-link-u19OHO/go.o, in section __TEXT,__text reloc 0: local relocation for address 0x000020CB in section __text does not target section __rodata collect2: ld returned 1 exit status /Users/jobi/go/pkg/tool/darwin_amd64/6l: running gcc failed: unsuccessful exit status 0x100 |
From some web searches it looks like the -no_pie option was added to the Darwin linker in Max OS X 10.7. That explains why you are seeing that error when doing an external link. Since your program uses cgo, I don't know why you are getting the external linker by default. The error when using the internal linker is issue #8211. Omitting the -no_pie option was a good idea, but it looks like the 10.6 linker really insists on seeing PIE, and we don't generate it. Labels changed: added repo-main, release-none, os-macosx. |
Comment 3 by jobi@litl.com: If I compile the program on OS X 10.7, do you expect it to run on 10.6? |
Per #9511, we will not be making any further bug fixes specific to 10.6. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by jobi@litl.com:
The text was updated successfully, but these errors were encountered: