PCLConfig.cmake fails to find pcl due to usrmerge

Bug #1896118 reported by Lucas D. Cagle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcl (Ubuntu)
New
Undecided
Unassigned

Bug Description

1) 20.04 LTS
2) 1.10.0+dfsg-5ubuntu1
3) cmake's find_package() finds pcl for project build
4) cmake's find_package() fails to find pcl

On fresh installs of 20.04, /lib is symlinked to /usr/lib by default. This seems to cause problems with the relative paths used at line 401 in PCLConfig.cmake.in to set PCL_ROOT. cmake seems to be searching /lib first for the cmake config files. This causes the relative path used in line 401 to resolve to / instead of the intended /usr, which then cause subsequent lines to fail to find pcl.

For full disclosure, I encountered this while using a Singularity container, but I am largely confident this isn't a container-specific issue.

Revision history for this message
Jochen Sprickerhof (v-launchpad-jochen-sprickerhof-de) wrote :

I failed to reproduce this using:
1. Fresh installed 20.4
2. sudo apt install g++ cmake libpcl-dev
3. echo "find_package(PCL)" > CMakeLists.txt
4- cmake .

Can you try it again and maybe post your CMakeCache.txt?

Revision history for this message
Lucas D. Cagle (daftpwner) wrote :

At the moment, I don't have a machine I can do a fresh reinstall of 20.04 on, but I can reproduce this in a minimal Singularity container. I can share the container recipe file if that would help.

Running the following (after opening a shell in the container) reproduces the error:
1. echo "find_package(PCL)" > CMakeLists.txt
2- cmake .

I've attached my CMakeCache.txt. Running 'cat CMakeCache.txt | grep PCL' produces the following:

Singularity> cat CMakeCache.txt | grep PCL
//The directory containing a CMake configuration file for PCL.
PCL_DIR:PATH=/lib/x86_64-linux-gnu/cmake/pcl

When I get the chance, I can also try it on a fresh 20.04 install once one of my machines is free.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.