sec / dotnet-core-freebsd-source-build

Collection of script to build .NET Core under FreeBSD OS (with binary releases)
MIT License
53 stars 4 forks source link

Installation using pkg install #32

Closed rhubarb-geek-nz closed 2 months ago

rhubarb-geek-nz commented 2 months ago

Hi,

Your readme says you can install with "pkg install", is dotnet available as a set of binary packages?

I couldn't find any so I have repackaged the current release consistent with the linux package naming.

Well done on the good work, with your sdk I have successfully built and tested a dotnet Interop driver for SQLLite.

Thanks,

sec commented 2 months ago

Hi, Yes, for some time we have a port done and also pkg binaries are available.

rhubarb-geek-nz commented 2 months ago

It is not obvious how to install them.

root@generic:~ # pkg install dotnet
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'dotnet' have been found in the repositories
root@generic:~ # pkg install lang/dotnet
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'lang/dotnet' have been found in the repositories

Do I have to add a package repository, and is lang/dotnet the entire SDK or just the runtime?

sec commented 2 months ago

That's weird. Are you on aarch64 by any chance? There were pkg available, but I saw @arrowd marked them as broken, becuase of the build issues that sometime occur. But on x64 you should be able to install.

arrowd commented 2 months ago

The table at the https://www.freshports.org/lang/dotnet/ page show that packages are available for amd64 only. The aarch64 package is indeed missing due to crossgen issues.

rhubarb-geek-nz commented 2 months ago

Thanks for the quick response. Yes I am on aarch64, I will try amd64 tonight.

Is this a monolithic single package SDK for 8.0 only?

The standard packaging permits installing the runtime only, and having multiple different SDKs and runtimes, eg 6.0, 7.0,8.0 and soon 9.0 all on the same machine.

Likewise, a PowerShell 7.4 package should only need to depend on the dotnet-runtime-8.0, and a PowerShell 7.2 would depend on dotnet-runtime-6.0

In much the same manner as you can have multiple Java JRE and JDK for different versions installed side by side.

The difference with dotnet is that dotnet-host matches the appropriate dotnet-hostfxr-X.Y to execute programs.

arrowd commented 2 months ago

This makes sense, but I don't have much time for the .NET port. The split you're talking about can be easily implemented with the new feature called "subpackages", but unfortunately it stalled at the very end of its developement and can't be used right away. So for now we'll have to live with a single .NET megapackage.

rhubarb-geek-nz commented 2 months ago

Thanks, the x64 installation worked first time!