PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.86k stars 4.61k forks source link

[custom] Ninja install fails to find non-existent libpcl_common.so.1.14.1.99 #6133

Closed PhilipDeegan closed 2 days ago

PhilipDeegan commented 3 days ago

Trying to run ninja install via a script like this on master branch

#!/usr/bin/env bash
set -exu
CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

(
    cd $CWD
    rm -rf build && mkdir build && cd build
    cmake -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DEigen3_DIR="/path/to/eigen/master/share/eigen3/cmake" \
    -DBoost_DIR="/path/to/boost/lib/cmake/Boost-1.86.0" \
    -DCMAKE_INSTALL_PREFIX=$PWD ../pcl
    ninja && ninja install
)

It tries to move a library which does not exist

CMake Error at common/cmake_install.cmake:57 (file):
  file INSTALL cannot find
  "/path/to/pcl/build/lib/libpcl_common.so.1.14.1.99": No such file
  or directory.
Call Stack (most recent call first):
  cmake_install.cmake:79 (include)

FAILED: CMakeFiles/install.util 
cd /path/to/pcl/master/build && /opt/py/python-3.11.4/lib/python3.11/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.

we can see there is a file, but with a different name

> find . | grep libpcl_common
./build/lib/libpcl_common.so
./build/lib/libpcl_common.so.1.14

ninja compilation has no issues

> ninja
[103/103] Creating library symlink lib/libpcl_octree.so.1.14 lib/libpcl_octree.so
PhilipDeegan commented 3 days ago

seems to be the case for make too

PhilipDeegan commented 3 days ago

the release from may 3rd has a similar but different error

CMake Error at common/cmake_install.cmake:57 (file):
  file INSTALL cannot find
  "/path/to/pcl/master/build/lib/libpcl_common.so.1.14.1": No such file or
  directory.
Call Stack (most recent call first):
  cmake_install.cmake:80 (include)
mvieth commented 3 days ago

So usually it should look like this (master branch, for the 1.14.1 release the same except .99 removed):

lrwxrwxrwx 1 markus markus   21 Sep 14 15:03 lib/libpcl_common.so -> libpcl_common.so.1.14
lrwxrwxrwx 1 markus markus   26 Sep 14 15:03 lib/libpcl_common.so.1.14 -> libpcl_common.so.1.14.1.99
-rwxrwxr-x 1 markus markus 6.7M Sep 14 15:03 lib/libpcl_common.so.1.14.1.99

libpcl_common.so.1.14.1.99 is the actual library, the other two are symlinks to it. In your case, are libpcl_common.so and libpcl_common.so.1.14 also symlinks? If yes, to what files? What is the situation for the other PCL modules, e.g. filters?

PhilipDeegan commented 3 days ago

I'm not on my linux box atm to check, but I've reproduced this via a github action

https://github.com/mkn/math.pcl/actions/runs/10870062782/job/30162182185#step:4:21758

https://github.com/mkn/math.pcl/blob/df8a84a103f3a7a2ba69bfc51136f19db7c8a6e8/.github/workflows/build_nix.yml

will try to get you an answer later today

PhilipDeegan commented 2 days ago

ah it seems there was a typo in my initial script and I was installing to the build dir, so cmake was a bit confused

sorry for the noise

mvieth commented 2 days ago

No problem, glad you found the solution.