Open anpin opened 8 months ago
it is indeed fixed by your PR. thank you!
This issue still exists, as #267743 was never merged.
fsharpplay> /build/tmp.6VlXKrGn82/.nuget/packages/fsharp.core/8.0.101/lib/netstandard2.1/FSharp.Core.dll : warning IL3053: Assembly 'FSharp.Core' produced AOT analysis warnings. [/build/j24rjwk5qbi969kxj17707zx0gjjvnvj-source/fsharpaot.fsproj]
fsharpplay> /build/tmp.6VlXKrGn82/.nuget/packages/fsharp.core/8.0.101/lib/netstandard2.1/FSharp.Core.dll : warning IL2104: Assembly 'FSharp.Core' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/build/j24rjwk5qbi969kxj17707zx0gjjvnvj-source/fsharpaot.fsproj]
fsharpplay> EXEC : error : Unable to load shared library 'jitinterface_x64' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: [/build/j24rjwk5qbi969kxj17707zx0gjjvnvj-source/fsharpaot.fsproj]
fsharpplay> jitinterface_x64.so: cannot open shared object file: No such file or directory
fsharpplay> libjitinterface_x64.so: cannot open shared object file: No such file or directory
fsharpplay> jitinterface_x64: cannot open shared object file: No such file or directory
fsharpplay> libjitinterface_x64: cannot open shared object file: No such file or directory
fsharpplay> System.DllNotFoundException: Unable to load shared library 'jitinterface_x64' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
I'm pretty sure it works for me. Can you try to generate nugetDeps
files using something like this:
dotnet restore some.fsproj --packages packages -p:PublishNativeAot=True -r:linux-x64
nuget-to-nix packages > deps.nix
That's a different restore than I was using, but it doesn't make a difference. Unless I use #267743 the build fails. Here's my reproducer repo: https://codeberg.org/adamcstephens/fsharpplay
I might be using the PR then. Would have to check later. On Tue, Feb 13, 2024 at 2:20 PM, Adam C. Stephens @.***> wrote:
That's a different restore than I was using, but it doesn't make a difference. Unless I use #267743 the build fails. Here's my reproducer repo: https://codeberg.org/adamcstephens/fsharpplay
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I opened https://github.com/NixOS/nixpkgs/pull/306161 standalone to see if we can move this forward without the tests.
If anyone has an example of a package in nixpkgs that could benefit from AOT, that would be useful too.
Describe the bug
If a dotnet project contains
<PublishAot>true</PublishAot>
dotnetInstallHook
fails withSteps To Reproduce
nix build github:anpin/dotnet-aot-on-nix#noFix
Expected behavior
Build succeeds
Additional context
The libraries required for publishing are distributed via
microsoft.netcore.app.crossgen2.linux-x64
andruntime.linux-x64.microsoft.dotnet.ilcompiler
(at least for thex86_64-linux
), so adding these paths toLD_LIBRARY_PATH
resolves the issue. You can runnix build github:anpin/dotnet-aot-on-nix
which would include following snippet. However the build would fail anyway due to the upstream issue which can be reproduced on other linux distributions https://github.com/dotnet/sdk/issues/37995Notify maintainers
@NixOS/dotnet
Metadata
Add a :+1: reaction to issues you find important.