Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Runtime ID for FreeBSD 12 #30777

Closed
jasonpugsley opened this issue Sep 6, 2019 · 7 comments
Closed

Add Runtime ID for FreeBSD 12 #30777

jasonpugsley opened this issue Sep 6, 2019 · 7 comments

Comments

@jasonpugsley
Copy link
Contributor

I have successfully built dotnet 3.0 preview6, 8 and just now 9 from source (preview8 was released before I got around to 7) on FreeBSD 12 and I would like to see it added to the source along with the existing 11.x RIDs. I'm just not sure how to do this correctly.

I don't know if FreeBSD 11 and 12 are ABI compatible so I don't know what the RID-graph should look like. Any help would be appreciated.

Kudos to everyone who has helped get the FreeBSD runtime working. It seems like it's ready to be added to the automated build system. I know there are gaps that still need to be filled to get a fully useful FreeBSD runtime, but automated builds would be a great incentive to get people working on all the PlatformNotSupportedException's

Also, I understand it can't be in the 3.0 release but I would love to hear something at .NET Conf about FreeBSD in 3.1 or 5.

@sec
Copy link
Contributor

sec commented Sep 19, 2019

@jasonpugsley would you mind to share how did you managed to build 3.0 from source? did you followed instructions from wiki and/or you made some changes to make it build?

@wfurt
Copy link
Member

wfurt commented Sep 19, 2019

discussion is here: dotnet/source-build#1139

@jasonpugsley
Copy link
Contributor Author

jasonpugsley commented Sep 21, 2019

@sec Sorry I’m travelling at the moment so I’m not able to write up a full response just yet.
In short I followed the bootstrap instructions in the source-build repo and put together a preview6 build with a Linux seed and the shared components built on windows. I then used p6 to build p8, then p8 to build p9 and rc1. p9 and rc1 are configured to build with p6 or p7 but I change global.json to use p8 as it's my first fully native build so it just seems right :)

Just to be clear, from preview8 onwards I built each repo entirely on FreeBSD 12 with only minor modifications. coreclr, corefx, core-setup and finally core-sdk.
I have also built cli but I don’t think that’s actually necessary as there aren’t any native parts. I have also built most of diagnostics with a working lldb plug-in.

I think a good deal of praise should go to those who converted most of the repos to using arcade as this has made it much easier for me to get it all working. And of course thanks to those working on the BSD specific parts.

Each release has required fewer changes on my part to build each repo which is why I think the process could be automated on a FreeBSD VM quite easily.

If it would still be useful I could try to find some time to write up the details of the steps I’m using one day this coming week.

@jasonpugsley
Copy link
Contributor Author

Better late than never.
https://github.com/jasonpugsley/core-sdk/wiki/.Net-Core-3.0.0-for-FreeBSD-12

I'm still not sure whether FreeBSD 11 & 12 should be separate or not. I would need a FreeBSD expert to weigh in on best practices with ABI differences and forward compatibility from 11 to 12.

My work above is solely on 12 though.

@jasonpugsley
Copy link
Contributor Author

jasonpugsley commented Oct 17, 2019

In line with the PR that @wfurt has created above, I went back and redid my builds on FreeBSD 11 using the same RID graph as the PR.

I can report that I have successfully built on 11 and the generated 3.0.0 SDK runs without issue on 11 and 12 as well as the following version of FreeBSD 13 released on October 11.
FreeBSD-13.0-CURRENT-amd64-20191011-r353427-disc1.iso

jpugsley@freebsd13:~/dotnet-sdk $ ./dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100
 Commit:    04339c3a26

Runtime Environment:
 OS Name:     FreeBSD
 OS Version:  13
 OS Platform: FreeBSD
 RID:         freebsd.13-x64
 Base Path:   /usr/home/jpugsley/dotnet-sdk/sdk/3.0.100/

Host (useful for support):
  Version: 3.0.0
  Commit:  7d57652f33

.NET Core SDKs installed:
  3.0.100 [/usr/home/jpugsley/dotnet-sdk/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 3.0.0 [/usr/home/jpugsley/dotnet-sdk/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
jpugsley@freebsd13:~/dotnet-sdk $ cd
jpugsley@freebsd13:~ $ mkdir test
jpugsley@freebsd13:~ $ cd test
jpugsley@freebsd13:~/test $ ~/dotnet-sdk/dotnet new console -o myApp

Welcome to .NET Core 3.0!
---------------------
SDK Version: 3.0.100

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
Getting ready...
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on myApp/myApp.csproj...
  Restore completed in 122.83 ms for /usr/home/jpugsley/test/myApp/myApp.csproj.

Restore succeeded.

jpugsley@freebsd13:~/test $ cd myApp
jpugsley@freebsd13:~/test/myApp $ ~/dotnet-sdk/dotnet run
Hello World!
jpugsley@freebsd13:~/test/myApp $

Thank you @wfurt. Please close this issue as you see fit.
Jason

@jasonpugsley
Copy link
Contributor Author

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 5.0 milestone Feb 1, 2020
@nefh
Copy link

nefh commented Sep 4, 2020

@jasonpugsley Hi! Thanks for your dotnet FreeBSD guide. I have followed this: https://github.com/jasonpugsley/core-sdk/wiki/.NET-Core-3.1.103-for-FreeBSD on clean 12.1 jail. However I end up with HRESULT: 0x8007001F error.

/usr/share/dotnet # ./dotnet --info
Failed to create CoreCLR, HRESULT: 0x8007001F

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.103 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

I have found info ( #34708 (comment)) that this error might be related to values vm.stats.vm.v_wire_count and vm.max_wired but even increasing the latter one over the first one did not solved it.

NuGet.Config:

cat ~/.nuget/NuGet/NuGet.Config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="local_pkgs" value="/root/dotnet_pkgs_3.1.103" />
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>

Yours *.nupkg are directly in /root/dotnet_pkgs_3.1.103

Do you have any advice? Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants