colmap / glomap

GLOMAP - Global Structured-from-Motion Revisited
BSD 3-Clause "New" or "Revised" License
1.3k stars 77 forks source link

CMake Generate step failed. Build files cannot be regenerated correctly. #32

Closed JX-Github-web closed 2 weeks ago

JX-Github-web commented 1 month ago

cmake --version cmake version 3.30.1

CMake suite maintained and supported by Kitware (kitware.com/cmake). root@autodl-container-696e4fa739-5b7e1f0f:~/glomap-main# mkdir build mkdir: cannot create directory ‘build’: File exists root@autodl-container-696e4fa739-5b7e1f0f:~/glomap-main# cd build root@autodl-container-696e4fa739-5b7e1f0f:~/glomap-main/build# cmake .. -GNinja -- Configuring PoseLib... -- BUILD_SHARED_LIBS: OFF -- CMAKE_BUILD_TYPE: Release -- CMAKE_GENERATOR: Single-config -- CMAKE_GENERATOR: Ninja -- CMAKE_REGISTRY_FOLDER: OFF -- Configuring PoseLib... done -- Configuring COLMAP... -- Enabling LSD support CMake Warning (dev) at build/_deps/colmap-src/cmake/FindDependencies.cmake:7 (find_package): Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first): build/_deps/colmap-src/CMakeLists.txt:105 (include) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: filesystem graph program_options system -- Found FreeImage -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so -- Found FLANN -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libflann.so -- Found LZ4 -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/liblz4.so -- Found Metis -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libmetis.so -- Found Glog -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libglog.so -- Found Glew -- Includes : /usr/include -- Libraries : /usr/lib/x86_64-linux-gnu/libGLEW.so -- Found installed version of Eigen: /usr/lib/cmake/eigen3 -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3 -- Found required Ceres dependency: glog -- Found installed version of gflags: /usr/lib/x86_64-linux-gnu/cmake/gflags -- Detected gflags version: 2.2.2 -- Found required Ceres dependency: gflags -- Found Ceres version: 1.14.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, OpenMP, Multithreading] -- Enabling OpenMP support -- Using header-only CGAL -- Targetting Ninja -- Using /usr/bin/c++ compiler. CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_SetupBoost.cmake:20 (find_package): Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_SetupCGALDependencies.cmake:52 (include) /usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake:125 (include) build/_deps/colmap-src/cmake/FindDependencies.cmake:67 (find_package) build/_deps/colmap-src/CMakeLists.txt:105 (include) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48") -- Boost include dirs: /usr/include -- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math -- Found CGAL -- Includes : /usr/include -- Libraries : CGAL -- Enabling CUDA support (version: 11.8.89, archs: native) -- Found Qt -- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Core -- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL -- Module : /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets -- Enabling GUI support -- Enabling OpenGL support -- Enabling GPU support -- Build type specified as Release -- Enabling SIMD support -- Disabling interprocedural optimization -- Disabling ccache support -- Disabling profiling support -- Configuring COLMAP... done -- Found installed version of Eigen: /usr/lib/cmake/eigen3 -- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3 -- Found required Ceres dependency: glog -- Found installed version of gflags: /usr/lib/x86_64-linux-gnu/cmake/gflags -- Detected gflags version: 2.2.2 -- Found required Ceres dependency: gflags -- Found Ceres version: 1.14.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, OpenMP, Multithreading] CMake Warning (dev) at cmake/FindDependencies.cmake:31 (find_package): Policy CMP0167 is not set: The FindBoost module is removed. Run "cmake --help-policy CMP0167" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first): CMakeLists.txt:17 (include) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") -- Enabling OpenMP -- Disabling ccache support -- Configuring done (1.3s) CMake Error at glomap/CMakeLists.txt:77 (target_link_libraries): Target "glomap" links to:

Ceres::ceres

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.
LaFeuilleMorte commented 1 month ago

same problem

LaFeuilleMorte commented 1 month ago

I've solved this problem. Simply modify this file (/glomap/glomap/CmakeLists.txt):

change Ceres::ceres -> ceres

image

And run the following cmd:

cmake .. -GNinja -DCeres_DIR=/usr/lib/cmake/Ceres/

@ahojnnes Is this a bug?

lpanaf commented 1 month ago

The original code in GLOMAP works fine with ceres version2.0 and 2.2, maybe it was a problem with ceres1.14