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

please add freebsd support package in release #1080

Closed
blusewang opened this issue Jul 24, 2019 · 5 comments
Closed

please add freebsd support package in release #1080

blusewang opened this issue Jul 24, 2019 · 5 comments
Assignees

Comments

@blusewang
Copy link

see title

@kozlovic
Copy link
Member

Ironically, we would not be able to cross-compile (we use CGO_ENABLED=off) because of this commit that added freebsd support :-) a1bda5c

Adding freebsd in our cross-compile script would produce error:

Stderr: go build github.com/nats-io/nats-server/server/pse: build constraints exclude all Go files in /Users/ivan/dev/go/src/github.com/nats-io/nats-server/server/pse

which leads to: golang/go#24068.

That being said, I believe that NATS Server is part of the FreeBSD. There is a maintainer in our Slack that use to say that he updated it at each new release. Will try to reach out on Slack.

@cougarwww
Copy link

please add freebsd support package in release

@kozlovic
Copy link
Member

@cougarwww We can't for the reason stated in previous comments. We build using CGO_ENABLED=off and the server/pse for freebsd uses C, so we would have to change that first.

@philpennock
Copy link
Member

For clarity: the above PR which fixes this issue does so by doing exactly what @kozlovic said, because he is of course right.

The above PR adds support for cross-compiling only for FreeBSD/amd64. There are struct offsets which need to be pre-calculated on any architecture where we want to be able to avoid cgo, and I only have access to an amd64 box for this.

If you care about other hardware architectures, please take a look at the PR (which I'm cautiously optimistic will land) and create a per-architecture file in server/pse/pse_freebsd_${GOARCH}.go which does the same things. We can figure out as those arise if we want to just copy pse_freebsd_amd64.go or if it makes more sense to abstract out the per-architecture constants and endianness variable to reduce code duplication.

@philpennock
Copy link
Member

The next release of binaries for nats-server should include a FreeBSD/amd64 binary.

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

4 participants