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

strongswan: Make it build on macOS #56969

Merged
merged 1 commit into from Mar 8, 2019
Merged

Conversation

knl
Copy link
Contributor

@knl knl commented Mar 6, 2019

Motivation for this change

Original expression could not be built on macOS due to using dependencies to
Linux only packages. This change fixes that by grouping the dependencies based
on the suitable system. In addition, it uses configure flags recommended by
the project for building on macOS, as well the ones used by Homebrew.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@basvandijk
Copy link
Member

@GrahamcOfBorg build strongswan

@GrahamcOfBorg test strongswan-swanctl

@basvandijk
Copy link
Member

For some reason ofborg fails to build strongswan on darwin. However, I can confirm it builds fine on my mac:

$(nix-build -A strongswan)/bin/ipsec --version
Darwin strongSwan U5.7.1/K18.2.0
University of Applied Sciences Rapperswil, Switzerland
See 'ipsec --copyright' for copyright information.

@basvandijk
Copy link
Member

Let's see if ofborg builds correctly on darwin now:

@GrahamcOfBorg build strongswan

@knl knl force-pushed the build-strongswan-on-macos branch 2 times, most recently from da72e7b to ba157b6 Compare March 6, 2019 17:37
Original expression could not be built on macOS due to using dependencies to
Linux only packages. This change fixes that by grouping the dependencies based
on the suitable system. In addition, it uses `configure` flags recommended by
the project for building on macOS, as well the ones used by Homebrew.
@knl knl force-pushed the build-strongswan-on-macos branch from ba157b6 to 1609f86 Compare March 7, 2019 09:05
@basvandijk
Copy link
Member

@GrahamcOfBorg build strongswan

@GrahamcOfBorg test strongswan-swanctl

@Mic92
Copy link
Member

Mic92 commented Mar 7, 2019

@GrahamcOfBorg build strongswan

@knl
Copy link
Contributor Author

knl commented Mar 7, 2019

Seems that build machine is having problems with resource limits, make files when going into recursive targets:

make  all-recursive
make[4]: Entering directory '/private/tmp/nix-build-strongswan-5.7.1.drv-0/strongswan-5.7.1/src/libstrongswan'
/nix/store/g9cis4hsnzcjkzfa77nif7kzq9bsqmpg-bash-4.4-p23/bin/bash: fork: retry: Resource temporarily unavailable
/nix/store/g9cis4hsnzcjkzfa77nif7kzq9bsqmpg-bash-4.4-p23/bin/bash: fork: retry: Resource temporarily unavailable
/nix/store/g9cis4hsnzcjkzfa77nif7kzq9bsqmpg-bash-4.4-p23/bin/bash: fork: retry: Resource temporarily unavailable
/nix/store/g9cis4hsnzcjkzfa77nif7kzq9bsqmpg-bash-4.4-p23/bin/bash: fork: retry: Resource temporarily unavailable
/nix/store/g9cis4hsnzcjkzfa77nif7kzq9bsqmpg-bash-4.4-p23/bin/bash: fork: Resource temporarily unavailable
make[4]: *** [Makefile:2170: all-recursive] Error 254
make[4]: Leaving directory '/private/tmp/nix-build-strongswan-5.7.1.drv-0/strongswan-5.7.1/src/libstrongswan'
make[3]: *** [Makefile:1298: all] Error 2
make[3]: Leaving directory '/private/tmp/nix-build-strongswan-5.7.1.drv-0/strongswan-5.7.1/src/libstrongswan'
make[2]: *** [Makefile:529: all-recursive] Error 1
make[2]: Leaving directory '/private/tmp/nix-build-strongswan-5.7.1.drv-0/strongswan-5.7.1/src'
make[1]: *** [Makefile:585: all-recursive] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-strongswan-5.7.1.drv-0/strongswan-5.7.1'
make: *** [Makefile:496: all] Error 2

@Mic92
Copy link
Member

Mic92 commented Mar 8, 2019

@knl agreed

@Mic92 Mic92 merged commit 87f8d1d into NixOS:master Mar 8, 2019
@knl knl deleted the build-strongswan-on-macos branch March 8, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants