Cross-compiler TX1 with VectorAdd Example and Nsight Eclipse

Hello all
I try to compile the example VectorAdd using TX1 and cross-compiler option and Nsight Eclipse with cuda 8.0 but I find the next errors:

3:24:41 **** Incremental Build of configuration Debug for project VectorAdd ****
make all
Building file: …/src/vectorAdd.cu
Invoking: NVCC Compiler
/usr/local/cuda-8.0/bin/nvcc -I"/usr/local/cuda-8.0/samples/0_Simple" -I/usr/local/cuda-8.0/include -I"/usr/local/cuda-8.0/samples/common/inc" -I"/home/jose/cuda-workspace/VectorAdd" -G -g -O0 -ccbin arm-linux-gnueabihf-g++ -gencode arch=compute_30,code=sm_30 -gencode arch=compute_32,code=sm_32 -m32 -odir “src” -M -o “src/vectorAdd.d” “…/src/vectorAdd.cu”
/usr/local/cuda-8.0/bin/nvcc -I"/usr/local/cuda-8.0/samples/0_Simple" -I/usr/local/cuda-8.0/include -I"/usr/local/cuda-8.0/samples/common/inc" -I"/home/jose/cuda-workspace/VectorAdd" -G -g -O0 --compile --relocatable-device-code=false -gencode arch=compute_30,code=compute_30 -gencode arch=compute_32,code=sm_32 -m32 -ccbin arm-linux-gnueabihf-g++ -x cu -o “src/vectorAdd.o” “…/src/vectorAdd.cu”
Finished building: …/src/vectorAdd.cu

Building target: VectorAdd
Invoking: NVCC Linker
/usr/local/cuda-8.0/bin/nvcc --cudart static -Xlinker --unresolved-symbols=ignore-in-shared-libs --relocatable-device-code=false -gencode arch=compute_30,code=compute_30 -gencode arch=compute_32,code=sm_32 -m32 -ccbin arm-linux-gnueabihf-g++ -link -o “VectorAdd” ./src/vectorAdd.o
/usr/local/cuda-8.0/bin/crt/link.stub:2:26: fatal error: host_defines.h: No existe el archivo o el directorio
#include “host_defines.h”
^
compilation terminated.
make: *** [VectorAdd] Error 1

Anyone can help me please?

Thanx.

Hi,

Thanks for your problem, we are trying to clarify this issue now.
Will update information later.

Hi,

Sorry for the late reply.
We have tested Nsight on JetPack2.3.1. VectorAdd can be compiled and run normally on tx1.
Could you try JetPack2.3.1 again to check if it also solve your problem?

Any feedback is highly appreciated.
Thanks.

Hello AstaLLL.
I’ve encountered the same issue using JetPack2.3.1 on 5_Simulations/particle,
despinte I added the include path /usr/local/cuda-8.0/targets/aarch64-linux/include.

Is there still any probrem on it?

Thanks.

Hi,

I have verified particle example in my environment and it works!

Share my steps:

  1. JetPack2.3.1->Common->CUDA Toolkit for Ubuntu 14.04
  2. File->New->CUDA C/C++ Project->Import CUDA sample->CUDA Toolkit 8.0->particle->CPU Architecture AArch64->start the Project Creation wizard.
  3. Right click on the project and navigate to Properties->Build->Settings->Tool Settings->NVCC Linker->Miscellaneous add Xlinker --unresolved-symbols=ignore-in-shared-libs
  4. Click on the build “hammer” icon

Please try it again and let us know if you still with problem.

Hello, AastaLLL.

Thank you for your reply.

I happen to notice the reason why I failed.

I’ve mistaken to chose the remote target cpu arch “ARM”.

After I chose “AArch64”, the sample app start working.

Thank you for your advice.