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

fix(os): undefined syscall.Getrusage on wasm #123

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azamaulanaaa
Copy link

error while compiling to wasm

/home/azama/go/pkg/mod/github.com/!shopify/[email protected]/unix.go:11:6: undefined: syscall.Getrusage
/home/azama/go/pkg/mod/github.com/!shopify/[email protected]/unix.go:11:24: undefined: syscall.RUSAGE_SELF

@ghost ghost added the cla-needed label Mar 12, 2022
@azamaulanaaa
Copy link
Author

renaming file os_windows.go to os_non_unix.go has weird inconsistent error i do not know why.

Copy link
Contributor

@etiennemartin etiennemartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me.

@fbogsany
Copy link
Member

renaming file os_windows.go to os_non_unix.go has weird inconsistent error i do not know why.

Has this been resolved or is it still a problem?

@azamaulanaaa
Copy link
Author

i found the issue. i do not know if i made some mistakes or not. if i reference the repo from github, it will neglect build flags thus produce errors, but if i reference it from local dir that is fresh clone, it will work just fine

below my go.mod

replace github.com/Shopify/go-lua => github.com/azamaulanaaa/go-lua v0.0.0-20220120202609-9ab779377807

// replace github.com/Shopify/go-lua => ../go-lua

error message

# github.com/Shopify/go-lua
/home/azama/go/pkg/mod/github.com/azamaulanaaa/[email protected]/unix.go:11:6: undefined: syscall.Getrusage
/home/azama/go/pkg/mod/github.com/azamaulanaaa/[email protected]/unix.go:11:24: undefined: syscall.RUSAGE_SELF

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.

3 participants