Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve Mac OS (darwin) support. #1024

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

Merged
merged 1 commit into from
May 3, 2021
Merged

Conversation

nevkontakte
Copy link
Member

Changes in this commit ensure that we can at least build supported
standard library packages with GOOS=darwin. In theory, GOOS shouldn't
even matter, since we always target the same platform (nodejs or
browser), but for historical reasons, it does matter and we need to take
extra steps to make it work.

See #693 for more details.

Changes tested with GOOS=darwin gopherjs build --minify -v $(go list std | grep -v -x -f .std_test_pkg_exclusions | grep -v -E "(vendor|internal)" | sort). Unfortunately, I don't have access to an Mac OS machine to run actual test… Ideally we should set up CI to do that.

Fixes #1023.

Changes in this commit ensure that we can at least build supported
standard library packages with GOOS=darwin. In theory, GOOS shouldn't
even matter, since we always target the same platform (nodejs or
browser), but for historical reasons, it does matter and we need to take
extra steps to make it work.

See gopherjs#693 for more details.
@nevkontakte nevkontakte requested a review from flimzy May 3, 2021 14:47
@nevkontakte nevkontakte merged commit 3d75652 into gopherjs:master May 3, 2021
@wbrown
Copy link

wbrown commented May 3, 2021

Still having trouble with this. Pulled down master tree, performed go install, did gopherjs build on my OS X machine.

../../../../../../../../src/syscall/syscall_darwin.go:23:25: undeclared name: libc___getdirentries64_trampoline
../../../../../../../../src/syscall/syscall_darwin.go:25:25: undeclared name: libc_getattrlist_trampoline

Cannot find any references to these calls in my tree, so it may be pulling down an older tag? How do I test this?

@wbrown
Copy link

wbrown commented May 3, 2021

Figured it out after reading through the build process. I had to regenerate the VFS used to hold the syscall header files, using vfsgendev and go generate.

Should we be regenerating these as part of this PR?

@nevkontakte
Copy link
Member Author

Oops, my bad. fb464eb has the updated VFS. Thanks for letting me know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

syscall build error on GOOS=darwin
3 participants