Nsight Cross Compiler Errors

Hi

I have been following this tutorial to cross compile with the TX2

https://devblogs.nvidia.com/parallelforall/cuda-jetson-nvidia-nsight-eclipse-edition/

However when i add the -Xlinker option —unresolved-symbols=ignore-in-shared-libs i get the following error: /usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find unresolved-symbols=ignore-in-shared-libs: No such file or directory
makefile:59: recipe for target ‘test_sample’ failed

when i remove the xlinker option i get the following error:

make all
Building target: test_sample
Invoking: NVCC Linker
/usr/local/cuda-8.0/bin/nvcc --cudart static -L/usr/local/cuda-8.0/samples/common/lib/linux/aarch64 -L/usr/aarch64-linux-gnu/lib -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++ -link -o “test_sample” ./src/fluidsGL.o ./src/fluidsGL_kernels.o -lcufft
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libnvidia-tls.so.28.1.0, needed by /usr/aarch64-linux-gnu/lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libnvidia-glcore.so.28.1.0, needed by /usr/aarch64-linux-gnu/lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libXext.so.6, needed by /usr/aarch64-linux-gnu/lib/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libXi.so.6, needed by /usr/aarch64-linux-gnu/lib/libglut.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libXxf86vm.so.1, needed by /usr/aarch64-linux-gnu/lib/libglut.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: warning: libxcb.so.1, needed by //usr/aarch64-linux-gnu/lib/libX11.so.6, not found (try using -rpath or -rpath-link)
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XextCreateExtension' /usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeGetViewPort’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv017glcore' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_get_maximum_request_length’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XMissingExtension' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_wait_for_reply’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_wait_for_event' /usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeGetAllModeLines’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_get_setup' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv016glcore’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XextDestroyExtension' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_poll_for_event’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_connection_has_error' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv000glcore’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv017tls' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv013tls’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv007tls' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv009tls’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_take_socket' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_disconnect’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv014glcore' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv015glcore’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_generate_id' /usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeQueryExtension’
/usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeSwitchToMode' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv001glcore’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv024glcore' /usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XISelectEvents’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XextAddDisplay' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv008tls’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv006tls' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv021tls’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv023glcore' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XextRemoveDisplay’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_parse_display' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv011tls’
/usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeSetViewPort' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv020glcore’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to XextFindDisplay' /usr/aarch64-linux-gnu/lib/libglut.so: undefined reference to XF86VidModeGetModeLine’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_connect' /usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv022glcore’
/usr/aarch64-linux-gnu/lib/libGL.so: undefined reference to _nv027glcore' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_poll_for_reply’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_writev' //usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to xcb_connect_to_display_with_auth_info’
//usr/aarch64-linux-gnu/lib/libX11.so.6: undefined reference to `xcb_get_file_descriptor’
makefile:59: recipe for target ‘test_sample’ failed
collect2: error: ld returned 1 exit status
make: *** [test_sample] Error 1

Please let me know how i can fix this. Thanks

Hi,

Do you select the correct CPU architecture?

Choose “AArch64” for Jetson TX1/TX2 and “ARM” architecture for TK1 in the CPU architecture drop-down box.

Hi lgritters,

Have you found the cause and resolved the problem?
Any result can be shared?

Thanks

Hi,

Sorry for replying back so late. I realised it was because i was not linking the include libraries properly and didn’t have the permissions on my libraries set to be read by all groups.

Thank you for getting back to me

-Liam