Thefrank / dotnet-freebsd-crossbuild

Bash script and patches for building dotNET for FreeBSD under Linux
31 stars 3 forks source link

Update of build scripts for 9.x branch? #9

Closed sec closed 3 weeks ago

sec commented 4 weeks ago

Hi, As we know, there's no installer repo for 9.x anymore, so may I ask how do you cross-build installer from sdk branch?

Another issue I git while doing crossbuilds, are some weird errors in aspnetcore regarding node/npm and cache something errors - have you seen those also?

Thefrank commented 4 weeks ago

[All of this is for x86_64 only as my RPi4 is not strong enough to build dotNET]

The patches here are correct. The script is not. I will try and get to it this weekend. Any commits not tagged for preview7 (~July 2024) are unlikely to make it into the finished product. If you have any PRs that you were working on, you will need to manually patch or remote cherry-pick them. The SDK handles what the installer did on earlier versions of net9 (and now branches > Z.Y.1xx for net6 and net8) The only hard-requirement is patch_sdk_net9p5.patch. This allows the SDK to bundle FreeBSD items when on Linux. Make sure to pass it the /p: that were used for installer to stop it from trying to crossgen and give it the right output RID and Arch.

For aspnetcore the cross build uses Ubuntu 20.04.6 LTS with Node 18 and NPM 10.7. This will require a bump as I think some of the non-critical, non-os dependent, sub-projects want Node >= 20. They only WARN about it now but I expect and ERR soon. Microsoft uses their own Linux distro: Azure Linux (formerly CBL Mariner) for their docker images but I suggest sticking with a "big name" distro for building as your host OS.

For aspetnetcore, I use -ci --os-name freebsd --arch $ROOTFSARCH --pack --all /p:CrossgenOutput=false /p:OfficialBuildId=$OFFICIALBUILDID /p:SkipTestBuild=true to build it. If you want to run it with warnaserror you will need to patch aspnetcore to avoid caching size issues. AFAIK the internal warnings should not be pushed up as errors unless that is set.

sec commented 3 weeks ago

Thanks for the tips, was able to finish cross compile .