Seen when attempting to install .NET 5 on my raspberry pi.
Repro steps
dotnet new console --language F# && dotnet buildExpected behavior
Should compile without issue.
Actual behavior
Errors with the following message:
FSC : error FS0229: Error opening binary file '/home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll': Error reading/writing metadata for the F# compiled DLL '/home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll'. Was the DLL compiled with an earlier version of the F# compiler? (error: 'lookup_uniq in table istrings out of range, n = 16548, sizeof(tab) = 4565'). [/home/eirik/devel/test/test.fsproj]
FSC : error FS3160: Problem reading assembly '/home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll': The exception has been reported. This internal exception should now be caught at an error recovery point on the stack. Original message: Error opening binary file '/home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll': Error reading/writing metadata for the F# compiled DLL '/home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll'. Was the DLL compiled with an earlier version of the F# compiler? (error: 'lookup_uniq in table istrings out of range, n = 16548, sizeof(tab) = 4565').) [/home/eirik/devel/test/test.fsproj]
error FS0073 : internal error : BuildFrameworkTcImports: no successful import of /home/eirik/.nuget/packages/fsharp.core/5.0.0/lib/netstandard2.0/FSharp.Core.dll [/home/eirik/devel/test/test.fsproj]
I get the same error when I try to run dotnet fsi.
Known workarounds
None known.
Related information
I've ordered a pi, I will take a look tomorrow when I pick it up. If I can figure out how to work it :-)
Make sure to get some marionberry pie with it too, they're really good this time of year.
@cartermp , I doubt this is actually us, it's more like a Jit thing I expect, however ... we will need to prove it first.
Okay ...
I ordered my Raspberry pi from Amazon and conveniently I picked it up from WholeFoods, along with @cartermp 's recommended marionberry pie, which went down great with a cup of Tea.
I was able to repro this easily. Basically FSharp.Core assembly loading and reading doesn't work. I suspect the runtime given that FSharp.Core runtime loading is sort of a minimum bar for us but I will be in a position to start looking at this seriously tomorrow. I suppose we also need to figure out how ci arm emulation, I guess the runtime can point us towards that.
/cc @brettfo
FWIW the issue does not reproduce with the arm64 build.
This is a bug on arm32, here is the issue on the runtime repo: https://github.com/dotnet/runtime/issues/45250
Most helpful comment
Okay ...
I ordered my Raspberry pi from Amazon and conveniently I picked it up from WholeFoods, along with @cartermp 's recommended marionberry pie, which went down great with a cup of Tea.
I was able to repro this easily. Basically FSharp.Core assembly loading and reading doesn't work. I suspect the runtime given that FSharp.Core runtime loading is sort of a minimum bar for us but I will be in a position to start looking at this seriously tomorrow. I suppose we also need to figure out how ci arm emulation, I guess the runtime can point us towards that.
/cc @brettfo