I believe that it's better to add additional supported on freebsd FLAVORS like llvm21 and llvm20 too.
Part of the problem is that inside CMakeLists.txt file the patched block is moved from line 186 to line 225 for version 21.1.3, for version 20.1.8 it looks that is was on old place: # pkg-config file configure_file( libclc.pc.in libclc.pc @ONLY ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/libclc.pc DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig" ) if( ENABLE_RUNTIME_SUBNORMAL ) foreach( file IN ITEMS subnormal_use_default subnormal_disable ) link_bc( TARGET ${file} INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/opencl/lib/generic/${file}.ll ) install( FILES $<TARGET_PROPERTY:${file},TARGET_FILE> DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" ) endforeach() endif() it's also not understandable for me how to modify this file, but doing manual editing it after make FLAVOR=llvm21 extract inside my modified source tree, the compilation was successful, but it's not possible to install it.
(In reply to Jordan Ostreff from comment #1) Here is how I was modified the Makefile of the port: --- a/devel/libclc/Makefile +++ b/devel/libclc/Makefile @@ -1,5 +1,7 @@ PORTNAME= libclc DISTVERSION= ${DISTVERSION_${FLAVOR}} +DISTVERSION_llvm21= 21.1.3 +DISTVERSION_llvm20= 20.1.8 DISTVERSION_llvm19= 19.1.3 DISTVERSION_llvm18= 18.1.8 DISTVERSION_llvm17= 17.0.6 @@ -22,7 +24,7 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BUILD_DEPENDS= spirv-llvm-translator-${FLAVOR}>0:devel/spirv-llvm-translator@${FLAVOR} \ libedit>=0:devel/libedit -FLAVORS= ${15 16 17 18 19:L:S/^/llvm/} +FLAVORS= ${15 16 17 18 19 20 21:L:S/^/llvm/} USES= cmake compiler:c++11-lib llvm:${FLAVOR:S/llvm//},build python:build tar:xz USE_LDCONFIG= ${PREFIX}/${FLAVOR}/lib and after that I've executed make FLAVOR=llvm21 makesum && make FLAVOR=llvm21 makesum to generate the new distinfo.llvm21 and distinfo.llvm20 files inside the port directory .... So I need help from the port maintainer with files/patch-CMakeLists.txt and maybe with pkg-plist file.
(In reply to Jordan Ostreff from comment #2) +DISTVERSION_llvm21= 21.1.4
I limited my patch (identical as the OP) to llvm20. It builds fine but does not install : ================================================================== [root@numenor libclc]# make FLAVOR=llvm20 install ===> Installing for libclc-llvm20-20.1.8 ===> Checking if libclc-llvm20 is already installed ===> Registering installation for libclc-llvm20-20.1.8 pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/clcfunc.h:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/clctypes.h:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/geometric/floatn.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/integer/gentype.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/math/binary_decl.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/math/gentype.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/math/ternary_decl.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/math/unary_decl.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/relational/binary_decl.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/relational/floatn.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/relational/select.inc:No such file or directory pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/usr/local/llvm20/include/clc/relational/unary_decl.inc:No such file or directory *** Error code 1 ================================================================== Seems like a proble with pkg-plist, but I'm not skilled enough to fix this
(In reply to Xavier Humbert from comment #4) use make FLAVOR=llvm20 makeplist then clean and reinstall it.
(In reply to Jordan Ostreff from comment #5) Almost there : =================================================================================== [root@numenor libclc]# make FLAVOR=llvm20 makeplist > pkg-plist [root@numenor libclc]# make FLAVOR=llvm20 clean all [root@numenor libclc]# make FLAVOR=llvm20 install ===> Installing for libclc-llvm20-20.1.8 ===> Checking if libclc-llvm20 is already installed ===> Registering installation for libclc-llvm20-20.1.8 pkg-static: Unable to access file /usr/ports/devel/libclc/work-llvm20/stage/you/have/to/check/what/makeplist/gives/you:No such file or directory pkg-static: duplicate file listing: /usr/local/libdata/ldconfig/libclc-llvm20, ignoring *** Error code 1 Stop. make: stopped in /usr/ports/devel/libclc =================================================================================== If I install this file manually : =================================================================================== [root@numenor libclc]# mkdir -p /usr/ports/devel/libclc/work-llvm20/stage/you/have/to/check/what/makeplist/gives/ [root@numenor libclc]# touch /usr/ports/devel/libclc/work-llvm20/stage/you/have/to/check/what/makeplist/gives/you [root@numenor libclc]# make FLAVOR=llvm20 install ===> Installing for libclc-llvm20-20.1.8 ===> Checking if libclc-llvm20 is already installed ===> Registering installation for libclc-llvm20-20.1.8 pkg-static: duplicate file listing: /usr/local/libdata/ldconfig/libclc-llvm20, ignoring Installing libclc-llvm20-20.1.8... pkg-static: libclc-llvm20-20.1.8 conflicts with suitesparse-example-1.8.9 (installs files into the same place). Problematic file: /you/have/to/check/what/makeplist/gives/you *** Error code 1 Stop. make: stopped in /usr/ports/devel/libclc ===================================================================================
(In reply to Xavier Humbert from comment #4) Removed the problematic file from pkg-plist, all is fine now
What's the progress on this? I see that a lot of popular wayland-specific ports depend on this when LLVM_DEFAULT is set to 20 or 21. [00:00:04] Ignoring devel/libclc@llvm21 | libclc-llvm21-: Unknown flavor 'llvm21', possible flavors: llvm15 llvm16 llvm17 llvm18 llvm19 [00:00:04] Skipping graphics/mesa-dri | mesa-dri-24.1.7_10: Dependent port devel/libclc@llvm21 | libclc-llvm21- ignored [00:00:04] Skipping x11-wm/sway | sway-1.11_1: Dependent port devel/libclc@llvm21 | libclc-llvm21- ignored [00:00:04] Skipping x11-toolkits/wlroots019 | wlroots019-0.19.2: Dependent port devel/libclc@llvm21 | libclc-llvm21- ignored [00:00:04] Skipping x11-servers/xwayland | xwayland-24.1.9,1: Dependent port devel/libclc@llvm21 | libclc-llvm21- ignored Is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290873 a duplicate?
devel/llvm22 is already published into ports tree. Maybe add FLAVOR=llvm22 too?
*** This bug has been marked as a duplicate of bug 290873 ***