cargo-raze icon indicating copy to clipboard operation
cargo-raze copied to clipboard

General problem with toolchain.bzl

Open SirVer opened this issue 8 years ago • 5 comments

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

SirVer avatar Feb 13 '18 18:02 SirVer

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.

acmcarther avatar Feb 13 '18 18:02 acmcarther

I forgot: this was OS X and I was running a zsh.

Am 13.02.2018 um 19:08 schrieb Alex McArther [email protected]:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

SirVer avatar Feb 13 '18 18:02 SirVer

@acmcarther this was a part of my dylib changes, iirc it resolved a sandboxing issue in my work environment.

I suspect it's not the most portable bash.

On Tue, Feb 13, 2018, 13:18 Holger Rapp [email protected] wrote:

I forgot: this was OS X and I was running a zsh.

Am 13.02.2018 um 19:08 schrieb Alex McArther [email protected]:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/acmcarther/cargo-raze/issues/31#issuecomment-365356150, or mute the thread https://github.com/notifications/unsubscribe-auth/ACLjePNFCtPVICaXgwP8R-HTqogwCWI5ks5tUdIBgaJpZM4SEK8n .

mfarrugi avatar Feb 14 '18 00:02 mfarrugi

The PR is here: https://github.com/bazelbuild/rules_rust/pull/61, and I suggested a fix.

acmcarther avatar Feb 16 '18 22:02 acmcarther

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

mfarrugi avatar Mar 30 '18 19:03 mfarrugi