PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.96k stars 4.62k forks source link

Error: Could NOT find OpenMP when complie from source (Ubuntu 16.04) #1673

Closed jb892 closed 8 years ago

jb892 commented 8 years ago

Your Environment

The source should build successfully.

Current Behavior

Error messages:

jack@jack-All-Series:~/Documents/pcl-pcl-1.8.0/build$ cmake ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Using CPU native flags for SSE optimization:  -march=native
-- Performing Test HAVE_MM_MALLOC
-- Performing Test HAVE_MM_MALLOC - Success
-- Performing Test HAVE_POSIX_MEMALIGN
-- Performing Test HAVE_POSIX_MEMALIGN - Success
-- Performing Test HAVE_SSE4_2_EXTENSIONS
-- Performing Test HAVE_SSE4_2_EXTENSIONS - Success
-- Performing Test HAVE_SSE4_1_EXTENSIONS
-- Performing Test HAVE_SSE4_1_EXTENSIONS - Success
-- Performing Test HAVE_SSSE3_EXTENSIONS
-- Performing Test HAVE_SSSE3_EXTENSIONS - Success
-- Performing Test HAVE_SSE3_EXTENSIONS
-- Performing Test HAVE_SSE3_EXTENSIONS - Success
-- Performing Test HAVE_SSE2_EXTENSIONS
-- Performing Test HAVE_SSE2_EXTENSIONS - Success
-- Performing Test HAVE_SSE_EXTENSIONS
-- Performing Test HAVE_SSE_EXTENSIONS - Success
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS) 
-- Not found OpenMP
-- Checking for module 'eigen3'
--   Found eigen3, version 3.2.92
-- Found Eigen: /usr/include/eigen3  
-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- Checking for module 'flann>=1.7.0'
--   Found flann, version 1.8.4
-- Found FLANN: /usr/lib/x86_64-linux-gnu/libflann_cpp.so (Required is at least version "1.7.0") 
-- FLANN found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libflann_cpp.so;debug;/usr/lib/x86_64-linux-gnu/libflann_cpp.so)
-- Found LIBUSB_1: /usr/lib/x86_64-linux-gnu/libusb-1.0.so  
-- Checking for module 'libusb-1.0'
--   Found libusb-1.0, version 1.0.20
-- Found USB_10: /usr/lib/x86_64-linux-gnu/libusb-1.0.so  
-- Found OpenNI: /usr/lib/libOpenNI.so  
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- Could NOT find OpenNI2 (missing:  OPENNI2_LIBRARY OPENNI2_INCLUDE_DIRS) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  OpenNI2 grabber support: not building because OpenNI2 not found
Call Stack (most recent call first):
  CMakeLists.txt:296 (PCL_ADD_GRABBER_DEPENDENCY)

-- Could NOT find FZAPI (missing:  FZAPI_LIBS FZAPI_INCLUDE_DIRS) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  Fotonic camera support: not building because FZAPI not found
Call Stack (most recent call first):
  CMakeLists.txt:297 (PCL_ADD_GRABBER_DEPENDENCY)

-- Could NOT find ensenso (missing:  ENSENSO_LIBRARY ENSENSO_INCLUDE_DIR) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  IDS-Imaging Ensenso camera support: not building because Ensenso not found
Call Stack (most recent call first):
  CMakeLists.txt:298 (PCL_ADD_GRABBER_DEPENDENCY)

