Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 950573

Summary: dev-cpp/benchmark[libpfm] is unusable from cmake
Product: Gentoo Linux Reporter: Eugene Shalygin <eugene.shalygin>
Component: Current packagesAssignee: Mattéo Rossillol‑‑Laruelle <beatussum>
Status: UNCONFIRMED ---    
Severity: normal CC: parona, proxy-maint
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/google/benchmark/pull/1942
https://github.com/gentoo/gentoo/pull/40899
Whiteboard:
Package list:
Runtime testing required: ---

Description Eugene Shalygin 2025-03-04 09:10:51 UTC
dev-cpp/benchmark CMake module uses find_dependency(PFM), but dev-libs/libpfm-4.13.0 installs no CMake module. Thus find_package(benchmark) fails (dev-build/cmake-3.31.6)

Reproducible: Always

Steps to Reproduce:
1. USE="libpfm" emerge -1 dev-cpp/benchmark
2. echo "find_package(benchmark)" > CMakeLists.txt 
3. cmake .
Actual Results:  
The benchmark package is not found

Expected Results:  
The benchmark package is found
Comment 1 Alfred Wingate 2025-03-04 17:19:39 UTC
And benchmark vendors its own FindPFM.cmake which it uses during its build... Would have to see about if installing these vendored files or if  there is something else that would provide it.
Comment 2 Larry the Git Cow gentoo-dev 2025-03-05 11:26:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef1b1276cf1343ef688099d3b7553b183c7c228e

commit ef1b1276cf1343ef688099d3b7553b183c7c228e
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-03-04 23:21:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-05 11:25:50 +0000

    dev-cpp/benchmark: fix cmake package config with USE="libpfm"
    
    Bug: https://bugs.gentoo.org/950573
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/40899
    Signed-off-by: Sam James <sam@gentoo.org>

 ...mark-1.9.1.ebuild => benchmark-1.9.1-r1.ebuild} |  1 +
 .../files/benchmark-1.9.1-fix-pfm-cmake.patch      | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+)