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

could not find python binary error building master #1

Open
codygman opened this issue Nov 24, 2020 · 1 comment
Open

could not find python binary error building master #1

codygman opened this issue Nov 24, 2020 · 1 comment

Comments

@codygman
Copy link

[cody@nixos:~/code/haskell-bazel-nix-template]$ git log --oneline -n1 && nix-shell --pure --run "bazel build -c opt //treetide/..."
09853e2 (HEAD -> master, origin/master, origin/HEAD) Fix some vim command mode typing mess.
Loading: 
Loading: 0 packages loaded
Analyzing: 38 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 38 targets (0 packages loaded, 0 targets configured).
INFO: Found 38 targets...
[0 / 22] [Prepa] HaskellBuildLibrary //treetide/haskell/extended/xml-conduit:extended
ERROR: /home/cody/code/haskell-bazel-nix-template/treetide/haskell/extended/optparse-applicative/BUILD:12:1: HaskellBuildLibrary //treetide/haskell/extended/optparse-applicative:extended failed (Exit 1) ghc_wrapper failed: error executing command bazel-out/host/bin/external/rules_haskell/haskell/ghc_wrapper bazel-out/k8-opt/bin/treetide/haskell/extended/optparse-applicative/compile_flags_extended_HaskellBuildLibrary ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox

<no location info>: error:
    Warning: Couldn't figure out C compiler information!
             Make sure you're using GNU gcc, or clang
Traceback (most recent call last):
  File "bazel-out/host/bin/external/rules_haskell/haskell/cc_wrapper-python", line 349, in <module>
    Main()
  File "bazel-out/host/bin/external/rules_haskell/haskell/cc_wrapper-python", line 309, in Main
    raise AssertionError('Could not find python binary: ' + PYTHON_BINARY)
AssertionError: Could not find python binary: python
`cc_wrapper-python' failed in phase `Assembler'. (Exit code: 1)
INFO: Elapsed time: 0.509s, Critical Path: 0.42s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

@avdv
Copy link

avdv commented Nov 25, 2020

Hi.

Just try to enable the use python toolchains setting in .bazelrc, ie. change

--noincompatible_use_python_toolchains

to

--incompatible_use_python_toolchains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants