| 15 Dec 2025 |
connor (he/him) | There is some, but it blocks forever, doesn’t do cleanup, and lacks a few other features needed for different types of builtin fetchers and substitutions | 20:41:22 |
connor (he/him) | Robbie Buxton have you run into this (or seen anyone run into it)? You’re one of the like three people I know who use PyTorch from Nixpkgs other than myself | 20:42:49 |
Robbie Buxton | In reply to @connorbaker:matrix.org Robbie Buxton have you run into this (or seen anyone run into it)? You’re one of the like three people I know who use PyTorch from Nixpkgs other than myself I haven’t run into that but I have run into libcuda failing on trying to dlopen things it claims to not depend on | 21:07:52 |
Robbie Buxton | Regarding that issue iirc RPATHS are recursive but RUNPATHS aren’t and if a RUNPATH exists the RPATH won’t be used (its replacing RPATHs) | 21:12:39 |
Robbie Buxton | I think @[Ari Lotter] is right and we should add it as an (undocumented) dep or cudnn | 21:15:47 |
Robbie Buxton | * I think @[Ari Lotter] is right and we should add it as an (undocumented) dep of cudnn | 21:15:56 |
apyh | adding it as a cudnn dep doesn't work still though from my testing | 21:16:10 |
Robbie Buxton | How are you adding it? | 21:16:20 |
apyh | i tried it as a propagatedBuildInput | 21:16:30 |
apyh | the only thing i managed was to pass it in ld library path manually :/ | 21:16:43 |
Robbie Buxton | Oh you’ll need to patchelf it | 21:16:44 |
apyh | err.. but it uses dlopen, right? | 21:17:13 |
Robbie Buxton | Sure but then it’ll know where it is no? | 21:17:32 |
apyh | my understanding is that bare soname dlopen doesn't care about that | 21:18:01 |
apyh | like we'd have to patch the *python* binary | 21:18:13 |
apyh | (very possible. I'm completely wrong here though, this is all new to me) | 21:18:23 |
Robbie Buxton | A bare no name dlopen will check the runpaths for where it’s being called form | 21:18:26 |
apyh | right, but that's the top level executable, python, not the libraries in the chain, no? | 21:18:58 |
Robbie Buxton | Nah each library checks its own runpath | 21:19:15 |
Robbie Buxton | As it goes down the call chain | 21:19:21 |
apyh | I thought this was true with DT_NEEDED but not with dlopen.. | 21:20:05 |
Robbie Buxton | I’m pretty sure this is how it works based on my experience but I could be wrong. | 21:21:01 |
apyh | no very possible you're right lol - ok so id patchelf, what, cudnn? | 21:21:22 |
Robbie Buxton | I defer to smarter people @[Gaétan Lepage] @[connor (burnt/out) (UTC-8)] @[SomeoneSerge (back on matrix)] | 21:21:41 |
Robbie Buxton | Basically if you readelf -d on the cudnn.so you should be able to see what it says it needs | 21:22:17 |
Robbie Buxton | And if you run patchelf —print-rpaths it’ll show you what it has in the runpaths | 21:23:27 |
Robbie Buxton | I’m fairly confident this is in fact runpaths and not rpaths but I might be mistaken | 21:23:47 |
Robbie Buxton | If you are able to add libnvrtc.so to that list and add it as a build input nix should atomically add it to the runpath for you | 21:25:02 |
Robbie Buxton | There may be a nicer way of doing this these days I’m not sure | 21:25:14 |
Robbie Buxton | I think there is patchelfFlagsArray and appendRunpaths you can use | 21:26:27 |