Public bug reported:

I tried using Ceres for my C++ build. (Actually I tried to build
complete OpenCV because Ubuntu version is so old.) This was the error:


    CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresTargets.cmake:71 
(set_target_properties):
    The link interface of target "Ceres::ceres" contains:
    
    glog::glog

    but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.
    
    Call Stack (most recent call first):
    /usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresConfig.cmake:270 (include)
    /home/fo/WORK/OpenCV/opencv_contrib/modules/sfm/CMakeLists.txt:7 
(find_package)

I made the following change and voila the cmake build configuration
succeeded:

    $ diff -u /usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresTargets.cmake{.orig,}
    --- /usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresTargets.cmake.orig       
2024-04-01 01:47:31.000000000 +0800
    +++ /usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresTargets.cmake    2024-12-27 
15:36:09.314108716 +0800
@@ -71,7 +71,7 @@
     set_target_properties(Ceres::ceres PROPERTIES
       INTERFACE_COMPILE_FEATURES "cxx_std_17"
       INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
    -  INTERFACE_LINK_LIBRARIES "glog::glog;gflags;Eigen3::Eigen"
    +  INTERFACE_LINK_LIBRARIES "glog;gflags;Eigen3::Eigen"
     )

The named cmake file was installed by `libceres-dev` package, but the 
`ubuntu-bug libceres-dev` command gives me, I guess, the source package name 
`ceres-solver` so I leave it like that in the report.
     
     if(CMAKE_VERSION VERSION_LESS 2.8.12)

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: libceres-dev 2.2.0+dfsg-4.1ubuntu2 [modified: 
usr/lib/x86_64-linux-gnu/cmake/Ceres/CeresTargets.cmake]
ProcVersionSignature: Ubuntu 6.8.0-50.51-generic 6.8.12
Uname: Linux 6.8.0-50-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
Date: Fri Dec 27 15:48:00 2024
InstallationDate: Installed on 2024-12-03 (24 days ago)
InstallationMedia: Kubuntu 24.04.1 LTS "Noble Numbat" - Release amd64 (20240827)
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: ceres-solver
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: ceres-solver (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2092571

Title:
  cmake files sugges linking to non-existing glog::glog library

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ceres-solver/+bug/2092571/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to