-
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
Environment is not propagated during linking step #2099
Comments
I agree that this should be changed.
Thanks for the patch. I believe it is a good solution for half of the problem; environment
Your patch solves the first problem, i.e., environment variables Klaus Aehlig |
@aehlig : well, https://github.com/bazelbuild/bazel/blob/master/tools/cpp/cc_configure.bzl#L117 We have a plan for invalidating the C++ repository if https://bazel.build/designs/2016/10/18/repository-invalidation.html So it's unclear whether this change should go in. I think we should either merge change and remove the dependency on Since there are numerous bugs about us needing |
After some in-person discussion, we decided to go with the former approach. I sent out https://bazel-review.googlesource.com/#/c/7530/, which is essentially your patch above except that |
Description of the problem / feature request / question:
PATH
,LD_LIBRARY_PATH
and co are not set when executing the linking step of a C/C++ library while those variables are correctly set for the compiling steps.We use a non-system set of GCC tools, and the linker depends on some libraries which are not found unless
LD_LIBRARY_PATH
is correctly set:Environment info
Operating System: Scientific Linux 6.5
Bazel version (output of
bazel info release
):release 0.4.0-2016-11-17 (@a1699bd)
Anything else, information or logs or outputs that would be helpful?
Looking at how things were done for the compilation steps (in
CppCompileAction.java
), I've been able to craft a patch which solve the issue. If needed I can open a PR, but I'm not really sure it's the correct / optimal way to solve the issue. Anyway, here is the patchThe text was updated successfully, but these errors were encountered: