Created attachment 252966 [details] Remove LLVM version restriction and fix LIB_DEPENDS syntax The restriction was added in fa7309cb976e to fix Bug 275290: https://cgit.freebsd.org/ports/commit/?id=fa7309cb976e3e73d59f271be3da01fee3006152 However, the latest devel/llvm17 does not seem to have this issue any more and devel/llvm18 works just fine. FYI, devel/spirv-llvm-translator does not have llvm19 flavor yet. Also, incorrect LIB_DEPENDS syntax is fixed. Actually, devel/spirv-llvm-translator does not install libLLVMSPIRVLib.so.${LLVM_VERSION} in the first place.
If 17 and 18 works set the max to be 18 then. Also devel/spirv-llvm-translator does install libLLVMSPIRVLib.so.${LLVM_VERSION} (at least for the 15 version)
Sorry misread the patch for the version, this part is fine.
Comment on attachment 252966 [details] Remove LLVM version restriction and fix LIB_DEPENDS syntax > - libLLVMSPIRVLib.so.${LLVM_VERSION}:devel/spirv-llvm-translator@${LLVM_PORT:T} \ > + libLLVMSPIRVLib.so:devel/spirv-llvm-translator@${LLVM_PORT:T} \ When multiple ports provide the same library not specifying SOVERSION would introduce build conflict if an undesired version is installed. However, this port doesn't actually use spirv-llvm-translator because Intel GPU support is disabled (unlike in mesa-devel, runtime-gated via IRIS_ENABLE_CLOVER=1). > does not install libLLVMSPIRVLib.so.${LLVM_VERSION} in the first place. From devel/spirv-llvm-translator/Makefile SOVERSION= ${${FLAVOR:S/llvm//}<18:?${DISTVERSION:R:R}:${DISTVERSION:R}} $ pkg info -xl spirv-llvm-translator | fgrep .so. /usr/local/llvm11/lib/libLLVMSPIRVLib.so.11 /usr/local/llvm12/lib/libLLVMSPIRVLib.so.12 /usr/local/llvm13/lib/libLLVMSPIRVLib.so.13 /usr/local/llvm14/lib/libLLVMSPIRVLib.so.14 /usr/local/llvm15/lib/libLLVMSPIRVLib.so.15 /usr/local/llvm16/lib/libLLVMSPIRVLib.so.16 /usr/local/llvm18/lib/libLLVMSPIRVLib.so.18.1 See also https://github.com/llvm/llvm-project/commit/91a384621e5b (spirv-llvm-translator uses add_llvm_tool() from AddLLVM.cmake)
(In reply to Jan Beich from comment #3) Yes, I get that. However, it is not easy to find minor version number because LLVM_VERSION does not contain the information. % make -V LLVM_DEFAULT 18 % make -V LLVM_VERSION 18
Created attachment 253024 [details] Remove LLVM version restriction This patch works although it looks very hackish for my taste. Note it only works because Mk/Scripts/find_lib.sh accepts glob patterns, probably not by design.
(In reply to Jung-uk Kim from comment #4) mesa-devel simply hardcodes 1 per OPENCL_SOVERSION=${LLVM_VERSION}${${LLVM_VERSION}>=18:?.1:} So far 0 is development, 1 is stable while 2 or newer won't exist. devel/llvm18 (unlike lang/gcc13) only bumps patch-level version on stable minor/branch. IIRC, LLVM support cycle is 1 year for 2 major releases a year. Anything ABI breaking ends up being in a new major release. Rarely, LLVM breaks ABI on stable like in 7.1.0 and 11.1.0 but those never landed in ports and none cares anymore.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e4b79a0e4ebec69cb8e057e62d3dc994ace617e5 commit e4b79a0e4ebec69cb8e057e62d3dc994ace617e5 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2024-08-22 18:07:53 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2024-08-27 16:29:58 +0000 lang/clover: Remove restriction on llvm version Clover can now be built with llvm > 16 PR: 280957 Sponsored by: Beckhoff Automation GmbH & Co. KG lang/clover/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Created attachment 254855 [details] Remove libLLVMSPIRVLib.so from LIB_DEPENDS The commit did not fix libLLVMSPIRVLib.so issue. In fact, I realized it is not necessary it at all. This patch removes it from LIB_DEPENDS.
We need to fix the LIB_DEPENDS issue with libLLVMSPIRVLib.so.