Thefrank/dotnet-freebsd-native-binaries

FreeBSD running fsautocomplete

devosalain opened this issue · 5 comments

Error :
You must install or update .NET to run this application.

App: /usr/home/x/.dotnet/tools/fsautocomplete
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
7.0.0-rc.1.22426.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=freebsd.13-x64
HOST❌ /usr/home/x/Desktop:>fsautocomplete
You must install or update .NET to run this application.

App: /usr/home/x/.dotnet/tools/fsautocomplete
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '7.0.0' (x64)
.NET location: /usr/share/dotnet

The following frameworks were found:
7.0.0-rc.1.22426.10 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=7.0.0&arch=x64&rid=freebsd.13-x64

I am not familiar with that tool's usage but it might have a similar solution: #2 (comment)

Alternatively, you might want to try a newer version of the SDK. I have been pretty slow on native builds but https://github.com/sec/dotnet-core-freebsd-source-build/ does a good job of being on top of native builds. If you want to try something built by me https://github.com/Thefrank/dotnet-freebsd-crossbuild/ are built under Linux using the official docker containers from Microsoft, but they target an older FreeBSD ABI (12)

I cloned "https://github.com/sec/dotnet-core-freebsd-source-build.git"
And did :
Run as root install_tools.sh
init.sh
build_runtime.sh
But build_runtime.sh fails with

Restored /usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/coreclr/tools/r2rdump/R2RDump.csproj (in 35,98 sec).
  Restored /usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj (in 38,53 sec).

Build FAILED.

/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/.packages/microsoft.dotnet.arcade.sdk/6.0.0-beta.22512.3/tools/Tools.proj : warning NU1504: Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: Microsoft.DotNet.Build.Tasks.Feed 6.0.0-beta.22512.3, Microsoft.DotNet.Build.Tasks.Feed 6.0.0-beta.22512.3.
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj : error NU1603: System.Runtime.CompilerServices.Unsafe depends on runtime.freebsd-x64.Microsoft.NETCore.ILAsm (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.ILAsm 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.ILAsm 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/System.Runtime.CompilerServices.Unsafe/src/System.Runtime.CompilerServices.Unsafe.ilproj : error NU1603: System.Runtime.CompilerServices.Unsafe depends on runtime.freebsd-x64.Microsoft.NETCore.ILDAsm (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.ILDAsm 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.ILDAsm 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILTestAssembly.ilproj : error NU1603: ILTestAssembly depends on runtime.freebsd-x64.Microsoft.NETCore.ILAsm (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.ILAsm 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.ILAsm 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/coreclr/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/ILTestAssembly.ilproj : error NU1603: ILTestAssembly depends on runtime.freebsd-x64.Microsoft.NETCore.ILDAsm (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.ILDAsm 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.ILDAsm 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1603: Microsoft.NETCore.DotNetAppHost 6.0.0-rc.1.21415.6 depends on runtime.freebsd-x64.Microsoft.NETCore.DotNetAppHost (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.DotNetAppHost 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.DotNetAppHost 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1603: Microsoft.NETCore.DotNetHost 6.0.0-rc.1.21415.6 depends on runtime.freebsd-x64.Microsoft.NETCore.DotNetHost (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.DotNetHost 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.DotNetHost 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1603: Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 depends on runtime.freebsd-x64.Microsoft.NETCore.DotNetHostPolicy (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1603: Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21415.6 depends on runtime.freebsd-x64.Microsoft.NETCore.DotNetHostResolver (>= 6.0.0-rc.1.21415.6) but runtime.freebsd-x64.Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21415.6 was not found. An approximate best match of runtime.freebsd-x64.Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21451.13 was resolved. [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605: Detected package downgrade: Microsoft.NETCore.DotNetHostResolver from 6.0.0-rc.1.21451.13 to 6.0.0-rc.1.21415.6. Reference the package directly from the project to select a different version.  [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605:  externals -> Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 -> runtime.freebsd-x64.Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21451.13 -> Microsoft.NETCore.DotNetHostResolver (>= 6.0.0-rc.1.21451.13)  [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605:  externals -> Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 -> Microsoft.NETCore.DotNetHostResolver (>= 6.0.0-rc.1.21415.6) [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605: Detected package downgrade: Microsoft.NETCore.DotNetAppHost from 6.0.0-rc.1.21451.13 to 6.0.0-rc.1.21415.6. Reference the package directly from the project to select a different version.  [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605:  externals -> Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 -> Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21415.6 -> runtime.freebsd-x64.Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21451.13 -> Microsoft.NETCore.DotNetAppHost (>= 6.0.0-rc.1.21451.13)  [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/src/libraries/externals.csproj : error NU1605:  externals -> Microsoft.NETCore.DotNetHostPolicy 6.0.0-rc.1.21415.6 -> Microsoft.NETCore.DotNetHostResolver 6.0.0-rc.1.21415.6 -> Microsoft.NETCore.DotNetAppHost (>= 6.0.0-rc.1.21415.6) [/usr/home/x/test2/dotnet-core-freebsd-source-build/runtime/Build.proj]
    1 Warning(s)
    10 Error(s)

Time Elapsed 00:01:33.83
Build failed with exit code 1. Check errors above.
##vso[task.complete result=Failed;]msbuild execution failed.

Double check that those packages are available to the build. It looks like it wants 6.0.0-rc.1.21451.13 but only 6.0.0-rc.1.21415.6 was found.

@devosalain Did that resolve the issue?

Closing. This is likely an upstream issue with most tools/projects not being aware of FreeBSD :(