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

shadowsocks-libev: supports darwin #41421

Merged
merged 1 commit into from Jun 3, 2018

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Jun 3, 2018

Motivation for this change

shadowsocks-libev is supported on darwin

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/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label Jun 3, 2018
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build works fine, but install_name of the libraries isn't correct. If we don't fix that any usages will still be broken.

@marsam marsam force-pushed the feature/enable-shadowsocks-libev-darwin branch from e189bd3 to 2fb3c6c Compare June 3, 2018 18:39
@marsam
Copy link
Contributor Author

marsam commented Jun 3, 2018

@LnL7 thanks for reviewing, fixed

@xeji
Copy link
Contributor

xeji commented Jun 3, 2018

@GrahamcOfBorg build shadowsocks-libev

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: shadowsocks-libev

Partial log (click to expand)

/nix/store/387jabdjm9v4wi0m9r0fgnq1w78pc3hs-shadowsocks-libev-3.2.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: shadowsocks-libev

Partial log (click to expand)

shrinking /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/lib/libcork.so
shrinking /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/lib/libbloom.so
shrinking /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/lib/libshadowsocks-libev.so
shrinking /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/lib/libipset.so
gzipping man pages under /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/share/man/
strip is /nix/store/21ymadblbmsbb2bk4q7gl4kjasp8zmgd-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/lib  /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0/bin
patching script interpreter paths in /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0
checking for references to /build in /nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0...
/nix/store/6srwwmkpyl0nbhsm6zri2rb7d8z986wx-shadowsocks-libev-3.2.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: shadowsocks-libev

Partial log (click to expand)

shrinking /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/bin/ss-local
shrinking /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/bin/ss-redir
shrinking /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/bin/ss-tunnel
shrinking /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/bin/ss-server
gzipping man pages under /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/share/man/
strip is /nix/store/qg2agrqkf240s656d207zqhipl0bc2id-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/lib  /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0/bin
patching script interpreter paths in /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0
checking for references to /build in /nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0...
/nix/store/imkrm01kyr42c9d0l77sd0rsa9a67yvm-shadowsocks-libev-3.2.0

@xeji xeji merged commit 76f6dc1 into NixOS:master Jun 3, 2018
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this isn't set correctly by the build in the first place. It uses cmake and that should do this automatically.

install_name_tool -change libbloom.dylib $out/lib/libbloom.dylib $out/lib/libipset.dylib

for exe in $out/bin/*; do
install_name_tool -change libmbedtls.dylib ${mbedtls}/lib/libmbedtls.dylib $exe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only fixes the current library references, not the install_name (see. otool -D and install_name_tools -id). This means the binaries now work but anything that links against the libraries will run into the same issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I revert?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, the package itself will work properly now and there's currently nothing in nixpkgs that links against it.

orivej added a commit that referenced this pull request Jun 4, 2018
* master: (26 commits)
  python.pkgs.cairocffi: update tests for Cairo 1.15.12
  python.pkgs.cairocffi: 0.8.0 -> 0.8.1
  freecell-solver: fix build
  perlPackages.CPANPLUS: restore build inputs removed in #41394
  Fix GHCJS 8.4/8.2 in sandboxed builds (#41411)
  dockerTools.pullImage: expose image* attributes (#41366)
  rust: disable tests on darwin
  python.pkgs.detox: 0.11 -> 0.12
  certbot: disable check on darwin
  freeimage: fix build with glibc 2.27
  shadowsocks-libev: supports darwin (#41421)
  pythonPackages.jira: fix build (#41419)
  SDL: propagate libiconv
  schema2ldif: Init at 1.3
  nixos/exim: Add unit restart trigger (#41418)
  Add myself as maintainer for dnsdist
  Add myself as maintainer
  synapse-bt: init at 2018-06-04 (#41402)
  skim: 0.3.2 -> 0.4.0 (#41417)
  ctags: fix source url (#41382)
  ...
@marsam marsam deleted the feature/enable-shadowsocks-libev-darwin branch June 9, 2018 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants