-
Notifications
You must be signed in to change notification settings - Fork 4k
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
--test_env=LD_LIBRARY_PATH not passed to tests on MacOS #3921
Comments
@benvanik I think we just ran into this same problem. Did you find a good way to resolve your problem, or do you know why this issue hasn't seen any attention? |
@dslomov Hey are you able to give any information on whether this is an actual bug in Bazel? |
So I would guess that this issue isn't with |
I don't think this is related, but do you have |
Related to #6648? From memory I didn't have that on and remember seeing the issue I linked at the time, and also do remember passing by |
The problem does persist with I poked around a little, and it seems that El Capitan and later strip LD_LIBRARY_PATH/DYLD_LIBRARY_PATH for executables in certain directories, including /bin. I'm going to close this as a not-Bazel-related issue, but please comment if there's something we should look into further. |
I need to manipulate the LD_LIBRARY_PATH used by my test binaries. I tried using --test_env=LD_LIBRARY_PATH and --test_env=LD_LIBRARY_PATH=foo and neither were set in the environment when running the tests. Nor are DYLD_LIBRARY_PATH and most other DYLD_* values. Arbitrary other environment variables are correctly passed (--test_env=FOO=1, etc).
I can't seem to find any code in bazel that is explicitly stripping these, but perhaps I'm missing something. Why is this happening? The docs state that --test_env can be used for this kind of stuff (explicitly listing --test_env=PATH as an example) - why would LD_LIBRARY_PATH be special?
I was able to confirm this with the following:
Output:
LD_LIBRARY_PATH is nowhere in that list and the value is empty.
The text was updated successfully, but these errors were encountered: