pcl icon indicating copy to clipboard operation
pcl copied to clipboard

compilation error with cuda 9

Open aabobakr opened this issue 8 years ago • 12 comments

Hi, I am getting the below compilation error when trying to compile the GPU modules on a Jetson-TX2 board, with cuda 9 installed.

nvcc fatal   : Unsupported gpu architecture 'compute_20'
CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:207 (message):
  Error generating
  /home/nvidia/pcl-pcl-1.8.1/build/gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/./pcl_gpu_utils_generated_repacks.cu.o

Environment: Jetson TX-2

  • Operating System and version: Ubuntu 16.04
  • Compiler: nvcc
  • PCL Version: 1.8.1

any help is appreciated.

aabobakr avatar Oct 11 '18 04:10 aabobakr

There's two to three steps that you'll need to perform to make this work.

Start by cloning and trying to compile the current master. I assume this will fail on the same step, but then we'll get on from there.

SergioRAgostinho avatar Oct 11 '18 07:10 SergioRAgostinho

In CUDA 9.0, the option "sm_20" is removed. Looks like #2560 is the very solution to the problem. But it is not perfect since it has a wrong statement in line 48. See also #2566 (not yet accepted).

kazuki0824 avatar Oct 18 '18 08:10 kazuki0824

Right, #2047 should have fixed this issue @aabobakr, so please use master or wait until 1.9.0 is released.

taketwo avatar Oct 18 '18 08:10 taketwo

Thanks I have compiled the master branch and it worked.

aabobakr avatar Oct 18 '18 13:10 aabobakr

Hi, At the make stage, I seem to have a related compilation error with the same build. This has been a major bottleneck in my project, hence any help is greatly appreciated!

  • Operating System and version: Ubuntu 16.04
  • CUDA: 9.0
  • PCL Version: 1.9.1
[ 44%] Building NVCC (Device) object gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o
/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: identifier "copy_fields_t" is undefined

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: expected a ";"

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(96): error: namespace "pcl::device" has no member "copy_fields_t"

3 errors detected in the compilation of "/tmp/tmpxft_0000124e_00000000-13_repacks.compute_70.cpp1.ii".
CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:268 (message):
  Error generating file
  /home/funaizhang/Downloads/pcl/release/gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/./pcl_gpu_utils_generated_repacks.cu.o


gpu/utils/CMakeFiles/pcl_gpu_utils.dir/build.make:241: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o' failed
make[2]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o] Error 1
CMakeFiles/Makefile2:1283: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all' failed
make[1]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Funaizhang avatar Jul 31 '19 12:07 Funaizhang

Hi, Funaizhang: Are you solving the above bottlenecks? I seem to have a related compilation error with the same build(pcl 1.9.1+cuda 10.1).If you have some solutions, have a discuss with me?

Trustxu avatar Aug 17 '19 06:08 Trustxu

Hi, At the make stage, I seem to have a related compilation error with the same build. This has been a major bottleneck in my project, hence any help is greatly appreciated!

  • Operating System and version: Ubuntu 16.04
  • CUDA: 9.0
  • PCL Version: 1.9.1
[ 44%] Building NVCC (Device) object gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o
/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: identifier "copy_fields_t" is undefined

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: expected a ";"

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(96): error: namespace "pcl::device" has no member "copy_fields_t"

3 errors detected in the compilation of "/tmp/tmpxft_0000124e_00000000-13_repacks.compute_70.cpp1.ii".
CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:268 (message):
  Error generating file
  /home/funaizhang/Downloads/pcl/release/gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/./pcl_gpu_utils_generated_repacks.cu.o


gpu/utils/CMakeFiles/pcl_gpu_utils.dir/build.make:241: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o' failed
make[2]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o] Error 1
CMakeFiles/Makefile2:1283: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all' failed
make[1]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Hi, Funaizhang: Are you solving the above bottlenecks? I seem to have a related compilation error with the same build(pcl 1.9.1+cuda 10.1).If you have some solutions, have a discuss with me?

Trustxu avatar Aug 19 '19 03:08 Trustxu

Hi, At the make stage, I seem to have a related compilation error with the same build. This has been a major bottleneck in my project, hence any help is greatly appreciated!

* Operating System and version: Ubuntu 16.04

* CUDA: 9.0

* PCL Version: 1.9.1
[ 44%] Building NVCC (Device) object gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o
/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: identifier "copy_fields_t" is undefined

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: expected a ";"

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(96): error: namespace "pcl::device" has no member "copy_fields_t"

3 errors detected in the compilation of "/tmp/tmpxft_0000124e_00000000-13_repacks.compute_70.cpp1.ii".
CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:268 (message):
  Error generating file
  /home/funaizhang/Downloads/pcl/release/gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/./pcl_gpu_utils_generated_repacks.cu.o


gpu/utils/CMakeFiles/pcl_gpu_utils.dir/build.make:241: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o' failed
make[2]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o] Error 1
CMakeFiles/Makefile2:1283: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all' failed
make[1]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Also got the same error. Ubuntu 16.04.1 Cuda compilation tools, release 9.0, V9.0.176

NovoG93 avatar Aug 23 '19 06:08 NovoG93

Hi, At the make stage, I seem to have a related compilation error with the same build. This has been a major bottleneck in my project, hence any help is greatly appreciated!

* Operating System and version: Ubuntu 16.04

* CUDA: 9.0

* PCL Version: 1.9.1
[ 44%] Building NVCC (Device) object gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o
/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: identifier "copy_fields_t" is undefined

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(84): error: expected a ";"

/home/funaizhang/Downloads/pcl/gpu/utils/src/repacks.cu(96): error: namespace "pcl::device" has no member "copy_fields_t"

3 errors detected in the compilation of "/tmp/tmpxft_0000124e_00000000-13_repacks.compute_70.cpp1.ii".
CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:268 (message):
  Error generating file
  /home/funaizhang/Downloads/pcl/release/gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/./pcl_gpu_utils_generated_repacks.cu.o


gpu/utils/CMakeFiles/pcl_gpu_utils.dir/build.make:241: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o' failed
make[2]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/src/pcl_gpu_utils_generated_repacks.cu.o] Error 1
CMakeFiles/Makefile2:1283: recipe for target 'gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all' failed
make[1]: *** [gpu/utils/CMakeFiles/pcl_gpu_utils.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Also got the same error. Ubuntu 16.04.1 Cuda compilation tools, release 9.0, V9.0.176

This is probably the reason for the build environment, gcc++ and nvcc do not open c++11 by default, you can add "add_definitions(-std=c++11) set(CUDA_NVCC_FLAGS "-std=c++11")" in CMakeLists.txt.(/home/.../pcl-1.9.1/CMakeLists.txt) I have tried this way and solved those bottlenecks successfully.

Trustxu avatar Aug 24 '19 06:08 Trustxu

Joining is still wrong

ghost avatar Oct 01 '19 10:10 ghost

Any further progress on this issue?

ZachJiang avatar Nov 23 '19 00:11 ZachJiang

Is there someone solve the problem, I get the same problem, I need help, please help me

tiexuedanxin avatar Oct 11 '20 11:10 tiexuedanxin