| 15 Dec 2025 |
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 |
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 |