[Bug 284266] math/heyoka: fix build against devel/llvm18 and higher

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 22 Jan 2025 17:09:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284266

            Bug ID: 284266
           Summary: math/heyoka: fix build against devel/llvm18 and higher
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: dim@FreeBSD.org
                CC: brooks@FreeBSD.org, yuri@freebsd.org
                CC: brooks@FreeBSD.org, yuri@freebsd.org

When building with DEFAULT_VERSIONS+=llvm=18 or higher, math/heyoke
fails to configure, with the following error:

  CMake Error at CMakeLists.txt:159 (find_package):
    Could not find a configuration file for package "LLVM" that is compatible
    with requested version "18".

    The following configuration files were considered but not accepted:

      /usr/local/llvm15/lib/cmake/llvm/LLVMConfig.cmake, version: 15.0.7
      /usr/local/llvm17/lib/cmake/llvm/LLVMConfig.cmake, version: 17.0.6
      /usr/local/llvm16/lib/cmake/llvm/LLVMConfig.cmake, version: 16.0.6
      /usr/local/llvm18/lib/cmake/llvm/LLVMConfig.cmake, version: 18.1.8

This is because llvm18 and higher use 1 for their minor version numbers,
while llvm17 and earlier use 0. CMake's find_package() needs the minor
version number set correctly, otherwise it will not be able to find the
LLVM package.

-- 
You are receiving this mail because:
You are the assignee for the bug.