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

compilation error with cuda 9 #2541

Closed
aabobakr opened this issue Oct 11, 2018 · 12 comments
Closed

compilation error with cuda 9 #2541

aabobakr opened this issue Oct 11, 2018 · 12 comments

Comments

@aabobakr
Copy link

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.

@SergioRAgostinho
Copy link
Member

SergioRAgostinho commented Oct 11, 2018

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 SergioRAgostinho added module: gpu needs: author reply Specify why not closed/merged yet labels Oct 11, 2018
@kazuki0824
Copy link
Contributor

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).

@taketwo
Copy link
Member

taketwo commented Oct 18, 2018

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

@taketwo taketwo closed this as completed Oct 18, 2018
@taketwo taketwo removed the needs: author reply Specify why not closed/merged yet label Oct 18, 2018
@aabobakr
Copy link
Author

Thanks I have compiled the master branch and it worked.

@Funaizhang
Copy link

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

@Trustxu
Copy link

Trustxu commented Aug 17, 2019

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
Copy link

Trustxu commented Aug 19, 2019

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?

@NovoG93
Copy link

NovoG93 commented Aug 23, 2019

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

@Trustxu
Copy link

Trustxu commented Aug 24, 2019

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.

@ghost
Copy link

ghost commented Oct 1, 2019

Joining is still wrong

@ZachJiang
Copy link

Any further progress on this issue?

@tiexuedanxin
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants