-
Hey folks, I'm searching for dotnet on FreeBSD, I found some issues related to that but something isn't clear to me what is missing for dotnet to be completely compatible with FreeBSD (and when a version is released is to be released for FreeBSD too) |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
There are no Microsoft-maintained FreeBSD builds. There is, now, however https://www.freshports.org/lang/dotnet/ In theory, it should be accessible with just |
Beta Was this translation helpful? Give feedback.
-
FreeBSD is a community supported platform in .NET. You can install it from ports which @neon-sunset pointed out. It uses the same source-build approach as linux distros (https://github.com/dotnet/dotnet). If you run into a problem, like for any platform, open an issue in runtime repo (existing issues: https://github.com/dotnet/runtime/issues?q=is:issue+label:os-freebsd).
@Thefrank may have a better answer, but it is usable as-is and has been for a while. Last time I tried compiling basic apps, dotnet(1) was working fine on FreeBSD host as well as dotnet(1) for linux was working under Linuxulator (by disabling W^X). Haven't tried in a while so YMMV. |
Beta Was this translation helpful? Give feedback.
-
Depending on how you see "completely compatible" either nothing at all or so many interlocking things that this topic would quickly expand far beyond the question. As @am11 said the @lillo42 I hope that clears things up without getting too complicated! |
Beta Was this translation helpful? Give feedback.
-
EDIT: This should've been a reply to @am11 above but it turns out I can't click the right button to post replies correctly https://github.com/freebsd/freebsd-ports/blob/698eadbe278c0e8c50da6082994e16bb4910a398/lang/dotnet/Makefile#L99 Looping the script found in the second comment, I have not been able to reproduce the issue on FreeBSD 14. For libunwind 1.8 I still had ASLR off system-wide on my build system as I was sometimes hitting crashes. The current libunwind on FreeBSD is 20240221 which is 1.8.1 and the one used for the test just now. I try something more complex with AZP and some dotnet builds a bit later and edit this with an update EDIT: neither the newest versions of jellyfin nor azure-pipelines-agents experienced crashes during the building or testing process. Maybe it was |
Beta Was this translation helpful? Give feedback.
Depending on how you see "completely compatible" either nothing at all or so many interlocking things that this topic would quickly expand far beyond the question.
As @am11 said the
dotnet
in FreeBSD's ports is usable right now for basic needs. You will need to turn off the ASLR flag for any binaries you generate with it (elfctl -e NAME
). If you want to do serious development with it for/on FreeBSD and want to use anything more than the SDK (e.g., usingdotnet tool ...
) you will run into typical THING-is-supported-by-the-community limitations as developers are hesitant to build for/support a platform that is not officia…