-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Windows: building C++ hello-world requires local_config_sh #6498
Labels
area-Windows
Windows-specific issues and feature requests
P1
I'll work on this now. (Assignee required)
team-OSS
Issues for the Bazel OSS team: installation, release processBazel packaging, website
type: bug
Comments
meteorcloudy
added
type: bug
P2
We'll consider working on this in future. (Assignee optional)
area-Windows
Windows-specific issues and feature requests
labels
Oct 24, 2018
meteorcloudy
changed the title
Windows: building hello-world requires local_config_sh
Windows: building C++ hello-world requires local_config_sh
Oct 24, 2018
laszlocsomor
added
P1
I'll work on this now. (Assignee required)
and removed
P2
We'll consider working on this in future. (Assignee optional)
labels
Oct 24, 2018
Thanks for filing this! It's a bad first-time user experience, so I'm linking #5254. |
I can't seem to repro this :S Here's my source tree:
And the diff: diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 9a3396cbd5..df8c455ca7 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -1540,7 +1540,7 @@ int Main(int argc, const char *argv[], WorkspaceLayout *workspace_layout,
// Must be done before command line parsing.
// ParseOptions already populate --client_env, so detect bash before it
// happens.
- DetectBashOrDie();
+ // DetectBashOrDie();
globals->binary_path = CheckAndGetBinaryPath(argv[0]);
ParseOptions(argc, argv); I built Bazel here, then used it like so:
|
I tried again and I am still able to reproduce this issue. |
laszlocsomor
added a commit
to laszlocsomor/bazel
that referenced
this issue
Oct 25, 2018
When DetectBashOrDie [1] is commented out from src/main/cpp/blaze.cc, and BAZEL_SH is unset, and PATH is set and "bash" is found on the PATH, then sh_configure successfully finds bash using repository_ctx.which, and this method returns a "path" object. The code used to believe this was a string, and called a string method on it, causing a runtime error. [1] https://github.com/bazelbuild/bazel/blob/2fda17d46088f2bb07b049fa35759002ea1dd5db/src/main/cpp/blaze.cc#L1543 Fixes bazelbuild#6498 Change-Id: I07fd36fd6c6e8433257b0394f1fc776bbe3e6928
philwo
added
the
team-OSS
Issues for the Bazel OSS team: installation, release processBazel packaging, website
label
Jun 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-Windows
Windows-specific issues and feature requests
P1
I'll work on this now. (Assignee required)
team-OSS
Issues for the Bazel OSS team: installation, release processBazel packaging, website
type: bug
To reproduce
bazel/src/main/cpp/blaze.cc
Line 1543 in 2fda17d
BAZEL_SH
(withset BAZEL_SH=
)bazel build examples/cpp:hello-world
The text was updated successfully, but these errors were encountered: