There are several issues related to compilation in an end-of-2021 system.
My setup:
NVIDIA GeForce RTX 3070
x86_64 GNU/Linux Ubuntu 20.04.3 LTS
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
cuda_11.5.0_495.29.05
Ubuntu 20 lacks of "metslib" package: compiled from sources
wget https://www.coin-or.org/download/source/metslib/metslib-0.5.3.tgz
tar xzvf metslib-0.5.3.tgz
cd metslib-0.5.3
./configure --prefix=/usr/local
make
sudo make install
The imported target "vtk" references the file "/usr/bin/vtk" but "this file does not exist". And so on.
There are several issues related to compilation in an end-of-2021 system.
My setup:
NVIDIA GeForce RTX 3070
x86_64 GNU/Linux Ubuntu 20.04.3 LTS
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
cuda_11.5.0_495.29.05
Ubuntu 20 lacks of "metslib" package: compiled from sources
The imported target "vtk" references the file "/usr/bin/vtk" but "this file does not exist". And so on.
CUDA_CUDA_LIBRARY (ADVANCED) -> NOTFOUND
cmake -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_TESTS=ON ..
CUB_COMPILER_DEPRECATION_SOFT(C++14, C++11); Edit CMakeLists.txt:
Error compiling demo.cpp
src/apps/demo.cpp:311:43: error: "CV_LOAD_IMAGE_ANYDEPTH" was not declared in this scope
Edit and change that to:With these changes, compilation ends succesfully. But "bin/app" complains:
So, I tried replacing PCL 1.10 from distribution with my own compiled PCL 1.12.0 (with CUDA and GPU support).
Then, I had to change include/kfusion/cuda/marching_cubes.hpp too, replacing
typedef boost::shared_ptr<MarchingCubes> Ptr;
withtypedef pcl::shared_ptr<MarchingCubes> Ptr;
But resulting "app" still can't determine number of cores.
So, I've edited src/kfusion/core.cpp following the example in
helper_cuda_drvapi.h
i.e., add {0x80, 64}, {0x86, 128} to gpuArchCoresPerSM array, and now seems to be OK.
Device 0: "NVIDIA GeForce RTX 3070" 7960Mb, sm_86, 5888 cores, Driver/Runtime ver.11.40/11.50
You can find a quick n' dirty patch here: sobfu.patch
With these changes, binaries are generated, and "app" works as expected with the "Snoopy" example.