Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 755743 - media-gfx/openvdb-7.1.0-r1 : CMake Error at /.../FindPackageHandleStandardArgs.cmake:281 (message):
Summary: media-gfx/openvdb-7.1.0-r1 : CMake Error at /.../FindPackageHandleStandardArg...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Adrian
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-11-20 15:53 UTC by Toralf Förster
Modified: 2020-12-12 18:02 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.98 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
CMakeError.log (CMakeError.log,1.65 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
CMakeOutput.log (CMakeOutput.log,24.36 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,323.56 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
environment (environment,130.90 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,23.58 KB, application/x-bzip)
2020-11-20 15:53 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,4.35 KB, application/x-bzip)
2020-11-20 15:53 UTC, Toralf Förster
Details
media-gfx:openvdb-7.1.0-r1:20201120-083304.log (media-gfx:openvdb-7.1.0-r1:20201120-083304.log,7.16 KB, text/plain)
2020-11-20 15:53 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,30.75 KB, application/x-bzip)
2020-11-20 15:53 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-11-20 15:53:02 UTC
-- Found OpenGL: /usr/lib64/libOpenGL.so   
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:281 (message):
  find_package_check_version(): Cannot be used outside a 'Find Module'
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:530 (find_package_check_version)

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_plasma-20201108-130033

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-8.3.1
 [2] x86_64-pc-linux-gnu-10.2.0 *
clang version 11.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
/usr/lib/llvm/11
11.0.0
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.9 (fallback)
  [3]   python3.8 (fallback)
  [4]   python2.7 (fallback)
  [5]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby25 (with Rubygems)
  [2]   ruby26 (with Rubygems)
  [3]   ruby27 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.47.0 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.272_p10 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.8.4

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Fri Nov 20 07:35:32 AM UTC 2020

emerge -qpvO media-gfx/openvdb
[ebuild  N    ] media-gfx/openvdb-7.1.0-r1  USE="abi7-compat -abi6-compat -doc -numpy -python -static-libs -test -utils" CPU_FLAGS_X86="avx sse4_2" PYTHON_SINGLE_TARGET="python3_7 -python3_6 -python3_8 -python3_9"
Comment 1 Toralf Förster gentoo-dev 2020-11-20 15:53:03 UTC
Created attachment 673468 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-11-20 15:53:04 UTC
Created attachment 673471 [details]
CMakeError.log
Comment 3 Toralf Förster gentoo-dev 2020-11-20 15:53:06 UTC
Created attachment 673474 [details]
CMakeOutput.log
Comment 4 Toralf Förster gentoo-dev 2020-11-20 15:53:08 UTC
Created attachment 673477 [details]
emerge-history.txt
Comment 5 Toralf Förster gentoo-dev 2020-11-20 15:53:09 UTC
Created attachment 673480 [details]
environment
Comment 6 Toralf Förster gentoo-dev 2020-11-20 15:53:10 UTC
Created attachment 673483 [details]
etc.portage.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-11-20 15:53:12 UTC
Created attachment 673486 [details]
logs.tbz2
Comment 8 Toralf Förster gentoo-dev 2020-11-20 15:53:13 UTC
Created attachment 673489 [details]
media-gfx:openvdb-7.1.0-r1:20201120-083304.log
Comment 9 Toralf Förster gentoo-dev 2020-11-20 15:53:14 UTC
Created attachment 673492 [details]
temp.tbz2
Comment 10 Kobboi 2020-12-05 09:53:53 UTC
This is likely because of CMake 3.19. Downgrading to CMake 3.18.5 can be a temporary workaround while the CMakeFiles of openvdb are fixed.
Comment 11 Dennis Schridde 2020-12-05 21:32:10 UTC
The interesting part (for the bug summary) is probably: find_package_check_version(): Cannot be used outside a 'Find Module'
Comment 12 Dennis Schridde 2020-12-05 22:01:28 UTC
CMake identified it as an issue in their code: https://gitlab.kitware.com/cmake/cmake/-/issues/21505

They merged a fix to Modules/FindPackageHandleStandardArgs.cmake: https://gitlab.kitware.com/cmake/cmake/-/commit/14ecf9c2f6edfae4033d9311f79d79d0d07fc1cf

I dropped the patch in /etc/portage/patches/dev-util/cmake-3.19.1/cmake-3.19.1-fix-FindPackageHandleStandardArgs-14ecf9c2f6edfae4033d9311f79d79d0d07fc1cf.patch, reemerged dev-util/cmake-3.19.1, emerged media-gfx/openvdb-7.0.0-r1.  I confirm it fixes the issue.
Comment 13 Adrian 2020-12-05 22:28:49 UTC
Thank you for your effort in tracking down the issue with this bug. I will test this tonight and submit a PR.
Comment 14 Larry the Git Cow gentoo-dev 2020-12-12 18:02:44 UTC
The bug has been closed via the following commit(s):

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

commit 814b6b0d056d858c629720ca1a97400688d2542f
Author:     Adrian Grigo <agrigo2001@yahoo.com.au>
AuthorDate: 2020-12-08 03:19:22 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-12-12 17:58:23 +0000

    dev-util/cmake: Backport FPHSA fix
    
    Changes to Find Package Handle Standard Args in 3.19.0 result in
    an error when compiling openvdb-7.1.0.
    
    This is a known problem in cmake and the fix has been merged into
    3.19.2 upstream.
    
    See https://gitlab.kitware.com/cmake/cmake/-/issues/21505
    
    To produce the bug:
    emerge dev-util/cmake-3.19.0 or 3.19.1 (the bug not exist in <= 3.18)
    emerge media-gfx/openvdb-7.1.0-r1
    
    Compilation fails with
    find_package_check_version(): Cannot be used outside a 'Find Module'
    
    To fix the bug:
    Apply the patch provided in this bug fix to cmake, then repeat the
    above steps and compilation of openvdb succeeds.
    
    The patch ensures that the CMAKE_FPHSA_PACKAGE_NAME package is made
    available outside find_package.
    
    Thanks to Dennis Schridde for finding the upstream fix, produced by
    Marc Chevrier.
    
    * committer-comment: use Gentoo bug ref; git format-patch 14ecf9c2f
    
    Signed-off-by: Adrian Grigo <agrigo2001@yahoo.com.au>
    Closes: https://bugs.gentoo.org/755743
    Package-Manager: Portage-3.0.9, Repoman-3.0.2
    Closes: https://github.com/gentoo/gentoo/pull/18560
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-util/cmake/cmake-3.19.1-r1.ebuild              |  1 +
 ...ake-3.19.1-use-FPHSA-outside-find_package.patch | 40 ++++++++++++++++++++++
 2 files changed, 41 insertions(+)