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

fsnotify v1.5.0 and GOOS=freebsd does not build #389

Closed
xyproto opened this issue Aug 23, 2021 · 10 comments · Fixed by #419
Closed

fsnotify v1.5.0 and GOOS=freebsd does not build #389

xyproto opened this issue Aug 23, 2021 · 10 comments · Fixed by #419

Comments

@xyproto
Copy link

xyproto commented Aug 23, 2021

GOOS=freebsd go build works with Go 1.17 and fsnotify v1.4.9, but stops working with fsnotify v1.5.0.

The error message is:

vendor/github.com/fsnotify/fsnotify/kqueue.go:193:43: undefined: unix.O_SYMLINK
@nathany nathany added the bug label Aug 24, 2021
@nathany
Copy link
Contributor

nathany commented Aug 24, 2021

Thanks for the report.

Confirmed that changes in 1.5.0 via #289 began using unix.O_SYMLINK which is defined for Darwin (macOS) zerrors_darwin_amd64.go but not for FreeBSD or other BSDs.

/cc @Code0x58

@nathany
Copy link
Contributor

nathany commented Aug 24, 2021

Of note, we don't have FreeBSD as a GitHub runner, because they only supports Linux, Windows, and macOS. They do support custom runners as one possibility. Or we may be able to use the the same trick that #371 is using for Solaris?
https://github.com/papertigers/illumos-vm

I don't currently have a FreeBSD environment set up -- I was using Vagrant before, but I haven't worked with it for a while.
https://github.com/nathany/vagrant-gopher

@nshalman
Copy link
Contributor

nshalman commented Aug 24, 2021

Of note, we don't have FreeBSD as a GitHub runner, because they only supports Linux, Windows, and macOS. They do support custom runners as one possibility. Or we may be able to use the the same trick that #371 is using for Solaris?

See https://github.com/vmactions/freebsd-vm / https://github.com/marketplace/actions/freebsd-vm

@nathany
Copy link
Contributor

nathany commented Aug 24, 2021

v1.5.1 reverts the changes from 1.5.0, but lets leave this open to review.

@nathany
Copy link
Contributor

nathany commented Jan 14, 2022

I do not have BSD to test on. Please report back whether 1.5.1 resolved the issue.

@r-darwish
Copy link
Contributor

r-darwish commented Jan 15, 2022

Ran go test on FreeBSD 13 with Go 1.17 on the main branch. All tests passed

@nshalman
Copy link
Contributor

nshalman commented Jan 17, 2022

@r-darwish Any chance you could help me write a github action that uses https://github.com/vmactions/freebsd-vm similar to the one I'm working on for illumos (see nshalman@96066fd) to run the tests on FreeBSD?

It would be great to be able to catch these things in the future, even if we have to trigger the tests manually because they're too slow to run on every push/pr.

@r-darwish
Copy link
Contributor

r-darwish commented Jan 17, 2022

@nshalman this is really nice. Could help me with Topgrade as well. I'll try to write an action

@r-darwish
Copy link
Contributor

r-darwish commented Jan 17, 2022

#419

@nshalman
Copy link
Contributor

nshalman commented Jan 17, 2022

It occurs to me that cross-compilation builds might also have caught this.
I'm still very glad to be able to run the full tests on FreeBSD thanks to #419.

nshalman added a commit to nshalman/fsnotify that referenced this issue Jan 17, 2022
This would have caught fsnotify#389 and should
catch build failures for supported targets.
nshalman added a commit that referenced this issue Jan 19, 2022
This would have caught #389 and should
catch build failures for supported targets.
nshalman pushed a commit that referenced this issue Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants