0

I'm following the steps of a repository and to sample some dataset, PCL and VTK are needed. I had a lot of issues before regarding broken packages and had to delete and install again Ubuntu (18.04), so I am being extra careful from now on. According to the instructions provided:

git clone https://github.com/PointCloudLibrary/pcl.git
cd pcl
mkdir build && cd build
cmake ..
make -j4
sudo make install

And afterwards:

tar -xzvf VTK-8.2.0.zip  #I could not run this command so I just right clicked, uncompress. Can this be the problem?
cd VTK-8.2.0/
mkdir build && cd build
cmake ..
make -j4
sudo make install

All fine. Afterwards, in the script folder I need to run (sample):

cd sample
mkdir build && cd build
cmake ..
make

I get the following in this last step, make:

/home/mk/PCN-PyTorch/sample/mesh_sampling.cpp:39:10: fatal error: pcl/visualization/pcl_visualizer.h: No such file or directory
 #include <pcl/visualization/pcl_visualizer.h>

Doing some research about this missing pcl_visualizer.h, in the PCL github issues, they state the following, making me think that I can just uninstall both, and run them again but reverse order (First VTK and then PCL makes):

How did you obtain your PCL? It seems like it was built without visualization module, which is of course needed to build "PCL visualizer" tutorial.

Upon researching on "how to revert make safely", I see that with make uninstall:

sudo make uninstall

if the app was installed as root.

But this will work only if the developer of the package has taken care of making a good uninstall rule.

I also saw this post:

that make clean removes any intermediate or output files from your source / build tree. However, it only affects the source / build tree; it does not touch the rest of the filesystem and so will not remove previously installed software.

If you're lucky, running make uninstall will work. It's up to the library's authors to provide that, however; some authors provide an uninstall target, others don't.

PCL and VTK are well known libraries, so I think there shoulnd't be any issue. But this "IF YOU ARE LUCKY" worries me.

7
  • It doesn't look that you need to revert anything. You can install again with no problem.
    – Pilot6
    Commented May 10, 2022 at 10:37
  • Does that mean I don´t even need to do make uninstall? Just make clean on PCL, VTK and the sample directory of the model, and then run again the instructions commands provided in the proper order (VTK, PCL and sample folder of project)? @Pilot6
    – M.K
    Commented May 10, 2022 at 11:02
  • Even make clean is not mandatory. You had a build error and nothing was built, so noting is installed.
    – Pilot6
    Commented May 10, 2022 at 11:04
  • From my understanding, PCL and VTK were built properly, so I should make clean all, and start with VTK. But if not, what procedure do you recommend? (Sorry if it seems obvious, I really do not want to mess anything up again) @Pilot6
    – M.K
    Commented May 10, 2022 at 11:21
  • 1
    Well nothing in life is certain - however "well behaved" source packages default to installing into /usr/local so interaction with deb packages is minimized. (If you look in the pcl build directory's CMakeCache.txt file you should see something like CMAKE_INSTALL_PREFIX:PATH=/usr/local) Commented May 10, 2022 at 16:55

1 Answer 1

0

I tried with PCL's process of building and compiling after VTK's, and it did not fix the issue.

The solution was to delete PCL's build directory, build and compile again PCL:

cd pcl
mkdir build && cd build
cmake ..
make -j4
sudo make install

As mentioned by Users @Pilot6 and @steeldriver , there was no need to 'revert' anything or 'uninstall'.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .