Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 700344 - sci-libs/ceres-solver-1.12.0 - CMake Error at CMakeModules/AddLibMacros.cmake:420 (find_package): Found package configuration file: /usr/lib64/cmake/Ceres/CeresConfig.cmake but it set Ceres_FOUND to FALSE so package "Ceres" is considered to be NOT FOUND.
Summary: sci-libs/ceres-solver-1.12.0 - CMake Error at CMakeModules/AddLibMacros.cmake...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-11-17 11:00 UTC by kavol
Modified: 2021-10-07 19:38 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2019-11-17 11:00:05 UTC
Trying to compile a project depending on ceres, I'm getting the following error:

CMake Error at CMakeModules/AddLibMacros.cmake:420 (find_package):
  Found package configuration file:

    /usr/lib64/cmake/Ceres/CeresConfig.cmake

  but it set Ceres_FOUND to FALSE so package "Ceres" is considered to be NOT
  FOUND.


Simply adding this variable makes it go away:

--- CeresConfig.cmake~  2019-11-17 10:59:35.202103311 +0100
+++ /usr/lib64/cmake/Ceres/CeresConfig.cmake    2019-11-17 10:59:54.007102035 +0100
@@ -392,3 +392,4 @@
 # Ceres_FOUND is not (explicitly, i.e. undefined does not count) set
 # to FALSE.
 set(CERES_FOUND TRUE)
+set(Ceres_FOUND TRUE)


Reproducible: Always




This should probably go to upstream, however I can't find any upstream issue tracker ...

BTW, looks like the authors of the project I'm trying to compile are aware about the issue, there is some code trying to make Ceres_FOUND and CERES_FOUND equivalent, however the code is obviously after FindPackage call, and as the package is REQUIRED, cmake bails out in FindPackage before it even reaches that code.

So, might be also cmake issue, that it changed behaviour, but I'm no cmake expert ... after all, it might be better to report downstream, to have another pair of eyes to take a look where the problem lies, whether my patch isn't touching something completely different than what should be fixed ...
Comment 1 Andreas Sturmlechner gentoo-dev 2020-03-22 23:46:19 UTC
Is this still a problem in 1.14.0?
Comment 2 Ladislav Zitka 2021-09-28 05:22:34 UTC
upstream bug tracker: https://gitlab.kitware.com/cmake/cmake/-/issues
Comment 3 Jakov Smolić archtester gentoo-dev 2021-10-07 19:38:53 UTC
I can't reproduce this with 1.14.0 so I'm going to close