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

Collision between binutils and clang [Mac OS] #129

Closed
MarcoPolo opened this issue May 13, 2020 · 2 comments
Closed

Collision between binutils and clang [Mac OS] #129

MarcoPolo opened this issue May 13, 2020 · 2 comments

Comments

@MarcoPolo
Copy link

Describe the bug
A simple project build fails on Mac OS

To Reproduce
On Mac:
git clone https://github.com/MarcoPolo/bug_repro1111
bazel build //main:hello-world

Fails.

Works on linux!

Expected behavior
Should build

Environment

  • OS name + version: MacOS Catalina
  • Version of the code: v0.7.0

Additional context
There should be way to set the priority of clang over binutils.

@aherrmann
Copy link
Member

Indeed, the default Nix expression for nixpkgs_cc_configure

          with import <nixpkgs> { config = {}; overlays = []; }; buildEnv {
            name = "bazel-cc-toolchain";
            paths = [ stdenv.cc binutils ];
          }

causes a collision on MacOS. There are other issues with this as well. In particular nixpkgs' clang expects standard include paths in the environment, which are missing in the Bazel sandbox. You can use the setup from rules_haskell to work around this issue.

Note, #128 should resolve this issue as well.

@aherrmann
Copy link
Member

I think this has been fixed by #128. Feel free to reopen if this is still an issue for you.

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