Bug 290260 - devel/libclc missing FLAVOR llvm22 llvm21 llvm20
Summary: devel/libclc missing FLAVOR llvm22 llvm21 llvm20
Status: Closed DUPLICATE of bug 290873
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-15 19:40 UTC by Jordan Ostreff
Modified: 2026-05-10 14:59 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Ostreff 2025-10-15 19:40:27 UTC
I believe that it's better to add additional supported on freebsd FLAVORS like llvm21 and llvm20 too.
Comment 1 Jordan Ostreff 2025-10-16 08:39:03 UTC
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.
Comment 2 Jordan Ostreff 2025-10-16 08:43:10 UTC
(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.
Comment 3 Jordan Ostreff 2025-10-21 19:14:35 UTC
(In reply to Jordan Ostreff from comment #2)
+DISTVERSION_llvm21=    21.1.4
Comment 4 Xavier Humbert 2025-11-04 19:05:40 UTC
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
Comment 5 Jordan Ostreff 2025-11-04 20:34:32 UTC
(In reply to Xavier Humbert from comment #4)
use 
make FLAVOR=llvm20 makeplist 
then clean and reinstall it.
Comment 6 Xavier Humbert 2025-11-05 08:53:28 UTC
(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
===================================================================================
Comment 7 Xavier Humbert 2025-11-05 09:08:09 UTC
(In reply to Xavier Humbert from comment #4)
Removed the problematic file from pkg-plist, all is fine now
Comment 8 Siva Mahadevan freebsd_committer freebsd_triage 2026-01-15 02:51:23 UTC
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?
Comment 9 Jordan Ostreff 2026-02-04 10:53:13 UTC
devel/llvm22 is already published into ports tree. Maybe add FLAVOR=llvm22 too?
Comment 10 Tijl Coosemans freebsd_committer freebsd_triage 2026-05-10 14:59:10 UTC

*** This bug has been marked as a duplicate of bug 290873 ***