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

Cannot build on Illumos #53

Open
francescocarzaniga opened this issue Apr 9, 2021 · 3 comments
Open

Cannot build on Illumos #53

francescocarzaniga opened this issue Apr 9, 2021 · 3 comments

Comments

@francescocarzaniga
Copy link

Trying to build on Illumos results in the following error:

root@build_env:/tmp# go get -u github.com/gofrs/flock
go: downloading golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57
# github.com/gofrs/flock
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:28:22: undefined: syscall.LOCK_EX
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:39:22: undefined: syscall.LOCK_SH
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:57:12: undefined: syscall.Flock
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:67:12: undefined: syscall.Flock
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:97:12: undefined: syscall.Flock
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:97:42: undefined: syscall.LOCK_UN
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:119:21: undefined: syscall.LOCK_EX
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:131:21: undefined: syscall.LOCK_SH
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:151:9: undefined: syscall.Flock
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:151:44: undefined: syscall.LOCK_NB
/root/go/pkg/mod/github.com/gofrs/flock@v0.8.0/flock_unix.go:151:44: too many errors

This seems to present a solution.

@theckman
Copy link
Member

@francescocarzaniga I'm personally not very familiar with Illumos, so I presume it doesn't have the same system call capabilities as other systems so the symbols are missing when attempting to build.

Considering that you have a Illumos system, would you have the spare cycles to contribute support for that OS? Alternatively, do you have any personal recommendations for where I could get access to one without having to get some local VM running?

@francescocarzaniga
Copy link
Author

@theckman I have a personal server with OmniOS where I could spin up a zone for this, it's not particularly powerful but it should do. AFAIK there are no (affordable, Joyent is quite expensive) cloud solutions.

@marcheschi
Copy link

Hi
I solved the compilation error by using the environment variable:
export GOOS=illumos

so flock is compiling fine.
I hope it helps someone.
Paolo

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

No branches or pull requests

3 participants