Created attachment 259983 [details] The patch The port currently limits llvm to version 17, which requires users seeking to us it to build/install the old compiler first. The attached patch, gratefully copied from Alpine Linux, backports the #ifdefs already found in newer dotent (such as 9) so that version 8 can also be built with newer compiler.
Can you please point me to an URL where you obtained this patch?
The build now fails for me with CMake Error at /wrkdirs/usr/ports/lang/dotnet8/work/dotnet-8.0.6/src/runtime/artifacts/source-build/self/src/eng/native/configuretools.cmake:38 (message): Unable to find toolchain executable. Name: 'link', Prefix: 'llvm-'
(In reply to Gleb Popov from comment #2) I tested on a recently-updated 13.5-STABLE with base clang-19.1.7 and llvm19-19.1.7_1... Does this help any?
Nope, I get the same failure on 13.4. Are you building in Poudriere?
> Are you building in Poudriere? Nope. Can you compare the dependencies between dotnet9 and dotnet8?
I don't have motivation to do that research. If you want to move this issue forward, please provide a patch that works in the Poudriere context.
Created attachment 260716 [details] The patch A minor change to building environment was necessary in addition to patching the code itself.
LGTM, but why did you remove llvm:noexport? It builds fine with base Clang on both FreeBSD 13 and 14.
> LGTM, but why did you remove llvm:noexport? Was trying to reduce differences with dotnet (10.x) and forgot to put it back.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=eefbbb1a5809e1dc0b1e507bed7cfa96a79290c1 commit eefbbb1a5809e1dc0b1e507bed7cfa96a79290c1 Author: Mikhail T. <freebsd-2024@virtual-estates.net> AuthorDate: 2025-05-28 06:47:29 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2025-05-29 05:43:29 +0000 lang/dotnet8: Relax LLVM requirement PR: 286433 lang/dotnet8/Makefile | 7 ++++--- lang/dotnet8/files/patch-clang19 (new) | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-)
Thank you for the patch.