Hi Timon,

* Timon Engelke <[email protected]> [2024-08-30 10:32]:
When building a CMake package using PCL on Ubuntu, I am getting the error

CMake Error at /lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:63 (message):
 PCL can not be found on this machine
Call Stack (most recent call first):
 /lib/x86_64-linux-gnu/cmake/pcl/PCLConfig.cmake:459 (pcl_report_not_found)
 CMakeLists.txt:19 (find_package)

When investigating the issue, I found that PCL_ROOT is not set correctly in 
PCLConfig.cmake on line 439.
It is set to / instead of /usr. The reason for that seems to be that the path 
of CMAKE_CURRENT_LIST_DIR is expected to be a subdirectory of /usr/lib, but it 
is a subdirectory of /lib.
I was able to fix the issue by replacing the path relative to 
CMAKE_CURRENT_LIST_DIR by /usr.
I believe that this is a Debian bug because there is already a Debian patch 
affecting exactly this line in PCLConfig.cmake.

This seems to be the same problem as https://bugs.launchpad.net/ubuntu/+source/pcl/+bug/1896118 which I still can't reproduce:

mmdebstrap --variant=apt --components=main,universe --include=g++,cmake,libpcl-dev 
--chrooted-customize-hook='echo "find_package(PCL)" > CMakeLists.txt; cmake .' 
noble /dev/null

What is the output of ls -l /lib on your system?

Cheers Jochen

Attachment: signature.asc
Description: PGP signature

-- 
debian-science-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to