HomeFreeBSD

Actually update the newly created port lang/mono6.8 to 6.8.

Description

Actually update the newly created port lang/mono6.8 to 6.8.

This port is a WIP. It compiles and packages on both amd64 and powerpc64.
However, the ports depending on it do *not*. I will continue working on
this. Because of this, assign maintainership to myself in the meantime.

This corresponds to the most recent patches in D23300 except with fixes
to the OPTIONS handling by myself.

Submitted by: prj_rootwyrm.com
Differential Revision: D23300

Details

Event Timeline

We tested this patch, the mono runtime seems to work fine to run existing applications, however there are missing build tools. We are among the many people using mono as a development environment using the tools included in the mono package (msbuild, the csharp interactive interpreter etc...). To be specific, the exact error we got when trying to build a csharp application was that the folder /usr/local/lib/mono/msbuild/15.0/bin/Roslyn/ is missing - along with all the files this folder is supposed to contain.

I am not 100% sure that the msbuild folder is 15.0: it may have been 16.0 or something else since I do not have this testing environment available right now, however the important point is that the msbuild folder was there and contained all the needed dlls and target files. The only issue was that the Roslyn folder was missing, which made it impossible to compile csharp applications.

Is there something we can do to help move this work forward?

Is there something we can do to help move this work forward?

Yes. Please bring plumbing supplies and a snowblower :-)

Is there something we can do to help move this work forward?

Yes. Please bring plumbing supplies and a snowblower :-)

Oh I forgot that situation :D
God bless you and stay safe

I really have to apologize for my previous remark. During the last week I actually did have power and internet (many people did not). So, I actually do not have anything to complain about. However, this whole thing has been such a distraction that I have mostly only done trivial FreeBSD work. I will try to look at it this week.

Respectfully bumping this since it would truly be awesome to have a more recent version of mono in the ports tree to benefit from the latest performance improvements and bug fixes.

We tested this patch, the mono runtime seems to work fine to run existing applications, however there are missing build tools. We are among the many people using mono as a development environment using the tools included in the mono package (msbuild, the csharp interactive interpreter etc...). To be specific, the exact error we got when trying to build a csharp application was that the folder /usr/local/lib/mono/msbuild/15.0/bin/Roslyn/ is missing - along with all the files this folder is supposed to contain.

I am not 100% sure that the msbuild folder is 15.0: it may have been 16.0 or something else since I do not have this testing environment available right now, however the important point is that the msbuild folder was there and contained all the needed dlls and target files. The only issue was that the Roslyn folder was missing, which made it impossible to compile csharp applications.

Just to confirm that the error message indeed says that the folder name is 15.0. But after investigation, the reason for this is that I have installed the msbuild package and it is at version 15.0, so the binary likely looks for the corresponding files in the global mono install. There would therefore also be a need to upgrade the version of the msbuild port. This port currently has a dependency on mono 5.10: if the package mono 6.8 is installed, pkg requires it to be deleted and replaced by mono 5.10 before msbuild can be installed. This seems like the right behavior seems otherwise the error message mentioned above is obtained and nothing can be built using msbuild (to test it, i have installed msbuild using the port instead of using pkg).

From a practical perspective, to allow people to continue to develop on FreeBSD using mono, there is a need to have msbuild at version at least 16.3.0. The reason for this is that this is a hard requirement of Omnisharp Roslyn which is the language server used by all text editors from emacs, to vscode to provide IDE-like capabilities for csharp and other .NET projects.

Finally just to rectify, when I posted the first message, I installed the package manually using the link that was posted in the other review ticket, however when installing the package mono6.8 committed to the ports tree (I didn't notice it was there), the csharp interactive interpreter csharp(8), is correctly installed. So really it looks like we may actually be there, the only thing missing is msbuild, I bring this up here because mono and msbuild are tighly integrated and go hand-in-hand.

I've been banging my head all the afternoon to try to figure out how to update the msbuild port locally and do my first ever commit to the ports tree. I wish I could say that I am currently trying to solve build issues... right now I am still trying to wrap my head around the porter's handbook... I am still trying to figure out what to modify to update the port.

If someone has a prebuilt package for msbuild >=16.3.0, this would really save the day for me, as I have literally been stuck on a project for over 10 days now trying to workaround the outdated version of the mono package on FreeBSD. Mono6.8 with msbuild >=16.3.0 would make a world of a difference and will also us to get back going, and to even remove all the dirty workarounds we have created to have the language server kind of work. This last bit will basically allow people like us to finally plug into the last generation of .NET tools without hassle.

Ok, so actually most of my confusion comes from this: where do the nupkg-* files come from in the msbuild port:

https://github.com/freebsd/freebsd-ports/tree/main/devel/msbuild

I understand that the port system has definitions to fetch nuget packages, (I have read ports.bsd.mk and similar files), however my question is: where did the maintainer find these lists of required NuGet packages for the msbuild port?

I have spent hours browsing the mono/build repository on Github, but it is not clear to me. The build process of the upstream mono/msbuild is itself not trivial since upstream is meant to bootstrap msbuild for mono, and their repository says: "this should only be used to build msbuild itself". They have a multi-step build process: first fetch a prebuilt msbuild, then do the rest of the build using the freshly created msbuild.

Therefore I'm having a really hard time trying to understand how the nupkg-* files have been constructed. If I know where to look up this list, I should be in a position to update the port.