cdcseacave / openMVS

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

Build Failed Can't find openMP_C #253

Open GillianYue opened 6 years ago

GillianYue commented 6 years ago

When I try to use CMake it gives me the following error:

-- The C compiler identification is AppleClang 8.1.0.8020042 -- The CXX compiler identification is AppleClang 8.1.0.8020042 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Deprecation Warning at CMakeLists.txt:30 (cmake_policy): The OLD behavior for policy CMP0011 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Performing Test COMPILER_HAS_CXX11_FLAG -- Performing Test COMPILER_HAS_CXX11_FLAG - Success -- Performing Test HAVE_CXX_STD_C++11 -- Performing Test HAVE_CXX_STD_C++11 - Success -- Performing Test HAVE_C_STD_C++11 -- Performing Test HAVE_C_STD_C++11 - Failed -- Performing Test HAVE_CXX_STDLIB_LIBC++ -- Performing Test HAVE_CXX_STDLIB_LIBC++ - Success -- Performing Test HAVE_C_STDLIB_LIBC++ -- Performing Test HAVE_C_STDLIB_LIBC++ - Success -- Looking for inttypes.h -- Looking for inttypes.h - not found -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) (found version "1.0") -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) (found version "1.0") -- Can't find OpenMP. Continuing without it. -- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Looking for pthread.h -- Looking for pthread.h - not found CMake Error at /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindThreads.cmake:212 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindCUDA.cmake:826 (find_package) CMakeLists.txt:81 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/Users/gillianyue/openMVS_build/CMakeFiles/CMakeOutput.log". See also "/Users/gillianyue/openMVS_build/CMakeFiles/CMakeError.log".

cdcseacave commented 6 years ago

the problem seems to be CUDA, pls disable it when doing the CMake build

GillianYue commented 6 years ago

Thanks! How exactly can I do that?

GillianYue commented 6 years ago

So I tried to add this line -DNO_CUDA=1 // disable CUDA when building but it gave me the same error..

-- The C compiler identification is AppleClang 8.1.0.8020042 -- The CXX compiler identification is AppleClang 8.1.0.8020042 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Deprecation Warning at CMakeLists.txt:30 (cmake_policy): The OLD behavior for policy CMP0011 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Performing Test COMPILER_HAS_CXX11_FLAG -- Performing Test COMPILER_HAS_CXX11_FLAG - Success -- Performing Test HAVE_CXX_STD_C++11 -- Performing Test HAVE_CXX_STD_C++11 - Success -- Performing Test HAVE_C_STD_C++11 -- Performing Test HAVE_C_STD_C++11 - Failed -- Performing Test HAVE_CXX_STDLIB_LIBC++ -- Performing Test HAVE_CXX_STDLIB_LIBC++ - Success -- Performing Test HAVE_C_STDLIB_LIBC++ -- Performing Test HAVE_C_STDLIB_LIBC++ - Success -- Looking for inttypes.h -- Looking for inttypes.h - not found -- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) (found version "1.0") -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) (found version "1.0") -- Can't find OpenMP. Continuing without it. -- Found OpenGL: /System/Library/Frameworks/OpenGL.framework
-- Looking for pthread.h -- Looking for pthread.h - not found CMake Error at /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Threads (missing: Threads_FOUND) Call Stack (most recent call first): /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE) /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindThreads.cmake:212 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) /usr/local/Cellar/cmake/3.9.3_1/share/cmake/Modules/FindCUDA.cmake:826 (find_package) CMakeLists.txt:81 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/Users/gillianyue/openMVS_build/CMakeFiles/CMakeOutput.log". See also "/Users/gillianyue/openMVS_build/CMakeFiles/CMakeError.log".

KrasnovPavel commented 3 years ago

I know this is necroposting but i had same error. For me it happend when i build openMVS from vcpkg with cuda and openmp. .\vcpkg.exe install openmvs[cuda,openmp] But since i don't actually need cuda and openmp i removed package and reinstal it without them. .\vcpkg.exe install openmvs Now cmake generates successfully.