Quantcast

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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

BoGoF

    Operating System and version: Ubuntu 16.04
    Compiler: GCC 4.8/ 5.0 & Clang 3.8
    PCL Version: 1.8.0 (Installing)

Expected Behavior

The source should build successfully.
Current Behavior

Error messages:
<------------------------------------------------------- terminal ------------------------------------------------------------------>
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?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Sérgio Agostinho
Hey, 

You don't need to make any changes to the CMakeLists.txt file. You just need to help it find your OMP installation.

Which OMP library did you install? Where are it's headers and shared libs?

Cheers, 
Sérgio

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

josuerocha
I need your help so much, I need to use PCL 1.8 with OpenNI2 for a project, however I am coming across this error when running cmake:

-- Could NOT find OpenNI2 (missing: OPENNI2_LIBRARY)
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)

I have created an environment variable using this command:

export OPENNI2_LIBRARY=/usr/local/lib/Redist

But it did not work. This Redist folder was copied from openNI2 build. Could you please help me? Please?

Thanks in advance.

This is the script I am using to install Freenect, OpenNI2 and PCL:



if [ ! -d "kinect" ]
then
mkdir kinect
fi

cd kinect

#INSTALLING FREENECT DRIVERS

cd kinect
sudo git clone https://github.com/OpenKinect/libfreenect
cd libfreenect
sudo mkdir build
cd build
sudo cmake .. -DBUILD_OPENNI2_DRIVER=ON
sudo make
sudo make install
sudo ldconfig /usr/local/lib64/
#sudo freenect-glview

SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/user/bin
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTPATH=$SCRIPTPATH'/lib'
echo $SCRIPTPATH

export LD_LIBRARY_PATH=export LD_LIBRARY_PATH=$SCRIPTPATH

sudo cp lib/OpenNI2-FreenectDriver/libFreenectDriver.so ../..

cd ../../

#INSTALLING OPENNI2
git clone https://github.com/occipital/openni2
cd openni2
make
cd Packaging
python ReleaseVersion.py x64
cd Final
tar jxf OpenNI-Linux-x64-2.2.tar.bz2
cd OpenNI-Linux-x64-2.2
sudo ./install.sh
cd ../../..

sudo cp ../libFreenectDriver.so Packaging/Final/OpenNI-Linux-x64-2.2/Redist/OpenNI2/Drivers
sudo cp ../libFreenectDriver.so Packaging/Final/OpenNI-Linux-x64-2.2/Samples/Bin/OpenNI2/Drivers
sudo cp ../libFreenectDriver.so Bin/x64-Release/OpenNI2/Drivers

cd ..

export OPENNI2_INCLUDE=/usr/local/include
export OPENNI2_LIBRARY=/usr/local/lib/Redist

sudo cp -R openni2/Packaging/Final/OpenNI-Linux-x64-2.2/Redist /usr/local/lib


export OPENNI2_INCLUDE=/home/jr/Desktop/kinect/openni2/Packaging/Final/OpenNI-Linux-x64-2.2/Include
export OPENNI2_LIBRARY=/home/jr/Desktop/kinect/openni2/Packaging/Final/OpenNI-Linux-x64-2.2/Redist/libOpenNI2.so

#PCL Installation
echo "\033[1;35m **************** \033[0;31m DOWNLOADING PCL \033[1;35m ****************\033[0m"
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.zip

echo "\033[1;35m **************** \033[0;31m INSTALLING PCL \033[1;35m **************** \033[0m"
unzip pcl-1.8.0.zip
cd pcl-pcl-1.8.0 && mkdir build && cd build

echo $OPENNI2_INCLUDE
echo $OPENNI2_LIBRARY

cmake ..
make -j 2 #Substituir pelo numero de CPUs disponíveis
sudo make -j 2 install
Loading...