Nix + dotnet | 126 Members | |
| 24 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Dec 2024 | ||
| although I wouldn't put effort into it initially since the amount of packages that use NativeAOT in nixpkgs is small from my knowledge | 00:17:14 | |
| DirectPInvoke? cant say ive heard of that before | 00:18:54 | |
In reply to @gggkiller:matrix.orgthat's what I mean yes but then how would you do anything custom with patchcil from nix | 00:20:03 | |
| like add a required native dependency to a cil assembly | 00:20:17 | |
| like you would with patchelf --add-needed | 00:20:45 | |
In reply to @emma:rory.gayhttps://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/interop#direct-pinvoke-calls | 00:21:24 | |
| this looks like codegen for dllimport? | 00:23:34 | |
| it makes dllimport use standard dynamic/static linking instead dlopen-ing at runtime | 00:25:39 | |
| so unless you do that, patchelf wont see the dependencies in naot binaries | 00:26:02 | |
| i see | 00:28:22 | |
same way you do with autoPatchelfHook, add it to runtimeDeps | 02:16:11 | |
then it'll add it to every single assembly (or ELF in case of autoPatchelfHook) | 02:16:29 | |
| if you've chosen NativeAOT then you're in for the headache imo | 02:16:51 | |
| Redacted or Malformed Event | 05:04:30 | |
got some progress done on patchcil 6pak: | 05:04:31 | |
* got some progress done on patchcil 6pak | 05:04:35 | |
| a more compact output:
| 05:06:52 | |
| I'll work on it further tomorrow but that's enough for today | 05:18:39 | |
| 19:23:03 | ||
6pak: currently considering what the CLI UX should be for setting the search paths, because it'll modify the DllImports and CIL has no concept of RPATH (although the DllImports can stand in for NT_NEEDED) | 19:44:35 | |
was thinking of doing something like patchcil --set-library-path libX11.so:/nix/store/nicg80r560lxr1vzlrjcj401v98fwb7y-libX11-1.8.10/lib/libX11.so.6 | 19:45:11 | |
(for the non-autoPatchcilHook interface) | 19:45:29 | |
In reply to @gggkiller:matrix.orgbut with autoPatchelfHook you can do --add-needed in postFixup | 19:51:40 | |
In reply to @gggkiller:matrix.orgI had the same when playing around before | 19:52:06 | |
Download image.png | 19:52:10 | |
don't you mean preFixup or fixupPhase? because autoPatchelfHook runs in postFixup | 19:52:55 | |
| I think both work but you should do it in postFixup for some ugly reason, don't remember exactly | 19:53:37 | |
In reply to @gggkiller:matrix.orgwe could emulate RPATH with a custom DllImportResolver | 19:56:21 | |
| and I think keeping the interface as close as possible to patchelf is the way to go | 19:56:57 | |
I feel like it'd be better to just modify the DllImport themselves since we already have them on hand | 19:57:00 | |