-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
FreeBSD support with knowledge about Linux emulation #704
Conversation
Previously, pkg-config was already queried for libsqlite3's and libcurl's link flags. However they were not used, but hardcoded instead. This commit replaces the hardcoded LDFLAGS by the ones provided by pkg-config in a similar pattern as already used for libsodium.
Eventually the nested if statements should be replaced by a more general condition, but this is sufficient to make it work on FreeBSD.
There is no libdl on FreeBSD. Instead the symbols are included in libc.
Some evidence that defining it to be 0 is right: * OS X headers define it to be 0. * Other code uses 0 instead of SOL_LOCAL to check for peer credentials (e.g. FreeBSD's implementation of getpeereid).
Hmm, someone should try with with branded zones on Illumos. |
@Ericson2314 an |
@vizanto Sure one can do run everything on an lx branded zone (and good job doing that BTW!), but I meant have Nix running "natively" and build both illumos and Linux binaries (and spin up lx branded zones for building the latter I suppose). That's more work than this patch alone of course. |
Yes, indeed it is @Ericson2314 NixOS/nixpkgs#11067 |
Oh wow, that's wonderful! Mmm I think one would use lx-branded zones. Now that our build-sandboxing support has been generalized to work for Linux and Darwin, hopefully it wouldn't be too hard to make it understand zones on Illumos. |
@edolstra I tested this, and I believe we decided at the NixCon that this is ready to merge. Patchelf issue 36 still applies though. |
FreeBSD support with knowledge about Linux emulation
Thanks, merged! |
Hey, FreeBSD users, does #55 still apply? (I unfortunately don't have elevated rights in this repo, so I would be unable to close it myself.) |
Also, make the FreeBSD checks conditional on FreeBSD.
Use bold instead of monospace for emphasis
This is just the build fixes of #657 with the additional canBuildLocally patch to ensure that Nix knows it can build i686 Linux binaries even if it is a FreeBSD machine. Linux emulation does not work for 64-bit binaries, so this is not enabled.