PCL from source on Ubuntu 20
On Ubuntu 20, preparing the PCL module raises this error:
Prepare module deps/pcl ...
Run 'cmake -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_C_COMPILER_LAUNCHER="/usr/bin/ccache"
-DCMAKE_CXX_COMPILER_LAUNCHER="/usr/bin/ccache" -DARMARX_BUILD_TESTS="ON"
-DCMAKE_INSTALL_PREFIX="install" ..' in '/home/rkartmann/code/deps/pcl/build' ...
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found ClangFormat: /usr/bin/clang-format-13 (found suitable version "13.0.1", minimum required is "10")
-- Adding target 'format'
-- Performing Test HAVE_MARCH
-- Performing Test HAVE_MARCH - Success
-- 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
-- Using CPU native flags for SSE optimization: -msse4.2 -mfpmath=sse -march=native
-- Performing Test HAVE_AVX2
-- Performing Test HAVE_AVX2 - 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 components: C CXX
-- Found OpenMP, spec date 201511
-- 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.3.7
-- Found Eigen: /usr/include/eigen3 (Required is at least version "3.1")
-- Eigen found (include: /usr/include/eigen3, version: 3.3.7)
-- Checking for module 'flann>=1.9.1'
-- Found flann, version 1.9.1
-- Found FLANN: /usr/lib/x86_64-linux-gnu/libflann_cpp.so (Required is at least version "1.9.1")
-- FLANN found (include: /usr/include, lib: /usr/lib/x86_64-linux-gnu/libflann_cpp.so)
-- Checking for module 'libusb-1.0'
-- Found libusb-1.0, version 1.0.23
-- Found libusb: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Found OpenNI: /usr/lib/libOpenNI.so;libusb::libusb (found version "1.5.4.0")
-- OpenNI found (version: 1.5.4.0, include: /usr/include/ni, lib: /usr/lib/libOpenNI.so;libusb::libusb)
-- Found OpenNI2: /usr/lib/libOpenNI2.so;libusb::libusb (found version "2.2.0.33")
-- OpenNI2 found (version: 2.2.0.33, include: /usr/include/openni2, lib: /usr/lib/libOpenNI2.so;libusb::libusb)
-- 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
-- Could NOT find RSSDK2
-- RealSense SDK 2.0 (librealsense) support: not building because RSSDK2 not found
-- Checking for module 'metslib'
-- No package 'metslib' found
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.37")
-- Found Qhull: /usr/lib/x86_64-linux-gnu/libqhull_r.so
-- QHULL found (include: /usr/include, lib: /usr/lib/x86_64-linux-gnu/libqhull_r.so)
-- Found CUDA Toolkit v10.1
-- The CUDA compiler identification is unknown
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - failed
-- Check for working CUDA compiler: /home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/nvcc
-- Check for working CUDA compiler: /home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/nvcc - broken
CMake Error at /home/rkartmann/code/tools/cmake/3.21/cmake-3.21.3-linux-x86_64/share/cmake-3.21/Modules/CMakeTestCUDACompiler.cmake:56 (message):
The CUDA compiler
"/home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/nvcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_6ffb4/fast && /usr/bin/make -f CMakeFiles/cmTC_6ffb4.dir/build.make CMakeFiles/cmTC_6ffb4.dir/build
make[1]: Entering directory '/home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeTmp'
Building CUDA object CMakeFiles/cmTC_6ffb4.dir/main.cu.o
/home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/nvcc -c /home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_6ffb4.dir/main.cu.o
In file included from /home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/../targets/x86_64-linux/include/cuda_runtime.h:83,
from <command-line>:
/home/rkartmann/code/deps/cuda/cuda-10.1-cudnn-7.6/bin/../targets/x86_64-linux/include/crt/host_config.h:129:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
129 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
| ^~~~~
make[1]: *** [CMakeFiles/cmTC_6ffb4.dir/build.make:78: CMakeFiles/cmTC_6ffb4.dir/main.cu.o] Error 1
make[1]: Leaving directory '/home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_6ffb4/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
cmake/pcl_find_cuda.cmake:13 (enable_language)
CMakeLists.txt:363 (include)
-- Configuring incomplete, errors occurred!
See also "/home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeOutput.log".
See also "/home/rkartmann/code/deps/pcl/build/CMakeFiles/CMakeError.log".