OpenSfM
OpenSfM copied to clipboard
Build errors on Windows
Hi, I want to build to windows but I got an error in building.
Here's the log :
Configuring for python 3.7...
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- Using VCPKG FindLAPACK from package 'lapack-reference'
-- A library with LAPACK API found.
-- Using VCPKG FindLAPACK from package 'lapack-reference'
-- Failed to find SuiteSparse - Did not find AMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find AMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find COLAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find COLAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CCOLAMD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CCOLAMD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CHOLMOD library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CHOLMOD header (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find CXSPARSE library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find SuiteSparseQR library (required SuiteSparse component).
-- Failed to find SuiteSparse - Did not find SUITESPARSEQR header (required SuiteSparse component).
-- Found SuiteSparse_config library: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/installed/x64-windows/lib/suitesparseconfig.lib
-- Failed to find SuiteSparse - Failed to find either: SuiteSparse_config header & library (should be present in all SuiteSparse >= v4 installs), or UFconfig header (should be present in all
SuiteSparse < v4 installs).
-- Found METIS library: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/installed/x64-windows/debug/lib/metis.lib.
-- Failed to find some/all required components of SuiteSparse. (missing: AMD_FOUND CAMD_FOUND COLAMD_FOUND CCOLAMD_FOUND CHOLMOD_FOUND CXSPARSE_FOUND SUITESPARSEQR_FOUND SUITESPARSE_VERSION)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (ceres) does
not match the name of the calling package (Ceres). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/FindCeres.cmake:49 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/scripts/buildsystems/vcpkg.cmake:793 (_find_package)
CMakeLists.txt:58 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/installed/x64-windows/share/gflags
-- Detected gflags version: 2.2.2
-- Found OpenCV: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/installed/x64-windows (found version "4.5.4")
-- Found OpenCV: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/vcpkg/installed/x64-windows (found version "4.5.4") found components: core imgproc calib3d imgcodecs
-- pybind11 v2.2.4
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/cmake_build
Compiling extension...
Microsoft (R) Build Engine version 16.10.2+857e5a733 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
foundation.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\foundation\Release\foundation.lib
bundle.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\bundle\Release\bundle.lib
geometry.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\geometry\Release\geometry.lib
pybundle.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pybundle.cp37-win_amd64.pyd
dense.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\dense\Release\dense.lib
pydense.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pydense.cp37-win_amd64.pyd
akaze.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\third_party\akaze\Release\akaze.lib
vl.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\third_party\vlfeat\Release\vl.lib
features.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\features\Release\features.lib
pyfeatures.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pyfeatures.cp37-win_amd64.pyd
geo.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\geo\Release\geo.lib
pygeo.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pygeo.cp37-win_amd64.pyd
Creating library C:/Users/ghanb/OneDrive/Documents/development/3d_reconstruction/OpenSfM/cmake_build/geometry/Release/pygeometry.lib and object C:/Users/ghanb/OneDrive/Documents/develop
ment/3d_reconstruction/OpenSfM/cmake_build/geometry/Release/pygeometry.exp
geometry.lib(triangulation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl ceres::CostFunction::CostFunction(void)" (__imp_??0CostFunction@ceres@@QEAA
@XZ) [C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\geometry\pygeometry.vcxproj]
geometry.lib(triangulation.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl ceres::CostFunction::~CostFunction(void)" (__imp_??1CostFunction@ce
res@@UEAA@XZ) [C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\geometry\pygeometry.vcxproj]
geometry.lib(triangulation.obj) : error LNK2001: unresolved external symbol "public: virtual __cdecl ceres::CostFunction::~CostFunction(void)" (??1CostFunction@ceres@@UEAA@XZ) [C:\Users\ghan
b\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\geometry\pygeometry.vcxproj]
C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pygeometry.cp37-win_amd64.pyd : fatal error LNK1120: 3 unresolved externals [C:\Users\ghanb\OneDrive\Documents
\development\3d_reconstruction\OpenSfM\cmake_build\geometry\pygeometry.vcxproj]
map.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\map\Release\map.lib
pymap.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pymap.cp37-win_amd64.pyd
robust.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\robust\Release\robust.lib
pyrobust.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pyrobust.cp37-win_amd64.pyd
sfm.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\cmake_build\sfm\Release\sfm.lib
pysfm.vcxproj -> C:\Users\ghanb\OneDrive\Documents\development\3d_reconstruction\OpenSfM\opensfm\pysfm.cp37-win_amd64.pyd
Traceback (most recent call last):
File "setup.py", line 56, in <module>
build_c_extension()
File "setup.py", line 50, in build_c_extension
subprocess.check_call(['cmake', '--build', '.', '--config', 'Release'], cwd='cmake_build')
File "C:\Users\ghanb\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-zero exit status 1.
Same error here
Hi @Mmmelvil @Girihanbudi ,
This seems like a Ceres problem. Please, update to the newest version of ceres and try again.
Best
Same Error Here.. Is the issue resolved @Mmmelvil @Girihanbudi could you please help @fabianschenk
Hi @keshav64 , I can't really help since I don't have a Windows machine. I committed a PR #872 today that dealt with cmake and Eigen, ceres, etc. so this might help you.
Same Error Here. Can someone let me know if there is a solution please?
I also got the same issue. The ceres version appears to be the latest (2.1.0).
getting the same compilation error with latest versions ceres. Fixed using the one form dockefile 1.14.0