You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be easily accessible instructions for building .NET 6.0 from source in the dotnet/installer readme.
The instructions should address everything you need to build .NET from source, including dependencies. Ideally, this would be something we can point Linux distros and package maintainers to for instructions on how to build .NET for their distro.
From my point of view, as a maintain for .NET in Fedora, a doc that covers the following would be useful to have:
Where can I find the latest releases?
Where can I find the source code for latest releases?
How do I build those releases? What dependencies are required?
Can I bootstrap .NET (so it doesn't download anything at build time but only uses things I have already on disk)? If so, how?
What architectures can I build .NET on? How do I do that for anything non-x64?
What are the suggested packages names and their contents? What should the dependencies between packages look like? (Distros are free to deviate, but source-build can make suggestions).
@omajid That's pretty much what I would ask for, thanks for making this list. Speaking from past experience, compatibility with nspawn and capability needs (if any) would be nice to have as well, this was troublesome in the 2.x era. And the dependency version information as well, minimum and/or maximum version, like how the current dotnet releases don't work with lttng-ust >= 2.13.0.
Also what about OS'es that are not supported atm? Like for example, FreeBSD, we're able to crosscompile working SDK, then native build SDK using that as bootstrap - would it be possible to use the same path using source-build? I've tried that, but at some stage it was missing runtime's nupkg specific for FreeBSD - any info how to also include those into tarball for offline build would be nice for ex. :)
FYI, I tried building 6.0 using the instructions on the installer repository, and it fails during the runtime compilation, the errors seem to stem from error MSB4018: System.MissingMethodException: Method not found: 'Int32 Microsoft.CodeAnalysis.ISymbol.get_MetadataToken()'.
@omajid I see you ran into this before, I'll try disabling package validation like you did.
Disabling package validation allowed it to progress further, but it still crashed after an hour and a half of compilation... Segfault while building aspnetcore. @omajid can you get past aspnetcore on fedora?
On Fedora 34, the build works end to end. On 35, my builds are hanging (not crashing, just hanging) while trying to build aspnetcore. The actual hang appears to be in the crossgen process.
@omajid Oh well, our clang was updated to 13 yesterday, which caused a lot of build errors in the runtime. Unlike what the readme seems to indicate, EXTRA_CFLAGS are not respected at all and I had to patch quite a few CMake files to add the various -Wno- flags.
Now I'm faced with the same error as you, it hangs on aspnetcore, and I'm pretty sure the only difference compared to the day before yesterday is the clang update. I see you have a clang12 package in fedora 35, did you try building with that one?
Edit: Going back to clang 12 gets past the aspnetcore hang indeed.
dotnet/runtime#61442 should fix the -Werror issues. It was a release oversight, I think.
Thanks for the tip on clang 12 vs 13. Looking at Fedora 35, we have a compatiblity package for clang 12 - there are libraries, but not the actual compiler itself. I am going to build llvm/clang 12 from source and see if that works.
Excuse me, looks like a typo - the link is to the tag/v6.0.100, but the text is 6.0.101. 101 is inaccessible without credentials:
Username for 'https://dev.azure.com':
Password for 'https://dev.azure.com':
@DmitryJustDmitry, thanks for providing that essential piece of information! With version 6.0.101 I got stuck on the missing credentials as described in #2719 (comment), but with version 6.0.100 everything builds successfully and I've managed to submit Homebrew/homebrew-core#92991 to Homebrew.
AFAIK, the 6.0.101 release accidentally included some non-public URLs (it wasn't really accidental, it was just a bit-by-bit copy of how the internal builds are done, I think). It might be worth trying to apply dotnet/installer#12852 on the local checkout of 6.0.101 to see if that fixes it.
Coming back to this, I think we should update dotnet/installer's readme to point to the dotnet/source-build readme for instructions on how to build source build. The installer readme's instructions aren't the most up-to-date. Either that or we should move all the instructions to installer and point to them from source-build. The current set of instructions we have are different between the repos. This goes for main and supported release/6.0.xxx branches.
Activity
omajid commentedon Nov 3, 2021
Hey, @alucryd @loqs @cerebrate @directhex , what documentation would you find helpful?
From my point of view, as a maintain for .NET in Fedora, a doc that covers the following would be useful to have:
alucryd commentedon Nov 5, 2021
@omajid That's pretty much what I would ask for, thanks for making this list. Speaking from past experience, compatibility with nspawn and capability needs (if any) would be nice to have as well, this was troublesome in the 2.x era. And the dependency version information as well, minimum and/or maximum version, like how the current dotnet releases don't work with lttng-ust >= 2.13.0.
sec commentedon Nov 5, 2021
Also what about OS'es that are not supported atm? Like for example, FreeBSD, we're able to crosscompile working SDK, then native build SDK using that as bootstrap - would it be possible to use the same path using source-build? I've tried that, but at some stage it was missing runtime's nupkg specific for FreeBSD - any info how to also include those into tarball for offline build would be nice for ex. :)
alucryd commentedon Nov 12, 2021
FYI, I tried building 6.0 using the instructions on the installer repository, and it fails during the runtime compilation, the errors seem to stem from
error MSB4018: System.MissingMethodException: Method not found: 'Int32 Microsoft.CodeAnalysis.ISymbol.get_MetadataToken()'.@omajid I see you ran into this before, I'll try disabling package validation like you did.
alucryd commentedon Nov 12, 2021
Disabling package validation allowed it to progress further, but it still crashed after an hour and a half of compilation... Segfault while building aspnetcore. @omajid can you get past aspnetcore on fedora?
omajid commentedon Nov 12, 2021
On Fedora 34, the build works end to end. On 35, my builds are hanging (not crashing, just hanging) while trying to build aspnetcore. The actual hang appears to be in the crossgen process.
alucryd commentedon Nov 12, 2021
Got it. What versions of lttng-ust do you have on 34 vs 35? Wondering if that's the culprit, I'll try to create a lttng-ust2.12 compat package here.
Edit: Nevermind, looked it up on repology. Looks like even using 2.12.2 might not cut it, I'll start with 2.12.0.
omajid commentedon Nov 12, 2021
Fedora 34 is lttng-ust-2.12.0-4.fc34.x86_64. Fedora 35 is lttng-ust-2.12.2-5.fc35.x86_64.
If it's really lttng, perhaps a
export COMPlus_LTTng=0will workaround the issue? It disables loading lttng at runtime.8 remaining items
alucryd commentedon Nov 12, 2021
Meh, that's too bad. Do you have a way to force lttng-ust to 2.12.0 on 35?
The build succeeded with 2.12.0 here, I'll give 2.12.2 a try later then so we can confirm whether it's the culprit.
alucryd commentedon Nov 14, 2021
@omajid Oh well, our clang was updated to 13 yesterday, which caused a lot of build errors in the runtime. Unlike what the readme seems to indicate,
EXTRA_CFLAGSare not respected at all and I had to patch quite a few CMake files to add the various-Wno-flags.Now I'm faced with the same error as you, it hangs on aspnetcore, and I'm pretty sure the only difference compared to the day before yesterday is the clang update. I see you have a clang12 package in fedora 35, did you try building with that one?
Edit: Going back to clang 12 gets past the aspnetcore hang indeed.
omajid commentedon Nov 15, 2021
Thanks for the pointers, @alucryd !
dotnet/runtime#61442 should fix the
-Werrorissues. It was a release oversight, I think.Thanks for the tip on clang 12 vs 13. Looking at Fedora 35, we have a compatiblity package for clang 12 - there are libraries, but not the actual compiler itself. I am going to build llvm/clang 12 from source and see if that works.
DmitryJustDmitry commentedon Jan 11, 2022
Excuse me, looks like a typo - the link is to the tag/v6.0.100, but the text is 6.0.101. 101 is inaccessible without credentials:
asbjornu commentedon Jan 12, 2022
@DmitryJustDmitry, thanks for providing that essential piece of information! With version
6.0.101I got stuck on the missing credentials as described in #2719 (comment), but with version6.0.100everything builds successfully and I've managed to submit Homebrew/homebrew-core#92991 to Homebrew.omajid commentedon Jan 12, 2022
AFAIK, the 6.0.101 release accidentally included some non-public URLs (it wasn't really accidental, it was just a bit-by-bit copy of how the internal builds are done, I think). It might be worth trying to apply dotnet/installer#12852 on the local checkout of 6.0.101 to see if that fixes it.
asbjornu commentedon Jan 12, 2022
@omajid, thanks, but if
6.0.100passes, I think we'll just await a new public release that works without any patches applied.asbjornu commentedon Jan 13, 2022
Alas,
6.0.100does not work either. As I write in #2719 (comment), thenuget-clientstep fails. 😕[-].NET 6.0 Source-build instructions[/-][+].NET Source-build instructions[/+]lbussell commentedon Jun 21, 2022
Coming back to this, I think we should update dotnet/installer's readme to point to the dotnet/source-build readme for instructions on how to build source build. The installer readme's instructions aren't the most up-to-date. Either that or we should move all the instructions to installer and point to them from source-build. The current set of instructions we have are different between the repos. This goes for
mainand supportedrelease/6.0.xxxbranches.