flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.25k stars 648 forks source link

1.9.1 fails to build with CUDA on TX2 (sm_62) #396

Closed juzzlin closed 5 years ago

juzzlin commented 5 years ago

A lot of warnings also:


/home/nvidia/Libs/flann/src/cpp/flann/util/serialization.h(726): warning: integer conversion resulted in a change of sign

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(70): warning: overloaded virtual function "flann::NNIndex<Distance>::buildIndex [with Distance=flann::L2<float>]" is only partially overridden in class "flann::KDTreeCuda3dIndex<flann::L2<float>>"
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(787): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(194): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L2<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L2<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(787): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(208): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L2<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L2<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(787): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(70): warning: overloaded virtual function "flann::NNIndex<Distance>::buildIndex [with Distance=flann::L2_Simple<float>]" is only partially overridden in class "flann::KDTreeCuda3dIndex<flann::L2_Simple<float>>"
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2_Simple<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(806): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(194): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L2_Simple<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L2_Simple<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2_Simple<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(806): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(208): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L2_Simple<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L2_Simple<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L2_Simple<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(806): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(70): warning: overloaded virtual function "flann::NNIndex<Distance>::buildIndex [with Distance=flann::L1<float>]" is only partially overridden in class "flann::KDTreeCuda3dIndex<flann::L1<float>>"
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L1<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(826): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(194): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L1<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L1<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L1<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(826): here

/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.h(208): warning: overloaded function "flann::NNIndex<Distance>::knnSearch [with Distance=flann::L1<float>]" is hidden by "flann::KDTreeCuda3dIndex<Distance>::knnSearch [with Distance=flann::L1<float>]" -- virtual function override intended?
          detected during instantiation of class "flann::KDTreeCuda3dIndex<Distance> [with Distance=flann::L1<float>]" 
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(826): here

[ 40%] Building C object src/cpp/CMakeFiles/flann_cpp_s.dir/flann/ext/lz4hc.c.o
[ 46%] Building C object src/cpp/CMakeFiles/flann_s.dir/flann/ext/lz4hc.c.o
[ 53%] Linking CXX static library ../../lib/libflann_cpp_s.a
/home/nvidia/Libs/flann/src/cpp/flann/algorithms/kdtree_cuda_3d_index.cu(764): error: namespace "thrust" has no member "gather"

[ 53%] Built target flann_cpp_s
Scanning dependencies of target flann_cpp
[ 60%] Linking CXX shared library ../../lib/libflann_cpp.so
1 error detected in the compilation of "/tmp/tmpxft_00007683_00000000-6_kdtree_cuda_3d_index.cpp1.ii".
[ 60%] Built target flann_cpp
CMake Error at flann_cuda_s_generated_kdtree_cuda_3d_index.cu.o.cmake:266 (message):
  Error generating file
  /home/nvidia/Libs/flann/build/src/cpp/CMakeFiles/flann_cuda_s.dir/flann/algorithms/./flann_cuda_s_generated_kdtree_cuda_3d_index.cu.o

src/cpp/CMakeFiles/flann_cuda_s.dir/build.make:63: recipe for target 'src/cpp/CMakeFiles/flann_cuda_s.dir/flann/algorithms/flann_cuda_s_generated_kdtree_cuda_3d_index.cu.o' failed
make[2]: *** [src/cpp/CMakeFiles/flann_cuda_s.dir/flann/algorithms/flann_cuda_s_generated_kdtree_cuda_3d_index.cu.o] Error 1
CMakeFiles/Makefile2:243: recipe for target 'src/cpp/CMakeFiles/flann_cuda_s.dir/all' failed
make[1]: *** [src/cpp/CMakeFiles/flann_cuda_s.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
juzzlin commented 5 years ago

The actual error seems to be similar to this: https://github.com/ashwin/gDel3D/issues/2

juzzlin commented 5 years ago

Ok, this seems to be already fixed in master.

Auroratan commented 7 months ago

how to slove this problem?