Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build; error: no instance of function template "pcl::cuda::ColorCloudFromImage::operator()" matches the argument list #2160

Closed
blackPython opened this issue Dec 16, 2017 · 20 comments

Comments

@blackPython
Copy link

⚠️ This is a issue tracker, please use our mailing list for questions: www.pcl-users.org. ⚠️

Your Environment

  • Operating System and version: Ubuntu 16.04
  • Compiler: cc 5.4.0
  • PCL Version: 1.8.1-dev
  • Cuda Version: Cuda 9.0

I am trying to build pcl on my local system so that I can use kinfu in my application. I have configure the build such that only the components essential for kinfu are build. But when i was building an error occurs which thrown by cuda.
`/usr/local/cuda-9.0/include/thrust/system/cuda/detail/transform.h(118): error: no instance of function template "pcl::cuda::ColorCloudFromImage::operator()" matches the argument list
argument types are: (thrust::detail::tuple_of_iterator_references<pcl::cuda::PointXYZRGB &, signed int, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>)
object type is: pcl::cuda::ColorCloudFromImage
detected during:
instantiation of "void thrust::cuda_cub::__transform::unary_transform_f<InputIt, OutputIt, thrust::cuda_cub::__transform::no_stencil_tag, TransformOp, Predicate>::operator()(Size) [with InputIt=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, OutputIt=thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, TransformOp=pcl::cuda::ColorCloudFromImage, Predicate=thrust::cuda_cub::__transform::always_true_predicate, Size=long]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/parallel_for.h(98): here
instantiation of "void thrust::cuda_cub::__parallel_for::ParallelForAgent<F, Size>::consume_tile<IS_FULL_TILE>(F, Size, int) [with F=thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, Size=signed long, IS_FULL_TILE=true]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/parallel_for.h(114): here
instantiation of "void thrust::cuda_cub::__parallel_for::ParallelForAgent<F, Size>::entry(F, Size, char *) [with F=thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, Size=signed long]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/agent_launcher.h(73): here
instantiation of "void thrust::cuda_cub::core::_kernel_agent<Agent,_0,_1>(_0, _1) [with Agent=thrust::cuda_cub::__parallel_for::ParallelForAgent<thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, signed long>, _0=thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, _1=signed long]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/agent_launcher.h(926): here
instantiation of "void thrust::cuda_cub::core::AgentLauncher::launch_impl(thrust::detail::true_type, _0, _1) const [with Agent=thrust::cuda_cub::__parallel_for::ParallelForAgent<thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, signed long>, _0=thrust::cuda_cub::__transform::unary_transform_f<thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::cuda_cub::__transform::no_stencil_tag, pcl::cuda::ColorCloudFromImage, thrust::cuda_cub::__transform::always_true_predicate>, _1=signed long]"
/usr/local/cuda-9.0/include/thrust/system/cuda/detail/core/agent_launcher.h(1077): here
[ 5 instantiation contexts not shown ]
instantiation of "OutputIt thrust::cuda_cub::transform_if(thrust::cuda_cub::execution_policy &, InputIt, InputIt, OutputIt, TransformOp, Predicate) [with Derived=thrust::cuda_cub::tag, InputIt=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, OutputIt=thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, TransformOp=pcl::cuda::ColorCloudFromImage, Predicate=thrust::cuda_cub::__transform::always_true_predicate]"
(350): here
instantiation of "OutputIt thrust::cuda_cub::transform(thrust::cuda_cub::execution_policy &, InputIt, InputIt, OutputIt, TransformOp) [with Derived=thrust::cuda_cub::tag, InputIt=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, OutputIt=thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, TransformOp=pcl::cuda::ColorCloudFromImage]"
/usr/local/cuda-9.0/include/thrust/detail/transform.inl(44): here
instantiation of "OutputIterator thrust::transform(const thrust::detail::execution_policy_base &, InputIterator, InputIterator, OutputIterator, UnaryFunction) [with DerivedPolicy=thrust::cuda_cub::tag, InputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, OutputIterator=thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, UnaryFunction=pcl::cuda::ColorCloudFromImage]"
/usr/local/cuda-9.0/include/thrust/detail/transform.inl(142): here
instantiation of "OutputIterator thrust::transform(InputIterator, InputIterator, OutputIterator, UnaryFunction) [with InputIterator=thrust::zip_iterator<thrust::tuple<thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, thrust::counting_iterator<int, thrust::use_default, thrust::use_default, thrust::use_default>, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type, thrust::null_type>>, OutputIterator=thrust::detail::normal_iterator<thrust::device_ptrpcl::cuda::PointXYZRGB>, UnaryFunction=pcl::cuda::ColorCloudFromImage]"
/home/aditya/data/pcl/pcl/cuda/io/src/extract_indices.cu(175): here
instantiation of "void pcl::cuda::colorCloud(pcl::cuda::PointCloudAOS::Ptr &, Storage::type &) [with Storage=pcl::cuda::Device]"
/home/aditya/data/pcl/pcl/cuda/io/src/extract_indices.cu(215): here

1 error detected in the compilation of "/tmp/tmpxft_00005e3c_00000000-13_extract_indices.compute_70.cpp1.ii".
CMake Error at pcl_cuda_io_generated_extract_indices.cu.o.cmake:266 (message):
Error generating file
/home/aditya/data/pcl/pcl/build/cuda/io/CMakeFiles/pcl_cuda_io.dir/src/./pcl_cuda_io_generated_extract_indices.cu.o

cuda/io/CMakeFiles/pcl_cuda_io.dir/build.make:3374: recipe for target 'cuda/io/CMakeFiles/pcl_cuda_io.dir/src/pcl_cuda_io_generated_extract_indices.cu.o' failed
make[2]: *** [cuda/io/CMakeFiles/pcl_cuda_io.dir/src/pcl_cuda_io_generated_extract_indices.cu.o] Error 1
CMakeFiles/Makefile2:1261: recipe for target 'cuda/io/CMakeFiles/pcl_cuda_io.dir/all' failed
make[1]: *** [cuda/io/CMakeFiles/pcl_cuda_io.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
`
I am not able to pinpoint where the error is originating. Has anyone else faced the same problem, please let me know

