| 15 Dec 2025 |
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 |
Ari Lotter | 40m to build torch with cuda, not bad. | 22:06:33 |
Ari Lotter | huh. well, i thought
(self: super: {
cudaPackages = super.cudaPackages // {
cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
postFixup = (old.postFixup or "") + ''
for so in $out/lib/libcudnn*.so; do
echo "patching rpath of $so to include nvrtc"
patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
done
'';
});
};
})
``` might work, but doesn't seem to have
| 22:09:01 |
Ari Lotter | * huh. well, i thought
(self: super: {
cudaPackages = super.cudaPackages // {
cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
postFixup = (old.postFixup or "") + ''
for so in $out/lib/libcudnn*.so; do
echo "patching rpath of $so to include nvrtc"
patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
done
'';
});
};
})
``` might work, but doesn't seem to have
| 22:09:09 |
Ari Lotter | * huh. well, i thought
(self: super: {
cudaPackages = super.cudaPackages // {
cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
postFixup = (old.postFixup or "") + ''
for so in $out/lib/libcudnn*.so; do
echo "patching rpath of $so to include nvrtc"
patchelf --set-rpath ${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:$out/lib $so
done
'';
});
};
})
might work, but doesn't seem to have
| 22:09:16 |
Ari Lotter | tryin this | 22:10:57 |
Robbie Buxton | In reply to @arilotter:matrix.org 40m to build torch with cuda, not bad. The dream | 22:13:45 |
Robbie Buxton | * The dream 🥲 | 22:13:54 |
Ari Lotter | lmk if you ever need something built lol i have some juicy machines thru work | 22:15:36 |
pdealbera | Ok, following on this. It's weird that I've still cannot reach the server at all. I even try to connect from mobile data in a phone just to discard a problem in my home network or network config in my PC but it's not reachable at all. For reference I'm from Argentina. | 22:34:43 |
| 16 Dec 2025 |
Ari Lotter | holy shit it worked 😭i don't believe it | 00:39:07 |
Robbie Buxton | Yooooooooo | 00:39:29 |
Robbie Buxton | Nice work!!! | 00:39:33 |
Ari Lotter | ok will PR soon - doing some christmas baking but this is huge lol | 00:39:39 |
Ari Lotter | mmaybe tomorrow | 00:39:42 |
Ari Lotter | this ez tho:
cudnn = super.cudaPackages.cudnn.overrideAttrs (old: {
buildInputs = (old.buildInputs or []) ++ [ super.cudaPackages.cuda_nvrtc ];
patchelfFlagsArray = (old.patchelfFlagsArray or []) ++ [
"--set-rpath" "${super.lib.getLib super.cudaPackages.cuda_nvrtc}/lib:\$ORIGIN"
];
});
| 00:39:51 |
Robbie Buxton | Now I won’t run into this issue in a week 😁 | 00:40:02 |
yorik.sar | Well, as for any locks, I expect a slowdown, that’s why I’m asking about less parallel case :) | 05:08:40 |