Repository navigation
Don't extend LD_LIBRARY_PATH with the NEO directory - #789
Merged
Merged
Conversation
The variable has no effect on the running process, since glibc reads it at startup, and the in-process driver discovery it was meant for is now handled by dlopen'ing NEO by full path. Child processes did inherit it, though. With NEO_jll pointed at a system driver in e.g. /usr/lib64, that directory took precedence over every JLL's RUNPATH in precompile workers and Pkg.test, so bundled libraries such as SPIRV_Tools_jll resolved their dependencies against older system copies and failed to load. Children that need NEO load oneAPI.jl and perform the same dlopen themselves. Fixes #778.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #789 +/- ##
==========================================
- Coverage 86.90% 86.90% -0.01%
==========================================
Files 55 55
Lines 5103 5093 -10
==========================================
- Hits 4435 4426 -9
+ Misses 668 667 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
__init__prepended the NEO driver's directory toLD_LIBRARY_PATH. That has no effect on the running process, since glibc reads the variable at startup; in-process discovery of the driver (for libsycl's bundled Level Zero loader) is handled bydlopen'ing NEO by full path, added in #574. Child processes did inherit the variable, though. WithNEO_jllpointed at a system driver, e.g. in/lib64, that directory then took precedence over every JLL'sRUNPATHin precompile workers andPkg.test, so bundled libraries resolved their dependencies against older system copies:This removes the
LD_LIBRARY_PATHchange instead of limiting it to the artifact driver: a child process that needs NEO loads oneAPI.jl and performs the samedlopenitself, so the variable serves no purpose there either. A test checks that the driver directory isn't onLD_LIBRARY_PATHafter loading.Tested locally on an Arc A770 with the bundled NEO, and with
NEO_jll/libigc_jllpreferences pointing at the system driver in/usr/lib(which reproduced the error above before this change).Fixes #778.