Error When Building CUDA 9.0 Samples

I downloaded and installed the Jetpack 3.3 SDK onto my x64 Ubuntu Linux box.

I wanted to build the samples for aarch64 so that I could run them on my Jetson TX2.

I set LD_LIBRARY_PATH approrpriately:

export LD_LIBRARY_PATH=/usr/local/cuda-9.0/targets/aarch64-linux/lib

I then navigated to the samples folder and entered the following command to build the samples:

SMS=53 EXTRA_LDFLAGS=–unresolved-symbols=ignore-in-shared-libs TARGET_ARCH=aarch64 make

But the build failed:

aarch64-linux-gnu-g++ -o simpleTemplates_nvrtc simpleTemplates.o -lcuda -lnvrtc
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lcuda
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lnvrtc
collect2: error: ld returned 1 exit status
Makefile:323: recipe for target ‘simpleTemplates_nvrtc’ failed
make[1]: *** [simpleTemplates_nvrtc] Error 1
make[1]: Leaving directory ‘/usr/local/cuda-9.0/samples/0_Simple/simpleTemplates_nvrtc’
Makefile:52: recipe for target ‘0_Simple/simpleTemplates_nvrtc/Makefile.ph_build’ failed
make: *** [0_Simple/simpleTemplates_nvrtc/Makefile.ph_build] Error 2

Can someone help me figure out why?

I discovered that the aarch64 versions of libcuda.so and libnvrtc.so are missing.

How can I get these back?

Was there some installation problem that caused these to not be present?

JetPack is usually used for such an install, but I haven’t though much about the host side of this. I will guess installing samples to Jetson installs these to host (the host PC builds samples…and assuming these are needed for samples, then the correct files would be installed).