using Nsight running CUDA-8.0 0_simple Samples Cuda_print show error compile cross TX2

  1. i use Nsight create one new Cuda C,C++ project from Cuda-8.0 01_simple sample Cuda print compile it cross TX2, the Nsight show error “recipe for the target “test01” failed”, Error 255, @echo

  2. when i use Nsight create one new project by sample 05_simulation OceanFFT cross TX2, it works well

where is wrong?


The error may result from the incorrect configuration.
Could you compare the compiler setting between ‘test01’ and oceanFFT sample?

If the error goes on, could you share the error message shown in console for our reference?

yes, i have compare the setting between “test1_cuda_print” and oceanFFT sample. but i did not find difference. really compile result is one fail and one success.

please check the fail console logout…

Building target: test1_cuda_print
Invoking: NVCC Linker
/usr/local/cuda-8.0/bin/nvcc --cudart static --relocatable-device-code=true -gencode arch=compute_35,code=compute_35 -gencode arch=compute_35,code=sm_35 -m64 -ccbin aarch64-linux-gnu-g++ -link -o “test1_cuda_print” ./src/cdpSimplePrint.o -lcudadevrt
nvlink error : Undefined reference to ‘cudaGetParameterBufferV2’ in ‘./src/cdpSimplePrint.o’
nvlink error : Undefined reference to ‘cudaLaunchDeviceV2’ in ‘./src/cdpSimplePrint.o’
makefile:59: recipe for target ‘test1_cuda_print’ failed
make: Leaving directory ‘/home/nvidia/Cuda_test/test1_cuda_print/Debug’
make: *** [test1_cuda_print] Error 255

Shell Completed (exit code = 2)


GPU architecture is missing.
Tx2 is sm_62. Please add this information to the nvcc configuration.

Check this page for more information:


where and how? the link is big page…where is details… i choose aarch64 in configuration.

aarch64 is CPU architecture. In a similar way GPU has its own architecture. It will be different between Kepler, Maxwell, Pascal, and Volta (and perhaps other differences between desktop/Jetson).


Please check this comment for instruction:



hi Aastalll:

i have setting tx2 to sm_62. but the problem is till exist…

  1. NVCC Compiler:
    Properties -> Settings -> Tool Settings -> NVCC Compiler -> Expert Setting:
    {COMMAND} {FLAGS} -gencode arch=compute_62,code=sm_62 {OUTPUT_FLAG} {OUTPUT_PREFIX} {OUTPUT} {INPUTS}

  2. NVCC Linker:
    Properties -> Settings -> Tool Settings -> NVCC Linker -> Expert Setting:
    {COMMAND} {FLAGS} -gencode arch=compute_62,code=sm_62 {OUTPUT_FLAG} {OUTPUT_PREFIX} {OUTPUT} {INPUTS}

the console logout shows: nvcc fatal: option- generate code arch=compute_62 ,missing code…
makefile: 59: recipe for target ‘test1_cuda_print’ failed.


Could you share the source you want to compile?
We need more information to give a further suggestion.


Hi Aastalll,

i have upload my project source code to cloud . please check the below link for download…

link address,链接: (password)密码: y5ey


Do you create ‘CUDA C/C++ Project’?

Hi Astall,

yes, i create Cuda C/C++ Project (new Cuda C/C++ project),… actually also choose “import Cuda Samples”


Could you follow these steps and try it again?

1. New CUDA C/C++ Project

Project type: Empty Project
Toolchains: CUDA Toolkit 8.0

2. Basic settings

Device linker mode: Whole program compilation
Generate PTX code: 6.0
Generate GPU code: 6.0

3. Target Systems

CPU Architecture: AArch64

4. Right-click project -> New File -> paste your source

5. Right-click project -> Properties -> Build -> Settings -> Tool setting

NVCC Compiler -> Expert settings:
+++ ‘-gencode arch=compute_62,code=sm_62’

NVCC Compiler -> Includes -> Include paths
+++ ‘/usr/local/cuda-8.0/include’
+++ ‘/usr/local/cuda-8.0/samples/common/inc’

NVCC Linker -> Expert settings:
+++ ‘-gencode arch=compute_62,code=sm_62’

NVCC Linker -> Libraries -> Library search path
+++ ‘/usr/local/cuda-8.0/include’
+++ ‘/usr/local/cuda-8.0/samples/common/inc’


Hi AstaLLL,

I try again and each step is flowing your instruction… compile still fail… the below is the logout…

14:06:30 **** Build of configuration Debug for project test2 ****
make all -C /home/nvidia/Cuda_test/test2/Debug
make: Entering directory ‘/home/nvidia/Cuda_test/test2/Debug’
Building file: …/
Invoking: NVCC Compiler
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/cuda-8.0/samples/common/inc -I/usr/local/cuda-8.0/include -G -g -O0 -ccbin aarch64-linux-gnu-g++ -gencode arch=compute_60,code=sm_60 -m64 -odir “.” -M -o “test2.d” “…/”
/usr/local/cuda-8.0/bin/nvcc -I/usr/local/cuda-8.0/samples/common/inc -I/usr/local/cuda-8.0/include -G -g -O0 --compile --relocatable-device-code=false -gencode arch=compute_60,code=compute_60 -gencode arch=compute_60,code=sm_60 -m64 -ccbin aarch64-linux-gnu-g++ -gencode arch=compute_62,code=sm_62 -x cu -o “test2.o” “…/”
…/ error: kernel launch from device or global functions requires separate compilation mode

1 error detected in the compilation of “/tmp/tmpxft_00001934_00000000-9_test2.compute_62.cpp1.ii”. recipe for target ‘test2.o’ failed
make: *** [test2.o] Error 2
make: Leaving directory ‘/home/nvidia/Cuda_test/test2/Debug’

Shell Completed (exit code = 2)

14:06:32 Build Finished (took 2s.182ms)


Please check your source in detail.
This error is for undefined function rather than Nsight.