I am trying to run the “nvgstiva_app” example from “Deepstream SDK on Jetson” in Nsight. And I am using “cross-compiler mode” in the Host x86 PC by following the tutorial as below:
https://devblogs.nvidia.com/parallelforall/cuda-jetson-nvidia-nsight-eclipse-edition/
https://devtalk.nvidia.com/default/topic/1010551/using-nsight-eclipse-edition-with-opencv-for-cross-compilation-/
And I am successfully to run the CUDA example in Jetson TX2. But when I try to run other example “nvgstiva_app” from Deepstream SDK on Jetson in Nsight. I get the error in the final NVCC Link step:
Building target: DeepStream
Invoking: NVCC Linker
/usr/local/cuda-8.0/bin/nvcc --cudart static -L/usr/lib/aarch64-linux-gnu/tegra -L/usr/lib/aarch64-linux-gnu/gstreamer-1.0 -L/usr/lib/aarch64-linux-gnu -lGL -lGLU -lglut --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 -link -o “DeepStream” ./nvgstiva_app_main.o ./src/nvgstiva_app.o ./src/nvgstiva_color_detector_bin.o ./src/nvgstiva_common.o ./src/nvgstiva_config_file_parser.o ./src/nvgstiva_dsexample.o ./src/nvgstiva_face_detector_bin.o ./src/nvgstiva_metadata_pool.o ./src/nvgstiva_osd_bin.o ./src/nvgstiva_perf.o ./src/nvgstiva_primary_gie_bin.o ./src/nvgstiva_secondary_gie_bin.o ./src/nvgstiva_sink_bin.o ./src/nvgstiva_source_bin.o ./src/nvgstiva_split_bin.o ./src/nvgstiva_tracker_bin.o -lgstnvivameta -lnvid_mapper
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
compilation terminated.
makefile:59: recipe for target ‘DeepStream’ failed
make: *** [DeepStream] Error 1
And the same error happened when I try to run the example from visionworks, I guess the key problem is how to link remote library in Jetson TX2 in Nsight. What I do is copy the whole /usr/lib/aarch64-linux-gnu to the x86 host PC. Then I set like this:
Tool Settings->NVCC Linker->Library search path(-L)
/usr/lib/aarch64-linux-gnu/tegra
/usr/lib/aarch64-linux-gnu/gstreamer-1.0
/usr/lib/aarch64-linux-gnu
But I get the linker error: collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped
And what is painful for all example in Jetson is based on makefile on Jetson directly rather than Nsight. So I find that is very difficult to transfer them to Nsight. Can anyone give me some suggestion about that? Thank you very much!