CUDA Samples Makefile problem

Hi folks,
I’m a newbie and when I had installed CUDA 10.0. However when I was trying to makefile the samples I got these errors:

nvidia@jetson-0423418004255:/usr/local/cuda-10.0/samples$ make
make[1]: Entering directory '/usr/local/cuda-10.0/samples/0_Simple/simpleCooperativeGroups'
"/usr/local/cuda-10.0"/bin/nvcc -ccbin g++ -I../../common/inc  -m64    -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -o simpleCooperativeGroups.o -c simpleCooperativeGroups.cu
/bin/sh: 1: /usr/local/cuda-10.0/bin/nvcc: Exec format error
Makefile:288: recipe for target 'simpleCooperativeGroups.o' failed
make[1]: *** [simpleCooperativeGroups.o] Error 2
make[1]: Leaving directory '/usr/local/cuda-10.0/samples/0_Simple/simpleCooperativeGroups'
Makefile:51: recipe for target '0_Simple/simpleCooperativeGroups/Makefile.ph_build' failed
make: *** [0_Simple/simpleCooperativeGroups/Makefile.ph_build] Error 2

I have also tried sudo make and sudo make -k, but none of them works.

Thanks!

If you’re on a jetson you can’t install the regular CUDA toolkit. The exec format error means that the executable (nvcc) is not in the right format to be run on the machine you are on. If you installed the regular cuda toolkit on Jetson, you installed an x86 executable on a ARM CPU machine. That won’t work.

You may want to spend some time learning how to set up and configure Jetson. You install the CUDA toolkit there via a JetPack. You can ask jetson-oriented questions on one of the Jetson forums.

I have the same problem.the ubuntu version is 16.04 .cuda is 10.1.

you can use gcc4.7, not the default gcc5.4.

Hi folks,

I realized that I need to use another pc to setup the CUDA tookit to it via Jetpack. Thank you so much!