Bug 284266 - math/heyoka: fix build against devel/llvm18 and higher
Summary: math/heyoka: fix build against devel/llvm18 and higher
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 283013
  Show dependency treegraph
 
Reported: 2025-01-22 17:09 UTC by Dimitry Andric
Modified: 2025-01-22 18:44 UTC (History)
2 users (show)

See Also:


Attachments
math/heyoka: fix build against devel/llvm18 and higher (2.15 KB, patch)
2025-01-22 17:11 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2025-01-22 17:09:39 UTC
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.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2025-01-22 17:11:37 UTC
Created attachment 256907 [details]
math/heyoka: fix build against devel/llvm18 and higher
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2025-01-22 17:17:36 UTC
Thanks for the patch.
Approved.
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-01-22 18:32:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12bf8b3dabdeb7a9b9c9a2665938b3f518ebb3f8

commit 12bf8b3dabdeb7a9b9c9a2665938b3f518ebb3f8
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-01-22 17:10:37 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-01-22 18:31:36 +0000

    math/heyoka: fix build against devel/llvm18 and higher

    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.

    PR:             284266
    Approved by:    yuri (maintainer)
    MFH:            2025Q1

 math/heyoka/Makefile | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-01-22 18:43:36 UTC
A commit in branch 2025Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=52a1f9bc0f19f2a8eb8741d09a138981dbc0a92f

commit 52a1f9bc0f19f2a8eb8741d09a138981dbc0a92f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2025-01-22 17:10:37 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-01-22 18:42:12 +0000

    math/heyoka: fix build against devel/llvm18 and higher

    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.

    PR:             284266
    Approved by:    yuri (maintainer)
    MFH:            2025Q1

    (cherry picked from commit 12bf8b3dabdeb7a9b9c9a2665938b3f518ebb3f8)

 math/heyoka/Makefile | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)