-
-
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 build fixes #657
FreeBSD build fixes #657
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).
This looks pretty similar to #643. |
This is indeed very similar. I didn't notice there was another pull request for this. |
FTR i tried this branch in a vanilla FreeBSD 10.2 jail as documented in #643 but after
any idea what's missing here? seems i might be missing a dependency to build the documentation? |
Make sure the following packages are installed:
|
@manueljacob thanks, that helped. additionally i still needed to install to retrace my steps and to document the required steps i've created an ansible playbook which reproducibly allows to install nix from git sources https://gist.github.com/tomster/5cfb45030e06ffb7b91a given that FreeBSD these days comes with at any rate, thanks for your effort, i shall now commence with the nix tutorial :-) (btw. any pointers what to do first would be appreciated :-) |
@@ -692,6 +692,10 @@ static PeerInfo getPeerInfo(int remote) | |||
|
|||
#elif defined(LOCAL_PEERCRED) | |||
|
|||
#if !defined(SOL_LOCAL) | |||
#define SOL_LOCAL 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be
#define SOL_LOCAL SOL_SOCKET
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that would be wrong, potentially causing the xucred structure to be filled with nonsense (see this libvirt commit). I mentioned more reasons why defining it to be 0 is right in the 7888b2b commit message.
FYI @garbas and i were tinkering with this yesterday and we've a little progress. our goal was to be able to get we had to make a few changes to also, i've updated the playbook to bootstrap building nix: https://gist.github.com/tomster/5cfb45030e06ffb7b91a has anyone else made any progress on actually using nix on FreeBSD, now that it builds? |
@tomster , I just tested a build of this patch with your nixpkgs branch. Seems to work fine, hello runs, at least. What needs to be done next? |
This is sufficient to fix the Nix build on my FreeBSD 10.2 virtual machine.