报错代码如下:
-- Checking for module 'metslib'
-- Found metslib, version 0.5.3
-- 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.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 v11.1
-- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-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
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so found components: OpenGL GLX
CMake Error at /usr/local/lib/cmake/vtk-9.2/vtkDetectLibraryType.cmake:23 (message):
The `PATH` argument is required.
Call Stack (most recent call first):
/usr/local/lib/cmake/vtk-9.2/FindFreetype.cmake:179 (vtk_detect_library_type)
/usr/local/lib/cmake/vtk-9.2/patches/3.19/FindX11.cmake:235 (find_package)
/usr/local/lib/cmake/vtk-9.2/VTK-vtk-module-find-packages.cmake:350 (find_package)
/usr/local/lib/cmake/vtk-9.2/vtk-config.cmake:152 (include)
CMakeLists.txt:362 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/yg/pcl-pcl-1.8.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/yg/pcl-pcl-1.8.0/build/CMakeFiles/CMakeError.log".
原因是我的CMake是3.20 ,换成了CMake3.10之后就好了。
解决方法来源:
https://github.com/AvtechScientific/ASL/issues/48
CMake降级方法:
Cmake降级