Home > OS >  why cmake not compiling for pcl
why cmake not compiling for pcl

Time:01-23

I am trying to compile freshly installed PCL library in WSL. I followed the steps given in the thread: https://stackoverflow.com/questions/58040066/how-to-compile-point-cloud-library-pcl-with-examples-ubuntu. I installed all the required dependencies mentioned in the thread but I am running into compilation error.

CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
The OLD behavior for policy CMP0048 will be removed from a futur 
version of CMake.l/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)
The cmake-policies(7) manual explains that the OLD behaviors of al 
(find_package) policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances.  
Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.



The cmake-policies(7) manual explains that the OLD behaviors of all 
policies are deprecated and that a policy should be set to OLD only 
under specific short-term circumstances.  


--Could NOT find LIBUSB_1 (missing: LIBUSB_1_LIBRARY LIBUSB_1_INCLUDE_DIR)
-- Checking for module 'metslib'
-- No package 'metslib' found
-- Configuring incomplete, errors occurred!
-- QHULL found (include: /usr/include, lib: 
   optimized;/usr/lib/x86_64-linux gnu/libqhull.so;debug;/usr/lib/x86_64-linux-gnu/libqhull.so)
   CMake Error at /usr/local/lib/cmake/vtk 9.2/vtkDetectLibraryType.cmake:23 (message):
   The `PATH` argument is required.
    
   Projects should be ported to the NEW behavior and not rely on 
   setting a policy to OLD.

I did not quite understand the warning written in the first line. Does it have to do anything with the CMake version? I am new to cmake and cannot figure this out. Some help will be appreciated :)

CodePudding user response:

You are trying to compile on a WSL which is just a subsystem i.e. it's without an X-server. Simple as that. Look at this line:

/usr/local/lib/cmake/vtk-9.2/patches/3.19/FindX11.cmake:235(find_package)

Long story short, you can't might be able to compile it on WSL, because but VTK needs an X-server for it's visualisation and you need to start by getting the X-server up and running. I'm really not sure how this would run on a WSL even if you got an X-server to work with WSL, but I might be wrong here.

EDIT: Apparently it is possible to get an X-server to work on WSL by forwarding it, but I still believe (especially since you are new) that it's more work then just getting a dual-boot working.

EDIT2: Tsyvarev was kind enough to provide a great link on how to get X-server configured on WSL.

  • Related