Skip to content
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

runtime/cgo: tip fails to build on darwin/arm64 #11884

Closed
ianlancetaylor opened this issue Jul 27, 2015 · 4 comments
Closed

runtime/cgo: tip fails to build on darwin/arm64 #11884

ianlancetaylor opened this issue Jul 27, 2015 · 4 comments
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

After https://golang.org/cl/12574, the darwin arm64 builds have started failing with

runtime/cgo

runtime/cgo

runtime/cgo/gcc_arm64.S:16:1: error: expected identifier or '('

I don't understand why that CL caused this problem.

The line in question is:

.align 2

which seems harmless enough.

Needs to be debugged by somebody with a darwin arm64 system.

CC @crawshaw @rsc

@ianlancetaylor ianlancetaylor added this to the Go1.5 milestone Jul 27, 2015
@crawshaw crawshaw self-assigned this Jul 27, 2015
@crawshaw
Copy link
Member

I thought I had patched and tested that CL, but it looks like I patched one client and tested another. I'll take a look.

@crawshaw
Copy link
Member

The change is that the CFLAGS: -x objective-c in tmpdir_darwin.go means that gcc_arm64.S is now compiled with that flag:

clangwrap.sh -I . -fPIC -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/runtime/cgo/_obj/ -g -O2 -Wall -Werror -x objective-c -o $WORK/runtime/cgo/_obj/gcc_arm64.o -c ./gcc_arm64.S

...which doesn't work.

@crawshaw
Copy link
Member

Fixing that problem, I recall why this code ended up in package os. We need to modify memory owned by package syscall. It appears syscall cannot call cgo (an import cycle is reported), and it appears that the cgo neither imports syscall today, nor can it handle any interesting cgo definitions or uses in its go code.

Still looking for a way out.

@gopherbot
Copy link

CL https://golang.org/cl/12721 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 5, 2016
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

3 participants