-- Could NOT find davidSDK (missing:  DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  David Vision Systems SDK support: not building because davidSDK not found
Call Stack (most recent call first):
  CMakeLists.txt:299 (PCL_ADD_GRABBER_DEPENDENCY)

-- Could NOT find DSSDK (missing:  DSSDK_LIBRARIES DSSDK_INCLUDE_DIRS) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  DepthSense SDK support: not building because DSSDK not found
Call Stack (most recent call first):
  CMakeLists.txt:300 (PCL_ADD_GRABBER_DEPENDENCY)

-- Could NOT find RSSDK (missing:  RSSDK_LIBRARIES RSSDK_INCLUDE_DIRS) 
CMake Warning at cmake/pcl_targets.cmake:858 (message):
  RealSense SDK support: not building because RSSDK not found
Call Stack (most recent call first):
  CMakeLists.txt:301 (PCL_ADD_GRABBER_DEPENDENCY)

-- Checking for module 'metslib'
--   No package 'metslib' found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.54") 
-- Found Qhull: /usr/lib/x86_64-linux-gnu/libqhull.so  
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

-- VTK_MAJOR_VERSION 6, rendering backend: OpenGL
-- VTK found (include: /usr/include/vtk-6.2;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent;/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include;/usr/lib/openmpi/include;/usr/lib/openmpi/include/openmpi;/usr/include;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include/x86_64-linux-gnu;/usr/include/jsoncpp;/usr/include/hdf5/openmpi;/usr/include/python2.7;/usr/include/libxml2;/usr/include/tcl, lib: vtkFiltersReebGraph;vtkFiltersCore;vtkCommonExecutionModel;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkParallelMPI;vtkParallelCore;vtkIOLegacy;vtkIOCore;/usr/lib/x86_64-linux-gnu/libz.so;vtkLocalExample;verdict;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkFiltersExtraction;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;vtkftgl;vtkRenderingQt;vtkFiltersTexture;vtkGUISupportQt;vtkInteractionStyle;vtkRenderingOpenGL;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkmetaio;/usr/lib/x86_64-linux-gnu/libjpeg.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libtiff.so;vtkRenderingLabel;vtkFiltersParallel;vtkFiltersModeling;vtkFiltersAMR;vtkIOMINC;vtkFiltersHybrid;vtkImagingSources;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib/libhdf5_hl.so;/usr/lib/openmpi/lib/libmpi.so;vtkInteractionWidgets;vtkImagingGeneral;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkInteractionImage;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkInfovisLayout;vtkImagingMorphological;sqlite3;vtkFiltersPython;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkWrappingPythonCore;vtkWrappingTools;vtkIOParallelNetCDF;vtkIOParallel;vtkIONetCDF;vtkIOXML;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkexoIIc;vtkIOAMR;vtkIOMPIImage;vtkTestingGenericBridge;vtkViewsContext2D;vtkViewsCore;vtkRenderingVolumeOpenGL;VPIC;vtkFiltersParallelGeometry;vtkGUISupportQtOpenGL;vtkRenderingParallelLIC;vtkRenderingLIC;vtkIOImport;vtkRenderingGL2PS;vtkRenderingContextOpenGL;/usr/lib/libgl2ps.so;vtkImagingMath;vtkImagingStencil;vtkRenderingMatplotlib;vtkPythonInterpreter;vtkFiltersParallelFlowPaths;vtkViewsInfovis;vtkFiltersImaging;vtkGUISupportQtWebkit;vtkViewsQt;vtkIOParallelXML;vtkIOExodus;vtkproj4;vtkGUISupportQtSQL;vtkIOSQL;vtkIOFFMPEG;vtkIOMovie;/usr/lib/x86_64-linux-gnu/libtheoraenc.so;/usr/lib/x86_64-linux-gnu/libtheoradec.so;/usr/lib/x86_64-linux-gnu/libogg.so;vtkParallelMPI4Py;vtkGeovisCore;vtkWrappingJava;vtkIOInfovis;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkFiltersSelection;vtkFiltersProgrammable;vtkRenderingParallel;vtkDomainsChemistry;vtkFiltersParallelImaging;vtkIOPLY;vtkIOParallelLSDyna;vtkIOLSDyna;vtkRenderingImage;vtkIOODBC;vtkTestingRendering;vtkInfovisBoostGraphAlgorithms;vtkFiltersVerdict;vtkRenderingLOD;vtkFiltersHyperTree;vtkImagingStatistics;vtkFiltersSMP;vtkIOEnSight;vtkIOXdmf2;vtkxdmf2;vtkTestingIOSQL;vtkViewsGeovis;vtkIOParallelExodus;vtkFiltersParallelStatistics;vtkRenderingFreeTypeOpenGL;vtkIOVPIC;vtkIOGDAL;vtkIOMySQL;vtkIOGeoJSON;vtkRenderingFreeTypeFontConfig;vtkIOExport;vtkIOVideo;vtkIOMPIParallel;vtkIOPostgreSQL;vtkRenderingExternal;vtkFiltersParallelMPI
-- Could NOT find PCAP (missing:  PCAP_LIBRARIES PCAP_INCLUDE_DIRS) 
-- Looking for pthread.h
-- Looking for pthread.h - not found
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindThreads.cmake:223 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:65 (find_package)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1338 (find_dependency)
  cmake/pcl_find_boost.cmake:37 (find_package)
  CMakeLists.txt:417 (include)

-- Configuring incomplete, errors occurred!
See also "/home/jack/Documents/pcl-pcl-1.8.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/jack/Documents/pcl-pcl-1.8.0/build/CMakeFiles/CMakeError.log".

Possible Solution

Switch C++ compiler to gcc-5? What changes should I make in CMakeLists file?

Code to Reproduce

Context

SergioRAgostinho commented 8 years ago

As you can see here it's supported since 4.2. Do you have libgomp installed?

Also closing since I confirmed things are working on my 16.04 system.