Skip to content

python-modules/protobuf: fix darwin build by using $CXX instead of $CC #26606

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

Closed
wants to merge 1 commit into from

Conversation

robx
Copy link
Contributor

@robx robx commented Jun 15, 2017

fixes #26531 (or works around?)

Motivation for this change

This is about issue #26531. The minimal change I could make to get the package to build for me locally. I doubt it's the best way to go about it.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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.

Sorry, something went wrong.

Fixes NixOS#26531 (or works around the issue), which is that python's
build_ext target builds the C++ sources using $CC, which doesn't
provide the C++ system headers with nix.
@robx
Copy link
Contributor Author

robx commented Jun 15, 2017

Ran nix-shell -p nox --run "nox-review wip", which failed to what seem to be unrelated reasons:

Collecting argparse (from worldengine==0.19.0)
  Could not find a version that satisfies the requirement argparse (from worldengine==0.19.0) (from versions: )
No matching distribution found for argparse (from worldengine==0.19.0)
builder for ‘/nix/store/8nfvw7k46wpfq7gkr4q8ng6szwr60a31-python2.7-worldengine-0.19.0.drv’ failed with exit code 1
error: build of ‘/nix/store/8nfvw7k46wpfq7gkr4q8ng6szwr60a31-python2.7-worldengine-0.19.0.drv’ failed
The invocation of "nix-build -A python36Packages.gmusicapi -A python27Packages.python-axolotl -A python27Packages.tensorflowWithoutCuda -A python27Packages.protobuf2_6 -A python27Packages.edward -A python36Packages.protobuf3_0 -A python27Packages.protobuf3_0 -A python36Packages.worldengine -A python27Packages.protobuf3_2 -A python27Packages.gmusicapi -A electrum-ltc -A python27Packages.protobuf -A python36Packages.python-axolotl -A python27Packages.tensorflow -A python27Packages.tflearn -A python27Packages.gplaycli -A python36Packages.protobuf3_2 -A python27Packages.worldengine -A python27Packages.ddar /s/nixpkgs" failed

@LnL7 LnL7 added 6.topic: darwin Running or building packages on Darwin 6.topic: python labels Jun 15, 2017
@robx
Copy link
Contributor Author

robx commented Jun 16, 2017

Curious travis failures: linux travis-nox-review-pr.sh nox pr fails because output exceeds 4MB, but seems fine otherwise. osx travis-nox-review-pr.sh nox pr fails because of a segmentation fault in python2.7-protobuf-3.0.2 unit test testMergeFrom (google.protobuf.internal.message_test.Proto3Test)

@robx
Copy link
Contributor Author

robx commented Jun 19, 2017

Closing in favour of #26709.

@robx robx closed this Jun 19, 2017
@robx robx deleted the fix-python-protobuf branch June 19, 2017 11:30
@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: python 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

building python3Packages.protobuf3_2 on OS X fails due to string include
3 participants