-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to build this repo from scratch on Banana Unix? #5171
Comments
@jasonwilliams200OK why is internet a problem? |
@blackdwarf, if there is a dependency on native binary and the source is available, we can essentially build on [m]any platforms. Besides, if "build everything from source" is also an option (in addition to packaged binaries), that will make things more simpler for us and new platform outreach would be easier for dotnet maintainers as well IMVHO. |
There's only a single native thing in the CLI (for the managed codez) and that's corhost. It's the native CLR host (https://github.com/dotnet/cli/tree/rel/1.0.0/src/corehost) |
@davidfowl, thanks. I am able to build corehost by running |
2 questions:
|
The corehost part already builds on NetBSD:
|
I was just highlighting that the project builds on FreeBSD with mono and PCL assemblies installed.
I have just compiled CoreCRL on FreeBSD and NetBSD, then compiled CoreFX managed assemblies on Windows for these paltforms, scp'd over to VMs and ran tests. On FreeBSD, running the tests is throwing assertions. If we get CLI building with confirmed RIDs etc., it would be easier for us to make progress (exempting the part where we need Windows machine to cross-compile managed assemblies for these targets) |
@jasonwilliams200OK Can you run tests / managed code on NetBSD? |
@krytarowski, I haven't built CoreFX assemblies for NetBSD targets yet. It takes about ~20 minutes to cross-compile those assemblies for FreeBSD on Windows. The entire size of corefx/bin folder that I copied over to FreeBSD VM was 7GB (FreeBSD_Debug target) |
Keep us posted on the progress of trying it out. |
This issue is not tracking the progress of CoreFX build in particular, but it is focusing on steps required to build this repo from scratch on a new platform. |
@blackdwarf For example, net access is not allowed from the build hosts on Debian during a package build. |
/cc @bleroy |
In case anyone is curious, https://github.com/dotnet/source-build/ is where this effort - building all of .NET Core on a particular *nix distro - is being handled. |
Does it handle NetBSD? |
Honestly, no idea. But if you want to contribute patches, that would be the right place. |
I am currently working on dotnet/runtime#55803 to add .NET support to Haiku and facing the same problem. The process to cross-compile CoreCLR (dotnet/runtime) is quite straightforward, but it is not for this repo. I did manage to get a working .NET SDK on Haiku, but it involves manually editing the RID (from What is the correct way to cross-compile this repo? It is not clearly documented in the developer guide. |
@uweigand @janani66 : can you share your cross-build scripts publicly? Maybe @trungnt2910 can use them to cross-building the entire SDK for this new platform? |
@trungnt2910 Here is blog describing how we cross build dotnet on x86 for power and here are scripts uploaded. Check if this helps you |
Thanks for the guide, but the problem I'm dealing with is entirely different (different OS, same architecture, instead of same OS (Linux), different architecture). I tried:
because of this: sdk/src/Layout/redist/targets/GetRuntimeInformation.targets Lines 6 to 9 in 86db944
but still got |
ohh.. seems some other issue. I did not face this. |
The current .NET SDK build procedure uses some files, namely To cross compile the SDK for Haiku, I had to replace the hard coded .NET runtime version with the one I recently built. I also had to replace the runtime identifier from It would be nice if |
There is also a scarcely documented source-build mode, but this mode does not seem to create enough files for the SDK to function. It seems to be related to the source build feature, which currently only supports Linux. |
Most actual building of an SDK for any OS should happen in the dotnet/installer repo, or in the dotnet/dotnet repo for .NET 9+. That's where all of the actual bundle construction occurs - this repo is focused on the logic of the SDK specifically. |
Suppose there exists a Banana Unix OS (e.g. some BSD or Solaris like).
On such an OS, how do we build this project fully offline, such that it does not rely on anything from the internet during the build?
Are there required components to build CLI project, which haven't been open sourced yet to accomplish this task? If there are, can we expect them to land on GitHub soon?
Before dotnet/cli (in dnx days), we were able to build most of the CoreFX assemblies on FreeBSD and even configured the test runner to work for the successfully built assemblies. Now CLI is a required dependency, we can't build it on FreeBSD nor NetBSD.
Refs: https://github.com/dotnet/corefx/issues/1626, https://github.com/dotnet/coreclr/issues/1633 and https://github.com/dotnet/coreclr/issues/3178
cc @ghuntley, @josteink, @krytarowski and @akoeplinger
The text was updated successfully, but these errors were encountered: