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

python/grpcio: fix darwin build #44902

Merged
merged 1 commit into from Aug 13, 2018
Merged

python/grpcio: fix darwin build #44902

merged 1 commit into from Aug 13, 2018

Conversation

danieldk
Copy link
Contributor

grpcio currently does not build on Darwin (10.13.6). Due to the
following issues:

  • ar is invoked with incorrect flags (python grpcio doesn't build on darwin #33765).
  • libtool cannot be found, with a libtool dependency, with libtool
    the option '-no_warning_for_no_symbols' is not recognized.
  • the module build cannot find boringssl that is packaged with
    python-grpcio when pkgconfig is not installed (grpc/joe: 4.0 -> 4.1 #10058).
Motivation for this change

See above. Unfortunately, I could not test on NixOS, since I am in an airport ;).

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

grpcio currently does not build on Darwin (10.13.6). Due to the
following issues:

* ar is invoked with incorrect flags (NixOS#33765).
* libtool cannot be found, with a libtool dependency, with libtool
  the option '-no_warning_for_no_symbols' is not recognized.
* the module build cannot find boringssl that is packaged with
  python-grpcio when pkgconfig is not installed (grpc/NixOS#10058).
@LnL7
Copy link
Member

LnL7 commented Aug 12, 2018

@GrahamcOfBorg build python27Packages.grpcio python36Packages.grpcio

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python27Packages.grpcio, python36Packages.grpcio

Partial log (click to expand)

OK
copying python_build/lib.macosx-10.7-x86_64-3.6/grpc/_cython/cygrpc.cpython-36m-darwin.so -> src/python/grpcio/grpc/_cython
Found cython-generated files...

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/nks3f3yhmasz62si2i0z6hfp3jf737s2-python2.7-grpcio-1.13.0
/nix/store/nhsnnvlbz9glnyjp0w0336vrr6cqzynm-python3.6-grpcio-1.13.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python27Packages.grpcio, python36Packages.grpcio

Partial log (click to expand)

running build_ext
copying python_build/lib.linux-x86_64-3.6/grpc/_cython/cygrpc.cpython-36m-x86_64-linux-gnu.so -> src/python/grpcio/grpc/_cython
Found cython-generated files...

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/449g9gi0lwjkmk2y0q7dn3n9hvqix9gg-python2.7-grpcio-1.13.0
/nix/store/crw9avyjjc2cn4qck6nckywdjhlr9chq-python3.6-grpcio-1.13.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python27Packages.grpcio, python36Packages.grpcio

Partial log (click to expand)

running build_ext
Found cython-generated files...
copying python_build/lib.linux-aarch64-2.7/grpc/_cython/cygrpc.so -> src/python/grpcio/grpc/_cython

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/plw09m3nxwdnv8r6yc8wx2408jfar28a-python2.7-grpcio-1.13.0
/nix/store/jjzk1slynj8jribp8apx623a910mh7y3-python3.6-grpcio-1.13.0

@LnL7 LnL7 merged commit 4c0e250 into NixOS:master Aug 13, 2018
@danieldk danieldk deleted the grpcio-darwin branch September 5, 2018 14:27
@marijanp
Copy link
Contributor

Before I open a new issue I wanted to share my problem here, since it's similar. I'm not able to build grpcio on darwin because the boringssl build fails.

Steps to reproduce

start a nix-shell with:

with import <nixpkgs> {};
(python36.withPackages (ps: [ ps.grpcio ])).env

Technical details

  • system: "x86_64-darwin"
  • host os: Darwin 18.5.0, macOS 10.14.4
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.2
  • channels(root): "nixpkgs-19.03pre169106.1a88aa9e0cd"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixpkgs

@danieldk
Copy link
Contributor Author

It's probably more useful to start a new issue. I encountered the same issue on darwin, but didn't have time to get to the bottom of it.

@danieldk
Copy link
Contributor Author

I have found and fixed the issue. I'll do a pull request in a bit.

@danieldk
Copy link
Contributor Author

See #58456

github-actions bot pushed a commit to bobrik/nixpkgs that referenced this pull request Feb 28, 2021
This fixes `aarch64-darwin` build in NixOS#105026. Without this the `strip` in `PATH`
is the one from `darwin.cctools`, which doesn't preserve code signatures,
resulting in code that cannot run and pass `pythonImportsCheckPhase`.

The dependency on cctools was introduced in NixOS#44902 in 2018,
but it doesn't seem to be necessary on `x86_64-darwin` today.
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