error: texture is not a template
jiapei100 opened this issue · comments
Pei JIA commented
Describe the error
[ 75%] Built target pcl_stereo_ground_segmentation_autogen
make -f apps/CMakeFiles/pcl_manual_registration_autogen.dir/build.make apps/CMakeFiles/pcl_manual_registration_autogen.dir/depend
make[2]: Entering directory '....../pcl/build'
cd ....../pcl/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" ....../pcl ....../pcl/apps ....../pcl/build ....../pcl/build/apps ....../pcl/build/apps/CMakeFiles/pcl_manual_registration_autogen.dir/DependInfo.cmake "--color="
make[2]: Leaving directory '....../pcl/build'
make -f apps/CMakeFiles/pcl_manual_registration_autogen.dir/build.make apps/CMakeFiles/pcl_manual_registration_autogen.dir/build
make[2]: Entering directory '....../pcl/build'
cd ....../pcl/build/apps && /usr/bin/cmake -E cmake_autogen ....../pcl/build/apps/CMakeFiles/pcl_manual_registration_autogen.dir/AutogenInfo.json RelWithDebInfo
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(51): error: texture is not a template
TextureBinder(const DeviceArray2D<T>& arr, const struct texture<T, 2, readMode>& tex) : texref(&tex)
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(50): warning #445-D: constant "readMode" is not used in declaring the parameter types of function template "pcl::gpu::TextureBinder::TextureBinder"
template<class T, enum cudaTextureReadMode readMode>
^
Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(58): error: texture is not a template
TextureBinder(const DeviceArray<T>& arr, const struct texture<T, 1, readMode> &tex) : texref(&tex)
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(57): warning #445-D: constant "readMode" is not used in declaring the parameter types of function template "pcl::gpu::TextureBinder::TextureBinder<T,readMode>(const pcl::gpu::DeviceArray<T> &, const <error-type> &)"
template<class T, enum cudaTextureReadMode readMode>
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(65): error: texture is not a template
TextureBinder(const PtrStepSz<T>& arr, const struct texture<T, 2, readMode>& tex) : texref(&tex)
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(64): warning #445-D: constant "readMode" is not used in declaring the parameter types of function template "pcl::gpu::TextureBinder::TextureBinder<T,readMode>(const pcl::gpu::PtrStepSz<T> &, const <error-type> &)"
template<class T, enum cudaTextureReadMode readMode>
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(72): error: texture is not a template
TextureBinder(const PtrSz<T>& arr, const struct texture<T, 1, readMode> &tex) : texref(&tex)
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(71): warning #445-D: constant "readMode" is not used in declaring the parameter types of function template "pcl::gpu::TextureBinder::TextureBinder<T,readMode>(const pcl::gpu::PtrSz<T> &, const <error-type> &)"
template<class T, enum cudaTextureReadMode readMode>
^
....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp(80): error: identifier "cudaUnbindTexture" is undefined
pcl::gpu::___cudaSafeCall(cudaUnbindTexture(texref), "....../pcl/gpu/utils/include/pcl/gpu/utils/texture_binder.hpp", 80, __func__);
To Reproduce
Just trying to compile PCL from source.
Screenshots/Code snippets/Build information
N/A
Your Environment (please complete the following information):
- OS: Ubuntu 22.04
- Compiler:
➜ ~ gcc --version
gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- PCL Version: 1.14
- PCL Type: Compiled from source
If PCL was compiled from source or failure in compiling PCL itself:
- GPU, Kinfu, CUDA enabled? Yes for GPU and CUDA, but No for Kinfu.
- List and Version of dependencies used
- Compilation flags are used
Possible Solution
Turn OFF some of the BUILD options, as follows.
Additional context
I had PCL successfully built with the following configuration:
BUILD_2d ON
BUILD_CUDA ON
BUILD_GPU ON
BUILD_apps OFF
BUILD_apps_3d_rec_framework ON
BUILD_apps_cloud_composer ON
BUILD_apps_in_hand_scanner ON
BUILD_apps_modeler ON
BUILD_apps_point_cloud_editor ON
BUILD_benchmarks ON
BUILD_common ON
BUILD_cuda_apps OFF
BUILD_cuda_common ON
BUILD_cuda_features ON
BUILD_cuda_io ON
BUILD_cuda_sample_consensus OFF
BUILD_cuda_segmentation ON
BUILD_examples OFF
BUILD_features ON
BUILD_filters ON
BUILD_geometry ON
BUILD_global_tests OFF
BUILD_gpu_containers ON
BUILD_gpu_features OFF
BUILD_gpu_kinfu OFF
BUILD_gpu_kinfu_large_scale OFF
BUILD_gpu_kinfu_large_scale_to OFF
BUILD_gpu_kinfu_tools OFF
BUILD_gpu_octree OFF
BUILD_gpu_people OFF
BUILD_gpu_segmentation OFF
BUILD_gpu_surface OFF
BUILD_gpu_tracking OFF
BUILD_gpu_utils OFF
BUILD_io ON
BUILD_kdtree ON
BUILD_keypoints ON
BUILD_ml ON
BUILD_octree ON
BUILD_outofcore ON
BUILD_people OFF
BUILD_recognition OFF
BUILD_registration OFF
BUILD_sample_consensus ON
BUILD_search ON
BUILD_segmentation ON
BUILD_simulation ON
BUILD_stereo ON
BUILD_surface ON
BUILD_surface_on_nurbs OFF
BUILD_tools OFF
BUILD_tracking ON
BUILD_visualization ON
However, I do need Kinfu. What to do???
Cheers
Lars Glud commented
You need to downgrade cuda to a version lower than 12. Since the cudaTexture has been removed in cuda 12.
Pei JIA commented