PointCloudLibrary / pcl

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

1.10.0 `make_shared.h` results in "__CUDACC_VER__ is no longer supported" compile error #3729

Closed hyc-xyz closed 4 years ago

hyc-xyz commented 4 years ago

Your Environment

Context

Trying to compile master branch (commit no: f349f932bf2241bc88e5188c02a5fed97c2eed08) with CUDA

Current Behavior

Compile error message:

$ make -j4
[  0%] Building NVCC (Device) object cuda/features/CMakeFiles/pcl_cuda_features.dir/src/pcl_cuda_features_generated_normal_3d.cu.o
[  0%] Built target pcl_pcd_convert_NaN_nan
[  0%] Built target pcl_io_ply
[  0%] Building NVCC (Device) object cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o
[  1%] Built target pcl_gpu_containers
[  5%] Built target pcl_common
[  5%] Built target pcl_people
[  5%] Built target pcl_kdtree
[  5%] Built target pcl_octree
Scanning dependencies of target pcl_io
[  5%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cylinder.cpp.o
In file included from /usr/local/cuda/include/cuda_runtime.h:115:0,
                 from <command-line>:0:
/usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."
                        ^
In file included from /usr/local/cuda/include/cuda_runtime.h:115:0,
                 from <command-line>:0:
/usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."
                        ^
CMake Error at pcl_cuda_features_generated_normal_3d.cu.o.Release.cmake:220 (message):
  Error generating
  /home/hyc-pc/software/pcl/build/cuda/features/CMakeFiles/pcl_cuda_features.dir/src/./pcl_cuda_features_generated_normal_3d.cu.o

cuda/features/CMakeFiles/pcl_cuda_features.dir/build.make:63: recipe for target 'cuda/features/CMakeFiles/pcl_cuda_features.dir/src/pcl_cuda_features_generated_normal_3d.cu.o' failed
make[2]: *** [cuda/features/CMakeFiles/pcl_cuda_features.dir/src/pcl_cuda_features_generated_normal_3d.cu.o] Error 1
CMakeFiles/Makefile2:2368: recipe for target 'cuda/features/CMakeFiles/pcl_cuda_features.dir/all' failed
make[1]: *** [cuda/features/CMakeFiles/pcl_cuda_features.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  5%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o
CMake Error at pcl_cuda_segmentation_generated_connected_components.cu.o.Release.cmake:220 (message):
  Error generating
  /home/hyc-pc/software/pcl/build/cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/./pcl_cuda_segmentation_generated_connected_components.cu.o

cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/build.make:63: recipe for target 'cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o' failed
make[2]: *** [cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/src/pcl_cuda_segmentation_generated_connected_components.cu.o] Error 1
CMakeFiles/Makefile2:2395: recipe for target 'cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/all' failed
make[1]: *** [cuda/segmentation/CMakeFiles/pcl_cuda_segmentation.dir/all] Error 2
[  5%] Building CXX object sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_line.cpp.o
[  5%] Building CXX object io/CMakeFiles/pcl_io.dir/src/debayer.cpp.o
[  5%] Building CXX object io/CMakeFiles/pcl_io.dir/src/pcd_grabber.cpp.o
^Cio/CMakeFiles/pcl_io.dir/build.make:75: recipe for target 'io/CMakeFiles/pcl_io.dir/src/pcd_grabber.cpp.o' failed
sample_consensus/CMakeFiles/pcl_sample_consensus.dir/build.make:101: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cylinder.cpp.o' failed
make[2]: *** [io/CMakeFiles/pcl_io.dir/src/pcd_grabber.cpp.o] Interrupt
make[2]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cylinder.cpp.o] Interrupt
sample_consensus/CMakeFiles/pcl_sample_consensus.dir/build.make:127: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_line.cpp.o' failed
make[2]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_line.cpp.o] Interrupt
sample_consensus/CMakeFiles/pcl_sample_consensus.dir/build.make:114: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o' failed
make[2]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o] Interrupt
CMakeFiles/Makefile2:1688: recipe for target 'io/CMakeFiles/pcl_io.dir/all' failed
make[1]: *** [io/CMakeFiles/pcl_io.dir/all] Interrupt
CMakeFiles/Makefile2:1602: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/all' failed
make[1]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/all] Interrupt
Makefile:151: recipe for target 'all' failed
make: *** [all] Interrupt
hyc-xyz commented 4 years ago

Does it somehow relate to boost? https://github.com/BVLC/caffe/issues/6125 https://github.com/gunrock/gunrock/issues/597

kunaltyagi commented 4 years ago

Not a PCL issue. But your boost version seems ok. Can we see the CMake config output?

hyc-xyz commented 4 years ago

Not a PCL issue. But your boost version seems ok. Can we see the CMake config output?

$ cmake -DCMAKE_BUILD_TYPE=Release ..
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE ClangFormat_VERSION) (Required is at least version "7")
-- Using CPU native flags for SSE optimization: -march=native
-- Found OpenMP
-- Eigen found (include: /usr/include/eigen3, version: 3.2.92)
-- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so)
-- RealSense SDK 2 found (include: /usr/include, lib: realsense2::realsense2, version: 2.24.0)
-- Checking for module 'metslib'
--   No package 'metslib' found
-- QHULL found (include: /usr/include, lib: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
-- Found CUDA Toolkit v10.1
-- CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_53,code=sm_53;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_72,code=sm_72;-gencode;arch=compute_75,code=sm_75
-- 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.

-- VTK_MAJOR_VERSION 6, rendering backend: OpenGL
-- VTK found (include: /usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include;/usr/include/x86_64-linux-gnu;/usr/include/jsoncpp, libs: vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libz.so;vtkftgl;vtkFiltersModeling;vtkImagingSources;vtkInteractionStyle;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingGeneral;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;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;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOLegacy;vtkIOPLY;vtkRenderingLOD;vtkViewsContext2D;vtkViewsCore;vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingQt;vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel
-- Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS) 
-- DOXYGEN_FOUND 
-- HTML_HELP_COMPILER 
-- Found CPack generators: DEB
-- The following subsystems will be built:
--   common
--   kdtree
--   octree
--   search
--   sample_consensus
--   filters
--   2d
--   geometry
--   io
--   features
--   ml
--   segmentation
--   visualization
--   surface
--   registration
--   keypoints
--   tracking
--   recognition
--   stereo
--   cuda_common
--   cuda_features
--   cuda_segmentation
--   cuda_sample_consensus
--   outofcore
--   gpu_containers
--   gpu_utils
--   gpu_octree
--   gpu_features
--   gpu_kinfu
--   gpu_kinfu_large_scale
--   gpu_segmentation
--   people
--   tools
-- The following subsystems will not be built:
--   apps: No reason
--   cuda_io: Disabled by default.
--   cuda_apps: Disabled: cuda_io missing.
--   examples: Code examples are disabled by default.
--   gpu_people: Disabled by default.
--   gpu_surface: Disabled by default.
--   gpu_tracking: Disabled by default.
--   simulation: Disabled by default.
--   global_tests: No reason
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xyz/software/pcl/build
hyc-xyz commented 4 years ago

ccmake

BUILD_2d                         ON                                                       
 BUILD_CUDA                       ON                                                       
 BUILD_GPU                        ON                                                       
 BUILD_apps                       OFF                                                      
 BUILD_common                     ON                                                       
 BUILD_examples                   OFF                                                      
 BUILD_features                   ON                                                       
 BUILD_filters                    ON                                                       
 BUILD_geometry                   ON                                                       
 BUILD_global_tests               OFF                                                      
 BUILD_io                         ON                                                       
 BUILD_kdtree                     ON                                                       
 BUILD_keypoints                  ON                                                       
 BUILD_ml                         ON                                                       
 BUILD_octree                     ON                                                       
 BUILD_outofcore                  ON                                                       
 BUILD_people                     ON                                                       
 BUILD_recognition                ON                                                       
 BUILD_registration               ON                                                       
 BUILD_sample_consensus           ON                                                       
 BUILD_search                     ON                                                       
 BUILD_segmentation               ON                                                       
 BUILD_simulation                 OFF                                                      
 BUILD_stereo                     ON                                                       
 BUILD_surface                    ON                                                       
 BUILD_surface_on_nurbs           OFF                                                      
 BUILD_tools                      ON                                                       
 BUILD_tracking                   ON                                                       
 BUILD_visualization              ON                                                       
 CMAKE_BUILD_TYPE                 Release                                                  
 CMAKE_CONFIGURATION_TYPES        Debug;Release                                            
 CMAKE_CXX_STANDARD               14                                                       
 CMAKE_INSTALL_PREFIX             /usr/local                                               
 CUDA_ARCH_BIN                    3.0 3.5 5.0 5.2 5.3 6.0 6.1 7.0 7.2 7.5                                                   
 CUDA_ARCH_PTX                                                                             
 CUDA_HOST_COMPILER               /usr/bin/gcc-7                                           
 CUDA_SDK_ROOT_DIR                CUDA_SDK_ROOT_DIR-NOTFOUND                               
 CUDA_TOOLKIT_ROOT_DIR            /usr/local/cuda                                          
 CUDA_USE_STATIC_CUDA_RUNTIME     ON                                                       
 CUDA_rt_LIBRARY                  /usr/lib/x86_64-linux-gnu/librt.so                       
 DPKG_PROGRAM                     /usr/bin/dpkg                                            
 DSSDK_DIR                        DSSDK_DIR-NOTFOUND                                       
 ENSENSO_INCLUDE_DIR              ENSENSO_INCLUDE_DIR-NOTFOUND                             
ENSENSO_LIBRARY                  ENSENSO_LIBRARY-NOTFOUND                                 
 FLANN_INCLUDE_DIR                /usr/include                                             
 FLANN_LIBRARY                    /usr/lib/x86_64-linux-gnu/libflann_cpp.so                
 FLANN_LIBRARY_DEBUG              FLANN_LIBRARY_DEBUG-NOTFOUND                             
 GLEW_DIR                         GLEW_DIR-NOTFOUND                                        
 LIBUSB_1_INCLUDE_DIR             /usr/include                                             
 LIBUSB_1_LIBRARY                 /usr/lib/x86_64-linux-gnu/libusb-1.0.so                  
 OPENNI2_INCLUDE_DIR              OPENNI2_INCLUDE_DIR-NOTFOUND                             
 OPENNI2_LIBRARY                  OPENNI2_LIBRARY-NOTFOUND                                 
 OPENNI_INCLUDE_DIR               /usr/include/ni                                          
 OPENNI_LIBRARY                   /usr/lib/libOpenNI.so                                    
 PCAP_INCLUDE_DIR                 PCAP_INCLUDE_DIR-NOTFOUND                                
 PCAP_LIBRARY                     PCAP_LIBRARY-NOTFOUND                                    
 PCL_VERBOSITY_LEVEL              Info                                                     
 QHULL_LIBRARY                    /usr/lib/x86_64-linux-gnu/libqhull.so                    
 QHULL_LIBRARY_DEBUG              /usr/lib/x86_64-linux-gnu/libqhull.so                    
 Qt5Concurrent_DIR                /usr/lib/x86_64-linux-gnu/cmake/Qt5Concurrent            
 Qt5Core_DIR                      /usr/lib/x86_64-linux-gnu/cmake/Qt5Core                  
 Qt5Gui_DIR                       /usr/lib/x86_64-linux-gnu/cmake/Qt5Gui                   
 Qt5OpenGL_DIR                    /usr/lib/x86_64-linux-gnu/cmake/Qt5OpenGL                
 Qt5Widgets_DIR                   /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets               
 Qt5_DIR                          /usr/lib/x86_64-linux-gnu/cmake/Qt5                      
 RSSDK_DIR                        RSSDK_DIR-NOTFOUND                                       
 USB_10_INCLUDE_DIR               /usr/include                                             
 USB_10_LIBRARY                   /usr/lib/x86_64-linux-gnu/libusb-1.0.so                  
 VTK_DIR                          /usr/lib/cmake/vtk-6.2                                   
 WITH_CUDA                        ON                                                       
 WITH_DAVIDSDK                    OFF                                                      
 WITH_DOCS                        OFF                                                      
 WITH_DSSDK                       OFF                                                      
 WITH_ENSENSO                     OFF                                                      
 WITH_LIBUSB                      ON                                                       
 WITH_OPENGL                      ON                                                       
 WITH_OPENNI                      ON                                                       
 WITH_OPENNI2                     OFF                                                      
 WITH_PCAP                        ON                                                       
 WITH_PNG                         ON                                                       
 WITH_QHULL                       ON                                                       
 WITH_QT                          ON                                                       
 WITH_RSSDK                       OFF                                                      
 WITH_RSSDK2                      ON                                                       
 WITH_VTK                         ON                                                       
 flann_DIR                        flann_DIR-NOTFOUND                         
 realsense2_DIR                   /usr/lib/x86_64-linux-gnu/cmake/realsense2               
 tide_DIR                         tide_DIR-NOTFOUND                        
kunaltyagi commented 4 years ago

Your boost version isn't shown here. It is supposed to be an issue as per the caffe issue you linked.

Internet search sort-of confirms that. I'll close the issue since the cause isn't related to PCL, but feel free to continue the conversation, and post the solution if you manage to get one.

hyc-xyz commented 4 years ago

Why does master branch not find boost library?

As I check out pcl-1.9.1, the cmake shows that it finds boost library.

$ cmake ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/gcc-7
-- Check for working C compiler: /usr/bin/gcc-7 -- 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/g++-7
-- Check for working CXX compiler: /usr/bin/g++-7 -- 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
-- -- GCC > 4.3 found, enabling -Wabi
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- 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
-- FLANN found (include: , lib: flann_cpp)
-- 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_LIBRARIES OPENNI2_INCLUDE_DIRS) 
-- OpenNI2 grabber support: not building because OpenNI2 not found
-- Could NOT find FZAPI (missing: FZAPI_LIBS FZAPI_INCLUDE_DIRS) 
-- Fotonic camera support: not building because FZAPI not found
-- Could NOT find ENSENSO (missing: ENSENSO_LIBRARIES ENSENSO_INCLUDE_DIRS) 
-- IDS-Imaging Ensenso camera support: not building because Ensenso not found
-- Could NOT find davidSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR) 
-- David Vision Systems SDK support: not building because davidSDK not found
-- Could NOT find DSSDK (missing: DSSDK_LIBRARIES DSSDK_INCLUDE_DIRS) 
-- DepthSense SDK support: not building because DSSDK not found
-- Could NOT find RSSDK (missing: RSSDK_LIBRARIES RSSDK_INCLUDE_DIRS) 
-- RealSense SDK support: not building because RSSDK not found
-- 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: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/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)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA Toolkit v10.1
-- CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_53,code=sm_53;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_72,code=sm_72;-gencode;arch=compute_75,code=sm_75
-- 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.

-- VTK_MAJOR_VERSION 6, rendering backend: OpenGL
-- VTK found (include: /usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include;/usr/include/jsoncpp;/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/python2.7;/usr/include/x86_64-linux-gnu;/usr/include/hdf5/openmpi;/usr/include/libxml2;/usr/include/tcl, lib: vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libz.so;vtkftgl;vtkDICOMParser;vtkDomainsChemistry;vtkIOXML;vtkIOGeometry;vtkIOCore;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOXMLParser;/usr/lib/x86_64-linux-gnu/libexpat.so;vtkFiltersAMR;vtkParallelCore;vtkIOLegacy;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkFiltersHybrid;vtkImagingSources;vtkFiltersHyperTree;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelFlowPaths;vtkParallelMPI;vtkFiltersParallelGeometry;vtkFiltersParallelImaging;vtkFiltersParallelMPI;vtkFiltersParallelStatistics;vtkFiltersProgrammable;vtkFiltersPython;/usr/lib/x86_64-linux-gnu/libpython2.7.so;vtkWrappingPythonCore;vtkWrappingTools;vtkFiltersReebGraph;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersVerdict;verdict;vtkGUISupportQt;vtkInteractionStyle;vtkRenderingOpenGL;vtkImagingHybrid;vtkIOImage;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;vtkGUISupportQtOpenGL;vtkGUISupportQtSQL;vtkIOSQL;sqlite3;vtkGUISupportQtWebkit;vtkViewsQt;vtkViewsInfovis;vtkInfovisLayout;vtkRenderingLabel;vtkViewsCore;vtkInteractionWidgets;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkGeovisCore;vtkproj4;vtkIOAMR;/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;vtkIOEnSight;vtkIOExodus;vtkexoIIc;/usr/lib/x86_64-linux-gnu/libnetcdf_c++.so;/usr/lib/x86_64-linux-gnu/libnetcdf.so;vtkIOExport;vtkRenderingGL2PS;vtkRenderingContextOpenGL;/usr/lib/libgl2ps.so;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;vtkIOGDAL;vtkIOGeoJSON;vtkIOImport;vtkIOInfovis;/usr/lib/x86_64-linux-gnu/libxml2.so;vtkIOLSDyna;vtkIOMINC;vtkIOMPIImage;vtkIOMPIParallel;vtkIOMySQL;vtkIONetCDF;vtkIOODBC;vtkIOPLY;vtkIOParallel;vtkIOParallelExodus;vtkIOParallelLSDyna;vtkIOParallelNetCDF;vtkIOParallelXML;vtkIOPostgreSQL;vtkIOVPIC;VPIC;vtkIOVideo;vtkIOXdmf2;vtkxdmf2;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInfovisBoostGraphAlgorithms;vtkInteractionImage;vtkLocalExample;vtkParallelMPI4Py;vtkPythonInterpreter;vtkRenderingExternal;vtkRenderingFreeTypeFontConfig;vtkRenderingFreeTypeOpenGL;vtkRenderingImage;vtkRenderingLIC;vtkRenderingLOD;vtkRenderingMatplotlib;vtkRenderingParallel;vtkRenderingParallelLIC;vtkRenderingQt;vtkRenderingVolumeOpenGL;vtkTestingGenericBridge;vtkTestingIOSQL;vtkTestingRendering;vtkViewsContext2D;vtkViewsGeovis;vtkWrappingJava
-- Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS) 
-- Found Boost: /usr/include (found suitable version "1.58.0", minimum required is "1.40.0") found components: filesystem thread date_time iostreams system chrono atomic regex 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
-- Found Glew: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- DOXYGEN_FOUND 
-- HTML_HELP_COMPILER 
-- Found CPack generators: DEB
-- The following subsystems will be built:
--   common
--   kdtree
--   octree
--   search
--   sample_consensus
--   filters
--   2d
--   geometry
--   io
--   features
--   ml
--   segmentation
--   visualization
--   surface
--   registration
--   keypoints
--   tracking
--   recognition
--   stereo
--   outofcore
--   people
--   tools
-- The following subsystems will not be built:
--   apps: No reason
--   examples: Code examples are disabled by default.
--   simulation: Disabled by default.
--   global_tests: No reason
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xyz/software/pcl/build
hyc-xyz commented 4 years ago

Oh, sorry. The Boost message does show up in the cmake message while compiling pcl master branch

]-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/gcc-7
-- Check for working C compiler: /usr/bin/gcc-7 -- 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/g++-7
-- Check for working CXX compiler: /usr/bin/g++-7 -- 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") 
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE ClangFormat_VERSION) (Required is at least version "7")
-- Performing Test HAVE_MARCH
-- Performing Test HAVE_MARCH - Success
-- 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
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found OpenMP
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Checking for module 'eigen3'
--   Found eigen3, version 3.2.92
-- Found Eigen: /usr/include/eigen3 (Required is at least version "3.1") 
-- 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") 
-- 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_LIBRARIES OPENNI2_INCLUDE_DIRS) 
-- OpenNI2 grabber support: not building because OpenNI2 not found
-- Could NOT find ENSENSO (missing: ENSENSO_LIBRARIES ENSENSO_INCLUDE_DIRS) 
-- IDS-Imaging Ensenso camera support: not building because Ensenso not found
-- Could NOT find davidSDK (missing: DAVIDSDK_LIBRARY DAVIDSDK_INCLUDE_DIR) 
-- David Vision Systems SDK support: not building because davidSDK not found
-- Could NOT find DSSDK (missing: DSSDK_LIBRARIES DSSDK_INCLUDE_DIRS) 
-- DepthSense SDK support: not building because DSSDK not found
-- Could NOT find RSSDK (missing: RSSDK_LIBRARIES RSSDK_INCLUDE_DIRS) 
-- RealSense SDK support: not building because RSSDK not found
-- RealSense SDK 2 found (include: /usr/include, lib: realsense2::realsense2, version: 2.24.0)
-- 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: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/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)
-- Found CUDA Toolkit v10.1
-- CUDA NVCC target flags: -gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_53,code=sm_53;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_72,code=sm_72;-gencode;arch=compute_75,code=sm_75
-- 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.

-- VTK_MAJOR_VERSION 6, rendering backend: OpenGL
-- VTK found (include: /usr/include/vtk-6.2;/usr/include/freetype2;/usr/include/x86_64-linux-gnu/freetype2;/usr/include;/usr/include/x86_64-linux-gnu;/usr/include/jsoncpp, libs: vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libz.so;vtkftgl;vtkFiltersModeling;vtkImagingSources;vtkInteractionStyle;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingGeneral;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;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;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOLegacy;vtkIOPLY;vtkRenderingLOD;vtkViewsContext2D;vtkViewsCore;vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingQt;vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel
-- Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS) 
-- Found Boost: /usr/include (found suitable version "1.58.0", minimum required is "1.55.0") found components: filesystem date_time iostreams system regex 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
-- Found GLEW: /usr/include (found version "1.13.0") 
-- DOXYGEN_FOUND 
-- HTML_HELP_COMPILER 
-- Found CPack generators: DEB
-- The following subsystems will be built:
--   common
--   kdtree
--   octree
--   search
--   sample_consensus
--   filters
--   2d
--   geometry
--   io
--   features
--   ml
--   segmentation
--   visualization
--   surface
--   registration
--   keypoints
--   tracking
--   recognition
--   stereo
--   outofcore
--   people
--   tools
-- The following subsystems will not be built:
--   apps: No reason
--   examples: Code examples are disabled by default.
--   simulation: Disabled by default.
--   global_tests: No reason
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xyz/software/pcl-master/build
kunaltyagi commented 4 years ago

Why does master branch not find boost library?

CMake also performs lazy configuration. You must have run that on an existing compile-tree

hyc-xyz commented 4 years ago

I compile boost_1_67_0 and hint the compiler to find boost1.67.0

cmake .. -DCMAKE_BUILD_TYPE=Release \
  -DBoost_NO_BOOST_CMAKE=TRUE \
  -DBoost_NO_SYSTEM_PATHS=TRUE \
  -DBOOST_ROOT:PATHNAME=/home/hyc-pc/software/boost_1_67_0 \
  -DBOOST_LIBRARYDIR:FILEPATH=/home/hyc-pc/software/boost_1_67_0/stage/lib \
  -DBOOST_INCLUDEDIR:FILEPATH=/home/hyc-pc/software/boost_1_67_0

cmake message:

...
ViewsCore;vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingQt;vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel
-- Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS) 
-- Found Boost: /home/hyc-pc/software/boost_1_67_0 (found suitable version "1.67.0", minimum required is "1.67.0") found components: filesystem date_time iostreams system regex 
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
-- Found GLEW: /usr/include (found version "1.13.0") 
-- DOXYGEN_FOUND 
-- HTML_HELP_COMPILER 
...

However, it gives the same compile error:

  0%] Building NVCC (Device) object cuda/features/CMakeFiles/pcl_cuda_features.dir/src/pcl_cuda_features_generated_normal_3d.cu.o
[  0%] Building CXX object io/tools/CMakeFiles/pcl_pcd_convert_NaN_nan.dir/pcd_convert_NaN_nan.cpp.o
In file included from /usr/local/cuda/include/cuda_runtime.h:115:0,
                 from <command-line>:0:
/usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."

I tried boost 1.65.1, 1.67.0, 1.72.0, but none of them works for me =(

hyc-xyz commented 4 years ago

Ok, I just comment /usr/local/cuda/include/crt/common_functions.h line 74 works for me, but I think it is not a good solution.

However, I bump into another compile error:

/home/hyc-pc/software/pcl-master/gpu/kinfu_large_scale/tools/kinfuLS_app.cpp:784:5: error: expected ‘;’ before ‘std’
     std::cout << "Registration mode: " << (registration_ ? "On" : "Off (not supported by source)") << std::endl;

I found there is only OpenNi on my computer.

 // in ccmake
 OPENNI2_INCLUDE_DIR              OPENNI2_INCLUDE_DIR-NOTFOUND                                                                               
 OPENNI2_LIBRARY                  OPENNI2_LIBRARY-NOTFOUND                                                                                   
 OPENNI_INCLUDE_DIR               /usr/include/ni                                                                                            
 OPENNI_LIBRARY                   /usr/lib/libOpenNI.so     

so I change a few lines in gpu/kinfu_large_scale/tools/kinfuLS_app.cpp

// in gpu/kinfu_large_scale/tools/kinfuLS_app.cpp
 772   initRegistration ()                                                           
 773   {                                                                             
 774     registration_ =                                                             
 775       #ifdef HAVE_OPENNI                                                        
 776       capture_.providesCallback<pcl::ONIGrabber::sig_cb_openni_image_depth_image> ();
 777       #endif                                                                    
 778     //registration_ =                                                           
 779     //  #ifdef HAVE_OPENNI                                                      
 780     //  capture_.providesCallback<pcl::ONIGrabber::sig_cb_openni_image_depth_image> ()
 781     //  #endif                                                                  
 782     //  #if defined(HAVE_OPENNI) && defined(HAVE_OPENNI2)                       
 783     //  ||                                                                      
 784     //  #endif                                                                  
 785     //  #ifdef HAVE_OPENNI2                                                     
 786     //  capture_.providesCallback<pcl::io::OpenNI2Grabber::sig_cb_openni_image_depth_image> ();
 787     //  #endif                                                                  
 788     std::cout << "Registration mode: " << (registration_ ? "On" : "Off (not supported by source)     ") << std::endl;
 789   }   
hyc-xyz commented 4 years ago

I find the __CUDACC_VER__ issue is caused by the commits: 793d27d52080aa0bf017ae6ffdd8de45334bfb06 8259d96aa62362f245d9a139cf3df69af39b5470

kunaltyagi commented 4 years ago

Before those 2 commits, there is no compilation issue?

Is the inclusion of pcl/make_shared.h an issue or pcl/pcl_macros.h? Could you pin-point the cause of this please?

hyc-xyz commented 4 years ago

I am not sure what causes the issue, but I track the history of /pcl/gpu directory: compile 793d27d52080aa0bf017ae6ffdd8de45334bfb06 -> __CUDACC_VER__ is no longer supported compile 8259d96aa62362f245d9a139cf3df69af39b5470 -> pcl/cuda/common/include/pcl/cuda/point_cloud.h(199): error: shared_ptr is not a template compile ec7a3deb913f8ef16117a6d10328bb2fda537f22 -> OK

kunaltyagi commented 4 years ago

Could you create a MCVE, probably something similar to:

#include <pcl/make_shared.h>
int main(){}

If this gives an error, that gives a starting point to pin down the cause

hyc-xyz commented 4 years ago

Could you create a MCVE, probably something similar to:

#include <pcl/make_shared.h>
int main(){}

If this gives an error, that gives a starting point to pin down the cause

How should I build the example with CUDA?

I replaced usr/local/include/pcl-1.9/pcl/make_shared.h with the version in the commit 8259d96aa62362f245d9a139cf3df69af39b5470, but it compiled successfully.

find_package(PCL 1.9.1 REQUIRED)

find_package(CUDA) if(CUDA_FOUND) message(STATUS "Found CUDA Toolkit v${CUDA_VERSION_STRING}") endif()

list(APPEND LINK_LIBS ${PCL_LIBRARIES} ) list(APPEND INCLUDE_DIRS ${PCL_INCLUDE_DIRS} )

include_directories(${INCLUDE_DIRS}) add_executable(main src/main.cpp) target_link_libraries(main ${LINK_LIBS})


- main.cpp

include <pcl/make_shared.h>

int main(){}


- Directory tree:

. ├── build │   ├── CMakeCache.txt │   ├── CMakeFiles │   ├── cmake_install.cmake │   ├── main │   └── Makefile ├── CMakeLists.txt └── src └── main.cpp

kunaltyagi commented 4 years ago

How should I build the example with CUDA?

Create a minimum kernel .cu file and link it, the usual manner.

but it compiled successfully

Yeah, you didn't use nvcc for this. You're on the right track though. You need to create a dummy kernel and include this header there too.

hyc-xyz commented 4 years ago

How should I build the example with CUDA?

Create a minimum kernel .cu file and link it, the usual manner.

but it compiled successfully

Yeah, you didn't use nvcc for this. You're on the right track though. You need to create a dummy kernel and include this header there too.

OK. I can reproduce the error with a MCVE now:

int main(){
my_cuda_func();
return 0;
}


- `src/test.cu`

include <pcl/make_shared.h>

include

include "test.h"

global void my_kernel(){
printf("Hello!\n");
}

void my_cuda_func(){
my_kernel<<<1,1>>>();
cudaDeviceSynchronize();
}


- `include/test.h`

void my_cuda_func();


- CMakeList.txt

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(test)

set(CMAKE_CXX_STANDARD 14)

find_package(PCL 1.9.1 REQUIRED)

find_package(CUDA)
if(CUDA_FOUND)
message(STATUS "Found CUDA Toolkit v${CUDA_VERSION_STRING}")
endif()

list(APPEND LINK_LIBS
${PCL_LIBRARIES}
)
list(APPEND INCLUDE_DIRS
${PCL_INCLUDE_DIRS}
include
)

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -gencode arch=compute_75,code=sm_75)

include_directories(${INCLUDE_DIRS})
cuda_add_executable(main src/main.cpp src/test.cu)
target_link_libraries(main ${LINK_LIBS})


- Directory tree:

. ├── build │   ├── CMakeCache.txt │   ├── CMakeFiles │   ├── cmake_install.cmake │   ├── main │   └── Makefile ├── CMakeLists.txt ├── include │   └── test.h └── src ├── main.cpp └── test.cu

4 directories, 8 files


- Compile error message

-- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/gcc-7 -- Check for working C compiler: /usr/bin/gcc-7 -- 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/g++-7 -- Check for working CXX compiler: /usr/bin/g++-7 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Checking for module 'eigen3' -- Found eigen3, version 3.2.92 -- Found Eigen: /usr/include/eigen3 (Required is at least version "3.1") -- Eigen found (include: /usr/include/eigen3, version: 3.2.92) -- Found Boost: /usr/include (found suitable version "1.58.0", minimum required is "1.55.0") found components: system filesystem date_time iostreams serialization regex -- Checking for module 'flann' -- Found flann, version 1.8.4 -- Found FLANN: /usr/lib/x86_64-linux-gnu/libflann_cpp.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:

-- 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) WARNING io features related to pcap will be disabled WARNING io features related to png will be disabled -- Found libusb-1.0: /usr/include
WARNING io features related to libusb-1.0 will be disabled -- OpenNI found (include: /usr/include/ni, lib: /usr/lib/libOpenNI.so) -- Found Qhull: optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/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) -- looking for PCL_COMMON -- Found PCL_COMMON: /usr/local/lib/libpcl_common.so
-- looking for PCL_KDTREE -- Found PCL_KDTREE: /usr/local/lib/libpcl_kdtree.so
-- looking for PCL_OCTREE -- Found PCL_OCTREE: /usr/local/lib/libpcl_octree.so
-- looking for PCL_SEARCH -- Found PCL_SEARCH: /usr/local/lib/libpcl_search.so
-- looking for PCL_SAMPLE_CONSENSUS -- Found PCL_SAMPLE_CONSENSUS: /usr/local/lib/libpcl_sample_consensus.so
-- looking for PCL_FILTERS -- Found PCL_FILTERS: /usr/local/lib/libpcl_filters.so
-- looking for PCL_2D -- Found PCL_2D: /usr/local/include/pcl-1.10
-- looking for PCL_GEOMETRY -- Found PCL_GEOMETRY: /usr/local/include/pcl-1.10
-- looking for PCL_IO -- Found PCL_IO: /usr/local/lib/libpcl_io.so
-- looking for PCL_FEATURES -- Found PCL_FEATURES: /usr/local/lib/libpcl_features.so
-- looking for PCL_ML -- Found PCL_ML: /usr/local/lib/libpcl_ml.so
-- looking for PCL_SEGMENTATION -- Found PCL_SEGMENTATION: /usr/local/lib/libpcl_segmentation.so
-- looking for PCL_VISUALIZATION -- Found PCL_VISUALIZATION: /usr/local/lib/libpcl_visualization.so
-- looking for PCL_SURFACE -- Found PCL_SURFACE: /usr/local/lib/libpcl_surface.so
-- looking for PCL_REGISTRATION -- Found PCL_REGISTRATION: /usr/local/lib/libpcl_registration.so
-- looking for PCL_KEYPOINTS -- Found PCL_KEYPOINTS: /usr/local/lib/libpcl_keypoints.so
-- looking for PCL_TRACKING -- Found PCL_TRACKING: /usr/local/lib/libpcl_tracking.so
-- looking for PCL_RECOGNITION -- Found PCL_RECOGNITION: /usr/local/lib/libpcl_recognition.so
-- looking for PCL_STEREO -- Found PCL_STEREO: /usr/local/lib/libpcl_stereo.so
-- looking for PCL_OUTOFCORE -- Found PCL_OUTOFCORE: /usr/local/lib/libpcl_outofcore.so
-- looking for PCL_PEOPLE -- Found PCL_PEOPLE: /usr/local/lib/libpcl_people.so
-- Found PCL: pcl_common;pcl_kdtree;pcl_octree;pcl_search;pcl_sample_consensus;pcl_filters;pcl_io;pcl_features;pcl_ml;pcl_segmentation;pcl_visualization;pcl_surface;pcl_registration;pcl_keypoints;pcl_tracking;pcl_recognition;pcl_stereo;pcl_outofcore;pcl_people;/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;/usr/lib/x86_64-linux-gnu/libboost_iostreams.so;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so;optimized;/usr/lib/x86_64-linux-gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so;/usr/lib/libOpenNI.so;vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingFreeType;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libz.so;vtkftgl;vtkFiltersModeling;vtkImagingSources;vtkInteractionStyle;vtkInteractionWidgets;vtkFiltersHybrid;vtkImagingGeneral;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;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;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkIOGeometry;/usr/lib/x86_64-linux-gnu/libjsoncpp.so;vtkIOLegacy;vtkIOPLY;vtkRenderingLOD;vtkViewsContext2D;vtkViewsCore;vtkRenderingContextOpenGL;vtkRenderingOpenGL;vtkRenderingQt;vtkFiltersTexture;vtkGUISupportQt;vtkRenderingLabel;FLANN::FLANN (Required is at least version "1.9.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "10.1") -- Found CUDA Toolkit v10.1 -- Configuring done -- Generating done -- Build files have been written to: /home/hyc-pc/Projects/suction_fcn_ros_refactor/test_pcl/build hyc-pc@localhost:~/Projects/suction_fcn_ros_refactor/test_pcl/build$ hyc-pc@localhost:~/Projects/suction_fcn_ros_refactor/test_pcl/build$ make [ 33%] Building NVCC (Device) object CMakeFiles/main.dir/src/main_generated_test.cu.o

:0:19: warning: ISO C++11 requires whitespace after the macro name In file included from /usr/local/cuda/include/cuda_runtime.h:115:0, from :0: /usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported. Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions #define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported. Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead." ^ CMake Error at main_generated_test.cu.o.cmake:220 (message): Error generating /home/hyc-pc/Projects/suction_fcn_ros_refactor/test_pcl/build/CMakeFiles/main.dir/src/./main_generated_test.cu.o CMakeFiles/main.dir/build.make:63: recipe for target 'CMakeFiles/main.dir/src/main_generated_test.cu.o' failed make[2]: *** [CMakeFiles/main.dir/src/main_generated_test.cu.o] Error 1 CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/main.dir/all' failed make[1]: *** [CMakeFiles/main.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 ``` ----------------------------------------------------------------------- Comment out the `#include ` in `src/test.cu` and the error disappears.
kunaltyagi commented 4 years ago

Nice. Thanks for the reproduction. Let's see where the issue in make_shared is.

stale[bot] commented 4 years ago

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.

kunaltyagi commented 4 years ago

I believe the problem should no longer be an issue in master. I might be wrong. Could you please test against PCL 1.11?

stale[bot] commented 4 years ago

Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.

kunaltyagi commented 4 years ago

Closing since our CI reports nothing wrong