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
cmd/link: undefined symbols for architecture arm64 _darwin_arm_init_mach_exception_handler #62432
Comments
is your xcode / clang version up to date? |
Yes Anyway, i just checked i have created a new user and then i am able to build it. So it seems a user-specific issue on macros. I believe i will use the new user then.
|
what if you clear the build cache? |
tried already I will continue to debug to see if i can fix the issue |
somehow going was Conflicting with the Xcode command line tools so i tried deleting the |
Today i upgraded the MAC OS to Sonoma thus it upgraded XCode also. Now i started getting the same error however if I log in as a different user then the build works. mkdir -p $WORK/b001/exe/
cd .
/usr/local/go/pkg/tool/darwin_arm64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -buildmode=pie -buildid=IrOa0mMCbcmFG6SCKVtB/7ES0leaDxe0EO7LAN4Yx/6rZQn20_SSYLy8rIB6jF/IrOa0mMCbcmFG6SCKVtB -extld=clang /Users/test/Library/Caches/go-build/90/90f7e2ac98c79ec15a023732fb39c028d6b32f47795ac3e1c15eb63cd89d151e-d
# github.com/aa
/usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
ld: Undefined symbols:
_darwin_arm_init_mach_exception_handler, referenced from:
_x_cgo_init in 000005.o
_darwin_arm_init_thread_exception_port, referenced from:
_threadentry in 000005.o
_x_cgo_init in 000005.o
clang: error: linker command failed with exit |
Solved it again. Steps:
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
You can test this repo: https://github.com/khanakia/cobratest/tree/main#readme
or create a new file main.go like below
What did you expect to see?
It should compile
go build .
What did you see instead?
The text was updated successfully, but these errors were encountered: