-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Adding default shell env to allow non-default compilers #2933
Conversation
I am adding default shell environment, so that protobuf compilation makes use of set LD_LIBRARY_PATH and so on. In this way, also non-default gcc installations (e.g. not in /usr/lib) can be used to compile protobuf. This would fix the following issue: bazelbuild/bazel#2515
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
1 similar comment
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok for us to run on our infrastructure. |
Can one of the admins verify this patch? |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
ok to test (this phrase will trigger the other CI runs) |
We may need the shell environment (potentially augmented with `--action_env`) to invoke protoc on Windows. If protoc was built with mingw, it probably needs .dll files in non-default locations that must be in PATH. Previously with `--compiler=mingw-gcc`, `bazel build //:gen_well_known_protos_java` would fail on Windows. This CL fixes the issue. Also we have `default_shell_env` set to True for `ProtoCompile`, this makes the behavior consistent. See protocolbuffers#2933, and https://github.com/bazelbuild/rules_go/blob/585a27ad0ab5bdd185aa3bd5b0877a778d4777ad/proto/compiler.bzl#L130
We may need the shell environment (potentially augmented with `--action_env`) to invoke protoc on Windows. If protoc was built with mingw, it probably needs .dll files in non-default locations that must be in PATH. Previously with `--compiler=mingw-gcc`, `bazel build //:gen_well_known_protos_java` would fail on Windows. This CL fixes the issue. Also we have `default_shell_env` set to True for `ProtoCompile`, this makes the behavior consistent. See #2933, and https://github.com/bazelbuild/rules_go/blob/585a27ad0ab5bdd185aa3bd5b0877a778d4777ad/proto/compiler.bzl#L130
We may need the shell environment (potentially augmented with `--action_env`) to invoke protoc on Windows. If protoc was built with mingw, it probably needs .dll files in non-default locations that must be in PATH. Previously with `--compiler=mingw-gcc`, `bazel build //:gen_well_known_protos_java` would fail on Windows. This CL fixes the issue. Also we have `default_shell_env` set to True for `ProtoCompile`, this makes the behavior consistent. See protocolbuffers#2933, and https://github.com/bazelbuild/rules_go/blob/585a27ad0ab5bdd185aa3bd5b0877a778d4777ad/proto/compiler.bzl#L130
I am adding default shell environment, so that protobuf compilation makes use of set
LD_LIBRARY_PATH and so on.
In this way, also non-default gcc installations (e.g. not in /usr/lib) can be used to compile protobuf.
This would fix the following issue:
bazelbuild/bazel#2515