-
Notifications
You must be signed in to change notification settings - Fork 570
Undeclared names on Mac M1 #1027
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
Comments
Could you please share your |
GO111MODULE="on" |
Actually, #1024 might have fixed this already, but we forgot to tag a new release with it. Could you try GopherJS from master and see if you still have a problem? If not, I'll tag a new release tomorrow. |
I've installed from master, and the error stills appearing. |
Can you provide a minimal reproduction example and the exact commands you've used? I've tried the following and it worked just fine:
Unfortunately, I don't have access to an M1 mac, so this is the closes I can get to reproducing an error. |
Sorry for answering a bit late. Just tried to build the code you provided and the same three lines of output appear.
If there is any way I can help you find the problem I'll be pleased. |
Ok, thanks for confirming this is still an issue. It is strange that it builds just fine for me despite setting GOOS/GOARCH to match yours. Perhaps, there's a deeper bug lurking about here... I'll investigate more sometime this week. |
So long as we rely on OS-specific syscalls, we must build the package with OS-appropriate GOOS/GOARCH (see also gopherjs#693). Using runtime.GOOS here is not ideal, since it ignores environment variables, making "cross-compiling" impossible. This is not a big deal in most cases, but makes reproducing errors like in gopherjs#1027 more difficult.
When I try to compile using the latest version of gopherjs (1.16.1+go1.16.3) this is the output errors:
gopherjs build
../../../../../src/syscall/syscall_darwin.go:11:25: undeclared name: libc_stat64_trampoline
../../../../../src/syscall/syscall_darwin.go:13:25: undeclared name: libc_fstat64_trampoline
../../../../../src/syscall/syscall_darwin.go:15:25: undeclared name: libc_lstat64_trampoline
I've compiled the same code on linux and compiles fine. Maybe its something related to Mac M1 arm64.
Thanks in advance
The text was updated successfully, but these errors were encountered: