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

pythonPackages.grpcio-tools: fix undefined symbol error on armv6l #67808

Closed
wants to merge 1 commit into from

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

On armv6l, grpc needs to link to libatomic to provide C++ atomic operations. Without this PR, importing this Python module results in the following error:

Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 6, in <module>
    from grpc_tools import protoc
  File "/nix/store/b21rflbwjpfj7lxm3fg88p64ri6p0pm6-python3.7-grpcio-tools-1.23.0/lib/python3.7/site-packages/grpc_tools/protoc.py", line 20, in <module>
    from grpc_tools import _protoc_compiler
ImportError: /nix/store/b21rflbwjpfj7lxm3fg88p64ri6p0pm6-python3.7-grpcio-tools-1.23.0/lib/python3.7/site-packages/grpc_tools/_protoc_compiler.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8

One might expect that the grpcio package would need this fix, rather than grpcio-tools, but this does not seem to be the case.

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 nix-review --run "nix-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @vanschelven

Copy link
Contributor

@vanschelven vanschelven left a comment

Choose a reason for hiding this comment

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

Looks good to me.

(Unchecked stuff ahead): looking at that stacktrace it almost looks like a bundled version of some protobuf implementation is what's doing the tripping-up here... which makes me wonder: how is the general state of affairs for the various protobuf-related libraries on armv6l ?

If the answer turns out to be "they don't work either", fixing them might be a separate PR.

@lopsided98
Copy link
Contributor Author

I fixed protobuf on armv6l upstream a while ago (protocolbuffers/protobuf#5227), and I have only seen this issue with grpcio-tools. I looked into fixing this upstream, but I think it would be difficult because it is hard to do autotools/CMake style compile tests in Python libraries.

@lopsided98
Copy link
Contributor Author

It looks like this has been fixed upstream: grpc/grpc#20414

@marsam marsam mentioned this pull request Nov 6, 2019
10 tasks
@lopsided98
Copy link
Contributor Author

Fixed by #72892

@lopsided98 lopsided98 closed this Nov 7, 2019
@lopsided98 lopsided98 deleted the grpcio-tools-armv6l branch November 7, 2019 23:42
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

3 participants