cmake config broken

Bug #1678043 reported by Christian Lins
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ceres-solver (Ubuntu)
Fix Released
Low
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

It is not possible to use libceres with cmake.

Using this minimal example:

CMakeLists.txt:
FIND_PACKAGE(Ceres REQUIRED)

Produces this error:
$ cmake -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
CMake Error at /usr/lib/cmake/ceres/CeresConfig.cmake:88 (message):
  Failed to find Ceres - Ceres install root: /usr/lib, determined from
  relative path from CeresConfig.cmake install location:
  /usr/lib/cmake/ceres, does not contain Ceres headers. Either the install
  directory was deleted, or the install tree was only partially relocated
  outside of CMake after Ceres was built.
Call Stack (most recent call first):
  /usr/lib/cmake/ceres/CeresConfig.cmake:136 (ceres_report_not_found)
  CMakeLists.txt:1 (FIND_PACKAGE)

CMake Error at CMakeLists.txt:1 (FIND_PACKAGE):
  Found package configuration file:

    /usr/lib/cmake/ceres/CeresConfig.cmake

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

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present. A line of code such as

    cmake_minimum_required(VERSION 3.5)

  should be added at the top of the file. The version specified may be lower
  if you wish to support older CMake versions for this project. For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/clins/repos/cerestest/CMakeFiles/CMakeOutput.log".

Revision history for this message
Philipp Huebner (debalance-debian) wrote :

Please state the package version.

Revision history for this message
Christian Lins (cli) wrote :

3.5.2-2ubuntu1

Revision history for this message
Philipp Huebner (debalance-debian) wrote :

That can't be right.
The version is one of

 1.11.0~dfsg0-2
 1.11.0~dfsg0-5
 1.12.0+dfsg0-1

It should be fixed in 1.11.0~dfsg0-5 and newer,
for 1.11.0~dfsg0-2 this has already been reported here:
https://bugs.launchpad.net/ubuntu/+source/ceres-solver/+bug/1596296

Revision history for this message
Christian Lins (cli) wrote :

Ah, sorry. I posted the cmake version...

1.11.0~dfsg0-5 is my installed (and broken) version of libceres1 and libceres-dev.

Changed in ceres-solver (Ubuntu):
status: New → Confirmed
Revision history for this message
Philipp Huebner (debalance-debian) wrote :

Well, I have no idea why cmake does not find Ceres in /usr/include/ceres/.

It works fine on Debian, so Ubuntu must be doing something different regarding cmake.

There might be a workaround by specifying CERES_INCLUDE_DIRS manually.

Revision history for this message
Ayon Sen (asenob) wrote :

Hi,

I ran into this bug as well, and I think the install file is not set up correctly to install the files that allow CMake to find the library.

I built a version of the package locally on my Ubuntu 16.04 machine that fixes the issue by replacing libceres-dev.install with the following:

usr/include
usr/lib/lib*.so
usr/lib/cmake

I believe that's all I had to do, but I will double-check.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

ACK on the updated debdiff. I've uploaded it for processing by the SRU team after fixing the LP bug tags in the changelog.

Changed in ceres-solver (Ubuntu):
status: Confirmed → In Progress
Mathew Hodson (mhodson)
Changed in ceres-solver (Ubuntu):
importance: Undecided → Low
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Christian, or anyone else affected,

Accepted ceres-solver into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ceres-solver/1.11.0~dfsg0-2ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ceres-solver (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
jeremie (artivis) wrote :

This package fixes the bug for me.

[Tested]

1.11.0~dfsg0-2ubuntu0.1

[Test case]

I compiled a package that requires Ceres (find_package(Ceres) in its CMakeLists.txt). Using version 1.11.0~dfsg0-2 I hit the issue describe in this bug while when using version 1.11.0~dfsg0-2ubuntu0.1, installed from xenial-proposed, Ceres is found and the compilation goes through.

tags: added: verification-done-xenial
removed: verification-needed verification-needed-xenial
jeremie (artivis)
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for ceres-solver has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceres-solver - 1.11.0~dfsg0-2ubuntu0.1

---------------
ceres-solver (1.11.0~dfsg0-2ubuntu0.1) xenial; urgency=medium

  * Fix CeresConfig install rule (LP: #1678043)
  * Fix CeresConfig debian install rule (LP: #1596296)
  * Fix config.h debian install rule

 -- Jeremie Deray <email address hidden> Tue, 17 Nov 2020 14:54:50 +0000

Changed in ceres-solver (Ubuntu Xenial):
status: Fix Committed → Fix Released
Changed in ceres-solver (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.