cdcseacave/openMVS

Cmake failed: Building CXX object libs/MVS/CMakeFiles/MVS.dir/SceneReconstruct.cpp.o

laomeng0703 opened this issue · 1 comments

When compiling, the following error occurs:

$ cmake --build . -j12
Consolidate compiler generated dependencies of target Common
[ 14%] Built target Common
Consolidate compiler generated dependencies of target Math
Consolidate compiler generated dependencies of target IO
[ 22%] Built target Math
[ 40%] Built target IO
Consolidate compiler generated dependencies of target MVS
[ 42%] Building CXX object libs/MVS/CMakeFiles/MVS.dir/SceneReconstruct.cpp.o
/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/3d_reconstruction/openMVS/libs/MVS/SceneReconstruct.cpp: In member function ‘bool MVS::Scene::ReconstructMesh(float, bool, bool, unsigned int, float, float, float, float, float, float, float, float)’:
/media/meng/57673667-4363-4453-89a5-a422016a5299/Meng_forked/code/3d_reconstruction/openMVS/libs/MVS/SceneReconstruct.cpp:1103:38: error: ‘(3.40282347e+38f * 9.99999975e-5f)’ is not a constant expression
   constexpr edge_cap_t maxCap(FLT_MAX*0.0001f);
                                      ^
gmake[2]: *** [libs/MVS/CMakeFiles/MVS.dir/build.make:269: libs/MVS/CMakeFiles/MVS.dir/SceneReconstruct.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:487: libs/MVS/CMakeFiles/MVS.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

OS: ubuntu 22.04

Please does anyone know what issue this is due to, I've been stuck with this error for ages.