@blackPython
Copy link
Author

I guess it is some problem with 1.8.1-dev version. There were no errors encountered when I built 1.8.1 version

@SergioRAgostinho SergioRAgostinho added the needs: code review Specify why not closed/merged yet label Dec 19, 2017
@SergioRAgostinho
Copy link
Member

Can you use git bisect and find the offending commit?

@SergioRAgostinho SergioRAgostinho added the needs: author reply Specify why not closed/merged yet label Dec 19, 2017
@SergioRAgostinho
Copy link
Member

SergioRAgostinho commented Dec 20, 2017

I'm able to build kinfu with

  • Operating System and version: Ubuntu 16.04.3
  • Compiler: cc 5.4.0
  • PCL Version: 1.8.1-dev
  • Cuda Version: 7.5

So this constrains the problem as support for the new cuda versions. I built both: pcl_gpu_kinfu and pcl_gpu_kinfu_large_scale .

@cwule
Copy link

cwule commented Jan 4, 2018

Failing to build only the CUDA and GPU projects. All the other projects build fine.

  • Operating System: Windows 10 Pro (Version 1709)
  • Cuda: 9.1
  • PCL: 1.8.1
  • cmake: 3.9.1
  • Visual Studio: Failed on both 2015 Community (14.0.25431.01 Update 3) and 2017 Community (15.5.2)

Error messages:

Error MSB6006 "cmd.exe" exited with code 1. pcl_cuda_features C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_cuda_segmentation C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_cuda_sample_consensus C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_kinfu C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_utils C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_octree C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171
Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_tracking C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_features C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error LNK1181 cannot open input file '....\lib\pcl_gpu_octree_release.lib' pcl_gpu_segmentation C:\Users\cwule\Documents\PCL\pcl-pcl-1.8.1\build\gpu\segmentation\LINK 1

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_surface C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

Error MSB6006 "cmd.exe" exited with code 1. pcl_gpu_kinfu_large_scale C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 171

@cwule
Copy link

cwule commented Jan 4, 2018

This seemed to be an issue with CUDA 9.1. Diagnostic build showed the error message
nvcc fatal : Unsupported gpu architecture 'compute_20'
which is apparently not supported anymore by CUDA 9.

With CUDA 8.0 I now unfortunately get the following error:

