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

General problem with toolchain.bzl #31

Open
SirVer opened this issue Feb 13, 2018 · 5 comments
Open

General problem with toolchain.bzl #31

SirVer opened this issue Feb 13, 2018 · 5 comments

Comments

@SirVer
Copy link

SirVer commented Feb 13, 2018

Not sure if that is in the modifications you made, but I run into trouble with this line in toolchain.bzl:

["if [[ -v TMPDIR ]]; then mkdir -p $TMPDIR; fi;"] +

With it in, nothing builds on mac os due some shell snafu. Commenting it out makes the build work for me:

$ bazel build //cargo/vendor:pbr
INFO: Analysed target //cargo/vendor:pbr (6 packages loaded).
INFO: Found 1 target...
ERROR: /Users/hrapp/Desktop/Programming/rust/point_cloud_viewer/cargo/vendor/winapi-0.2.8/BUILD:16:1: error executing shell command: 'set -e; if [[ -v TMPDIR ]]; then mkdir -p $TMPDIR; fi; rm -rf bazel-out/darwin-fastbuild/bin/cargo/vendor/winapi-0.2.8/winapi.deps; mkdir bazel-out/darwin-fastbuild/bin/cargo/vendor/winapi-0.2.8/wi...' failed (Exit 2)
/bin/bash: -c: line 0: conditional binary operator expected
/bin/bash: -c: line 0: syntax error near `TMPDIR'
/bin/bash: -c: line 0: `set -e; if [[ -v TMPDIR ]]; then mkdir -p $TMPDIR; fi; rm -rf bazel-out/darwin-fastbuild/bin/cargo/vendor/winapi-0.2.8/winapi.deps; mkdir bazel-out/darwin-fastbuild/bin/cargo/vendor/winapi-0.2.8/winapi.deps'
Target //cargo/vendor/pbr-1.0.0:pbr failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.250s, Critical Path: 0.10s
FAILED: Build did NOT complete successfully
@acmcarther
Copy link
Owner

Can you use "--verbose_failures" (scrubbing out anything you need to).

That doesn't look like a change I made. Are you on an interesting platform at all? Weird version of bash? Will look into.

@SirVer
Copy link
Author

SirVer commented Feb 13, 2018 via email

@mfarrugi
Copy link
Contributor

mfarrugi commented Feb 14, 2018 via email

@acmcarther
Copy link
Owner

The PR is here: bazelbuild/rules_rust#61, and I suggested a fix.

@mfarrugi
Copy link
Contributor

That fix went into the PR (though it remains unpushed), that should close this thread.

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

3 participants