Repository navigation
Use ROOT_LIBRARY_PATH in DynamicPath - #7031
Conversation
|
Can one of the admins verify this patch? |
|
We would also need to support this on Windows for consistency. Can you make sure that patch works on Windows too? cc: @bellenot |
The current patch most likely does not work on Windows (it doesn't touch Maybe we should first get to the point, what needs to be done for this to get accepted for the unix world? So that the windows implementation can take care of all that? |
|
Only the PATH variable is needed on Windows |
Okay, that sounds to me like Windows isn't affected by this PR. Is there anything I can do, so we get forward with this? |
|
@bellenot, I am confused. This PR introduces another way to express the LD_LIBRARY_PATH. IIUC, the PATH variable is the analog of LD_LIBRARY_PATH for Windows. What happens if somebody defines a variable ROOT_LIBRARY_PATH and not update the PATH? On unix it'd work just fine but fail on Windows? |
|
So I think the argument that Windows uses |
|
So you want to introduce |
|
I thought the rationale is spelled out in the original post?
Why would that exclude Windows? Either we "buy" the rationale and agree that this is a useful feature (and that would then include Windows) or we think it's not needed, but then it shouldn't be needed on any platform. What am I missing / misunderstanding? |
|
Thanks for revisiting this!
|
|
OK, thanks for the explanation. And don't worry, I can take care of the implementation and testing on Windows. |
|
BTW, do we have any specific test for this? |
|
So here is the diff for |
7613b6f to
6e579b0
Compare
|
Thanks to @bellenot for providing the Windows part. I have squashed it into the main commit and added a
If I should write tests (sounds like everything else is fine), I could need a small bit of guidance (could you point me at a test, that I could learn from / extend?). Also rebased. |
|
@ChristianTackeGSI Thanks! And my question about test mas mostly for @Axel-Naumann |
|
It'd be good to have a test for this. This can be done through Google test in |
|
I'll look into providing some tests. I have some idea. If I need more help, I'll speak up. |
Just for my curiosity, if it would be possible (and if not would be desired to have): Does the file-based rootrc-System already have the primitives (like an "include/merge other rootrc file" of sorts) to construct something like |
|
I don't think that exists. Are you suggesting we collect everything from all these files - and what is their relative priority? Or if we don't collect everything, how do we detect which "package" the current process belongs to? Another option is for a library to modify the combined |
Yes,
I mean, one could also modify the In the end, I am looking for a good way to bake-in some default search paths at install time and from a package that depends on root, ideally without setting up environment variables at all. But having |
6e579b0 to
04a5967
Compare
|
Added testsuite for the Unix part. (rebased) |
43a9513 to
07ee3b3
Compare
|
I added a new subsection to the release notes, please review and let me know, if this is the right way. I also added my name to the contributors, hope that's okay / wanted too? (Bertrand Bellenot is already listed) I rebased on master, but as this seems to target 6.24, I wonder, whether I should rebase on 6-24-00-patches? |
|
v6.24 is already branched and closed for new features; i.e. we are in the last few steps of the release process.
Of course :) |
I am a bit confused. The "Milestone" for this PR was set to "6.24/00"?
|
I had missed Axel's message. It is indeed slated to go in 6.24. Our usual process is to first merge in master and then backport to the v6.24 patch branch. @ChristianTackeGSI Once you update the release note, I will merge in and then can you open a new PR against the v6.24 patch branch? |
07ee3b3 to
0a9d0dd
Compare
|
@pcanal, just heads up before merging -- #7031 (comment) |
|
Release notes are ready from my side. |
|
@vgvassilev thanks for the reminder. @ChristianTackeGSI Can you remove the test commit? Do you prefer that I add to roottest or can you add it? |
ROOT's "dynamic path" has some environment variables to control it. Those environment variables have some issues: * They are dependant on the OS (DYLD* on macOS, LD_LIBRARY_PATH on Linux, etc) * LD_LIBRARY_PATH/etc modify the system's search path for dynamic libraries, which can result in all sorts of bad things. We would like to have a dedicated environment variable, that is * OS independant. * does only affect ROOT. Let's name it ROOT_LIBRARY_PATH (suggestion on mattermost.web.cern.ch). It was suggested to put this into `system.rootrc` and/or `.rootrc`. This has some issues: * `.rootrc` is good for a per user solution. We would like to have a package level solution. * `system.rootrc` is usually a place for the local sysadmin to modify. It could be used by a distribution package to put "defaults". But that's not really nice. * Finally, `.rootrc` entries replace `system.rootrc` entries. So any package level configuration would be gone the moment, that the user sets `Unix.*.Root.DynamicPath`. So getting the above mentioned environment variable to work at a package level, means to put it into TUnixSystem.cpp / TWinNTSystem.cxx. Co-Authored-By: Bertrand Bellenot @bellenot
Add a short description of the new feature to the 6.24 releases notes.
0a9d0dd to
cb2df47
Compare
Okay, removed the test suite commit (and rebased to master) Could you please take care of adding it to roottest? The test suite commit is now here, for your reference: |
|
@phsft-bot build |
|
Starting build on |
|
Build failed on windows10/cxx14. Failing tests: |
|
The windows failures is unrelated (test output file deleted before being closed in an unrelated test) |
|
Thank you very much! |
|
Many thanks to everybody involved! :-) |
This feature got added in ROOT 6.24. Let's backport to older ROOT versions. See: root-project/root#7031 Also Move a few spack recipes over to use the new env var.
This feature got added in ROOT 6.24. Let's backport to older ROOT versions. See: root-project/root#7031 Also Move a few spack recipes over to use the new env var.
This feature got added in ROOT 6.24. Let's backport to older ROOT versions. See: root-project/root#7031 Also Move a few spack recipes over to use the new env var.
ROOT's "dynamic path" has some environment variables to control it. Those environment variables have some issues:
We would like to have a dedicated environment variable, that is
Let's name it ROOT_LIBRARY_PATH (suggestion on mattermost.web.cern.ch).
It was suggested to put this into
system.rootrcand/or.rootrc.This has some issues:
.rootrcis good for a per user solution. We would like to have a package level solution.system.rootrcis usually a place for the local sysadmin to modify. It could be used by a distribution package to put "defaults". But that's not really nice..rootrcentries replacesystem.rootrcentries. So any package level configuration would be gone the moment, that the user setsUnix.*.Root.DynamicPath.So getting the above mentioned environment variable to work at a package level, means to put it into TUnixSystem.cpp.
cc: @dennisklein