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
xmlsec: add library path to lt_dladdsearchdir #68488
Conversation
This makes it easier to use libxmlsec in other libraries like python-xmlsec.
I think it would be good if can avoid patching like this. These patches usually end up breaking between version updates. I think we might be able to just add |
Modifying the The xmlsec crypto libraries aren't linked dynamically, but get loaded with I tested the It only tries to load These are the only options I could find so far. |
Thank you for your contributions.
|
I'm also trying to use
@jtojnar in researching this problem I've seen your name pop up on related issues elsewhere. |
Looks like
|
The changes look reasonable. Future updates can break any customizations and I prefer when the breakage is loud so that we can be aware of it and fix it. Since this was not caught by the project tests adding a derivation checking if this still works to Looks like
so alternately, we could hard-code the absolute path within |
The tests seem to only run the Adding a
I'm not sure if hardcoding the paths has an advantage over embedding the The benefit of embedding the |
@B4dM4n did you ever end up packaging python-xmlsec? I'm trying to get it built right now and running into dlopen issues |
this is the exact issue I'm getting, even with this patch |
never mind, I'm actually just running an older version of nixpkgs than when this was merged |
Motivation for this change
When linking to
libxmlsec
, the linking binary/library has to ensure that thexmlsec
$out/lib
directory is in theLD_LIBRARY_PATH
, to esurelibxmlsec
can find and load the crypto libraries.xmlsec1
useswrapProgram
for this, but when an intermediate library is linkinglibxmlsec
, it has no control over theLD_LIBRARY_PATH
(like python-xmlsec ).Adding
$out/lib
tolt_dladdsearchdir
during library initialization works aroundLD_LIBRARY_PATH
and ensures the crypto libraries can always be found.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers