Nsight Eclipse can't find CUDA toolkit

I installed Nsight Eclipse edition using SDK Manager on Jetpack 4.5, which reported successful installation of all components.
I use a Parallels virtual machine running Unbuntu 18.04.5 LTS.
Night is unable to locate CUDA on either the target nor the host.
The target CUDA toolkit path can be set using the CUDA project wizard, HOWEVER, The Nsight tab in “Window → Preferences” has no fields to be filled in and it complains that “No CUDA compatible device is found on this system”. The (host) local CUDA toolkit path text box is empty.
When I try appending the PATH variable with "export PATH=/usr/local/cuda-10.2/bin{PATH:-:${PATH}}" and verify (/usr/local/cuda-10.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin)
on startup the Eclipse splash screen appears, then the work directory dialog appears and then it crashes, complaining that:
“OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
CompileCommand: exclude java/lang/reflect/Array.newInstance
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.osgi.storage.FrameworkExtensionInstaller (file:/usr/local/cuda-10.2/libnsight/plugins/org.eclipse.osgi_3.10.1.v20140909-1633.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.eclipse.osgi.storage.FrameworkExtensionInstaller
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release”

Adding the LD_LIBRARY_PATH has no effect on any of this.
I looked at a dozen different installation pages for Nsight Eclipse Edition and none seem to address my problem.

Thanks in advance for your help,

I found the answer:
Set the PATH and $LD_LIBRARY_PATH and PATH as given: export PATH=/usr/local/cuda-10.2/bin{PATH:-:{PATH}} export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

Then invoke Nsight from a terminal, thus:
nsight -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

Nsight then knows where CUDA is on both host and target.

I have a similar issue, but it goes a bit deeper…

Under Window/Preferences, no CUDA and it reports “No CUDA-compatible devices were found on your system”.
I took the latter to be perfectly normal since my host is a PC with no GPU; I’m trying to cross compile for a Jetson Nano. But I am surprised and frustrated to see no CUDA under Preferences.
When I load a project from the CUDA samples, under Project Properties it has CUDA 10.2 listed.
It then builds, and the app can then run on my Jetson Nano.

But it looks as though it’s building on the Nano, using lib files on the Nano, rather than building locally. That is causing real problems, as my code editor shows me the local files… which are not necessarily the same as the ones on the target - e.g. when I include anything from OpenCV, it fails because they differ.

NSight Eclipse also shows a load of Include folders such as usr/include/x86_64… which looks wrong, as I’m trying to compile for aarch64, NOT x86_64…

Can anyone help…?

I understand your frustration. I don’t like Eclipse or VSCode. I’m currently trying to get emacs to run in Tegra. There are a number of links on setting up to cross-code from Windows, not to be confused with instructions for setting a up a native system with a GPU card. Have you checked the JetsonHacks.com site for help?

Thanks Rusty, I managed to make some progress. I had imagined that when you install NSight Eclipse, it’s ready to go… that the plugin was part of the install. But it seems not. Even though I’ve filled in all the info to the SDK Manager and it installed NSight, it leaves a few things to be done manually - installing the NSight plugin with the appropriate architecture. Once I’d done that, the CUDA item appeared in the Windows Preferences menu and it looks healthier.

However, now it fails in a new and interesting way when I try to build. This time it’s to do with Include settings - I posted a question with the details here:

If you have any insight into this, it’s baffling me. I’m getting pretty close to abandoning NSight Eclipse, at least for building, and using CMake on the command line, at least you can see what it’s doing and why…