CUSTOMBUILD : nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
2> CMake Error at pcl_cuda_features_generated_normal_3d.cu.obj.Release.cmake:222 (message):
2> Error generating
2> C:/Users/cwule/Documents/PCL/pcl-pcl-1.8.1/build/cuda/features/CMakeFiles/pcl_cuda_features.dir/src/Release/pcl_cuda_features_generated_normal_3d.cu.obj
2>
2>
2> Failed to run C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/bin (The system cannot find the file specified.
2>
2> ).

@cwule
Copy link

cwule commented Jan 5, 2018

Build worked with

  • CUDA 7.5
  • Win 2010 Pro
  • Visual Studio 2013
  • PCL 1.8.1
  • cmake 3.9.1
  • The pre-built 3rd party binaries from this MSVC2013 all-in-one installer.

@blackPython
Copy link
Author

My bad, the problem seems to be on my part. While understanding the code, I my mistake uncommented a line in a header file. So the error didn't reappear when I cloned the previous version.

@taketwo
Copy link
Member

taketwo commented Jan 27, 2018

@blackPython I have the same environment and get a similar error while building pcl_cuda_features target. What's your experience with it?

@RicheyHuang
Copy link

RicheyHuang commented Feb 5, 2018

@taketwo I get the same error as yours, with CUDA 9.0 and PCL 1.8.1 in Ubuntu 16.04.
And I then install CUDA 8.0 and change the CUDA_TOOLKIT_ROOT_DIR to point to cuda-8.0, and set the CUDA_ARCH_BIN to "3.0 3.5 5.0 5.2 5.3 6.0 6.1". It works without errors.

@funmonty
Copy link

funmonty commented Jul 13, 2018

Even I'm facing the same issue. Do we have any update on this? I'm using Cuda 9.0, PCL 1.8.1. Has this got anything to do with Cuda build?

@funmonty
Copy link

funmonty commented Jul 13, 2018

@SergioRAgostinho @taketwo , Do we have a fix for this issue as of now? I'm not getting this issue when I clone the latest source from the master branch and build it. I'm able to get this while I checkout to 1.8.1 and build.

@SergioRAgostinho
Copy link
Member

@funmonty No. The last patch I did on CUDA related code #2212 allowed me to compile everything just fine all the way up to 9.1. So basically I could not reproduce this problem. If you feel like digging deep into this, I suggest reading into git bisect and trying to find the offending commit.

@blackPython
Copy link
Author

@taketwo Can u elaborate the setup so that i can try to recreate the error. Sorry for the late reply, I was concentrating on some other parts of my project which does't use kinfu extension. I am using 1.8.1 and there is no error as of now. Are you using 1.8.1-dev?

@taketwo
Copy link
Member

taketwo commented Jul 13, 2018

@blackPython

Can u elaborate the setup so that i can try to recreate the error.

It was a while ago, I don't currently have access to that system.

@funmonty

I'm not getting this issue when I clone the latest source from the master branch and build it.

Well, there is no problem anymore then?

Should we close this?

@SergioRAgostinho
Copy link
Member

Well, there is no problem anymore then?

True 😅 +1 for closing.

@funmonty
Copy link

@taketwo There is no problem in the master branch. But I suggest not to close this, because, the fix will be helpful for those who try to work with 1.8.1 tag (as the master branch keeps changing). Let us have a dig into it and keep this updated until we find the fix in the 1.8.1 tag.

What do you reckon?

@taketwo
Copy link
Member

taketwo commented Jul 13, 2018

Existing tags (e.g. 1.8.1) are immutable. Thus they can not be fixed; if there is a defect, it will stay forever. In some cases, of course, a workaround can be found to mitigate the problem without changing the library code. I assume you are talking about finding such a "fix". If this help, sure, this can remain open. Although generally, GitHub issues are used to discuss and keep track of bugs in the master branch.

@funmonty
Copy link

funmonty commented Jul 13, 2018

I agree with this. But I thought it would be more useful to close this after finding out how it got fixed.

Although generally, GitHub issues are used to discuss and keep track of bugs in the master branch.

@taketwo
Copy link
Member

taketwo commented Jul 13, 2018

Ok, please post here if you find a fix.

@SergioRAgostinho
Copy link
Member

Closing due to inactivty. Feel free to continue to the discussion if there's anything to add.

@SergioRAgostinho SergioRAgostinho removed needs: code review Specify why not closed/merged yet needs: author reply Specify why not closed/merged yet labels Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants