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.
make uninstall
? Justmake 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)? @Pilot6make clean
is not mandatory. You had a build error and nothing was built, so noting is installed./usr/local
so interaction with deb packages is minimized. (If you look in the pcl build directory'sCMakeCache.txt
file you should see something likeCMAKE_INSTALL_PREFIX:PATH=/usr/local
)