cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.31k stars 907 forks source link

error: ‘invoke_result’ in namespace ‘std’ does not name a template type #821

Open itdreaman opened 2 years ago

itdreaman commented 2 years ago

I have tried many methods and do not know how to solve this compilation error.I hope someone can give us some suggestions.The problem is described as follows:


1.When I get to this step:
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="home/xiaoqi/vcglib" -DBUILD_SHARED_LIBS=ON
The following message appears:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-- Detected version of GNU GCC: 54 (504)
Compiling with C++17
-- The CUDA compiler identification is NVIDIA 10.0.130
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- WARNING: BREAKPAD was not found: Please specify BREAKPAD directory using BREAKPAD_ROOT env. variable
-- Can't find BreakPad. Continuing without it.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   iostreams
--   program_options
--   system
--   serialization
--   regex
-- Found Eigen3: /usr/local/include/eigen3 (Required is at least version "2.91.0") 
-- Eigen 3.4.0 found (include: /usr/local/include/eigen3)
-- Found OpenCV: /usr/local (found version "3.4.1") 
-- OpenCV 3.4.1 found (include: /usr/local/include;/usr/local/include/opencv)
-- VCG  found (include: /usr/include)
-- GLEW  found (include: /usr/include)
-- Can't find GLFW3. Continuing without it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xiaoqi/openMVS_build
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2.I will continue:
make -j2 && sudo make install
The following error occurred:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Scanning dependencies of target Common
[  1%] Building CXX object libs/Common/CMakeFiles/Common.dir/Common.cpp.o
[  3%] Building CXX object libs/Common/CMakeFiles/Common.dir/ConfigTable.cpp.o
In file included from /usr/local/include/eigen3/Eigen/Core:162:0,
                 from /home/xiaoqi/openMVS/libs/Common/Types.h:122,
                 from /home/xiaoqi/openMVS/libs/Common/Common.h:176,
                 from /home/xiaoqi/openMVS/libs/Common/ConfigTable.cpp:8:
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                         ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:38: error: expected unqualified-id before ‘<’ token
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                                      ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:31: error: ‘type1’ was not declared in this scope
   typedef typename remove_all<type1>::type type;
                               ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:36: error: template argument 1 is invalid
   typedef typename remove_all<type1>::type type;
                                    ^
In file included from /usr/local/include/eigen3/Eigen/Core:162:0,
                 from /home/xiaoqi/openMVS/libs/Common/Types.h:122,
                 from /home/xiaoqi/openMVS/libs/Common/Common.h:176,
                 from /home/xiaoqi/openMVS/libs/Common/ConfigTable.cpp:8:
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                         ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:38: error: expected unqualified-id before ‘<’ token
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                                      ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:617:31: error: ‘type1’ was not declared in this scope
   typedef typename remove_all<type1>::type type;
                               ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:617:36: error: template argument 1 is invalid
   typedef typename remove_all<type1>::type type;
                                    ^
In file included from /usr/local/include/eigen3/Eigen/Core:162:0,
                 from /home/xiaoqi/openMVS/libs/Common/Types.h:122,
                 from /home/xiaoqi/openMVS/libs/Common/Common.h:176,
                 from /home/xiaoqi/openMVS/libs/Common/Common.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                         ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:504:38: error: expected unqualified-id before ‘<’ token
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                                      ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:31: error: ‘type1’ was not declared in this scope
   typedef typename remove_all<type1>::type type;
                               ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:505:36: error: template argument 1 is invalid
   typedef typename remove_all<type1>::type type;
                                    ^
In file included from /usr/local/include/eigen3/Eigen/Core:162:0,
                 from /home/xiaoqi/openMVS/libs/Common/Types.h:122,
                 from /home/xiaoqi/openMVS/libs/Common/Common.h:176,
                 from /home/xiaoqi/openMVS/libs/Common/Common.cpp:12:
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:25: error: ‘invoke_result’ in namespace ‘std’ does not name a template type
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                         ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:616:38: error: expected unqualified-id before ‘<’ token
   typedef typename std::invoke_result<F, ArgTypes...>::type type1;
                                      ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:617:31: error: ‘type1’ was not declared in this scope
   typedef typename remove_all<type1>::type type;
                               ^
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:617:36: error: template argument 1 is invalid
   typedef typename remove_all<type1>::type type;
                                    ^
In file included from /home/xiaoqi/openMVS/libs/Common/Common.h:176:0,
                 from /home/xiaoqi/openMVS/libs/Common/Common.cpp:12:
/home/xiaoqi/openMVS/libs/Common/Types.h: In member function ‘bool SEACAVE::TColor<TYPE>::operator==(const SEACAVE::TColor<TYPE>&) const [with TYPE = unsigned char]’:
/home/xiaoqi/openMVS/libs/Common/Types.h:2098:108: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 ::operator==(const TColor& col) const { return (*((const uint32_t*)c) == *((con
                                                                     ^
/home/xiaoqi/openMVS/libs/Common/Types.h:2098:137: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
david1096 commented 2 years ago

Have you solve the problem? I get the same compile error...