Nvcc not found jetpack 6

After flashing and installing Jetpack 6.0 on AGX Orin, nvcc command not found. (The installation completed successfully with all CUDA components getting checkmark in the sdk managaer.)

cat /etc/nv_tegra_release

R36 (release), REVISION: 3.0, GCID: 36191598, BOARD: generic, EABI: aarch64, DATE: Mon May 6 17:34:21 UTC 2024

KERNEL_VARIANT: oot

TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

I added /usr/local/cuda-12.2/bin/ to my path variable in ~/.bashrc

That’s how my Orin finds cuda/bin

1 Like

Hi,
Please check if you install SDK Components through SDKManager. The CUDA packages are included in SDK Components.

On 6.0GA(r36.3) the linkages are:

$ ll /usr/local/cuda
lrwxrwxrwx 1 root root 22 May 15 08:23 /usr/local/cuda -> /etc/alternatives/cuda/

$ ll /etc/alternatives/cuda
lrwxrwxrwx 1 root root 20 May 15 08:23 /etc/alternatives/cuda -> /usr/local/cuda-12.2/

yes, this is exactly like you showed
ll /usr/local/cuda
lrwxrwxrwx 1 root root 22 Jun 14 08:45 /usr/local/cuda → /etc/alternatives/cuda/
ls /etc/alternatives/cuda
bin compute-sanitizer doc DOCS EULA.txt extras gds include lib64 nvml nvvm README share targets tools version.json

Also $PATH include /usr/local/cuda-12.2/bin
and $LD_LIBRARY_PATH=/usr/local/cuda12.2/compat:/usr/local/cuda-12.2/lib64:

This makes no sense. :)

I did install through sdk manager on host(ubuntu 22.04) and everything completed successfully

Actually reviewing again your second ll, in my case it point like this:
/etc/alternatives/cuda → /usr/local/cuda-12.3/ so this won’t match PATH

but this is strange since I installed cuda-12.3 on a different conda environment.

so ofcourse, after updating PATH and LD_PIBRARY to 12.3 nvcc --version works.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Sep__8_19:17:54_PDT_2023
Cuda compilation tools, release 12.3, V12.3.52
Build cuda_12.3.r12.3/compiler.33281558_0

Your ll printout made me realize the error! Problem is fixed and you can close this! Thank you

After re-flashing the Orin AGX with Jetpack 6 again, I still can’t get nvcc --version for cuda-12.2. (My previous message from 6/16 was incorrect. At that time I got it to work for cuda-12.3 not for the default cuda-12.2
point-in-case, one would expect that as soon as you install successfully Jetpack 6, go into a terminal and type nvcc --version it would work.
The problem is I am unclear what is the severity of the nvcc command missing

cat /etc/nv_tegra_release

R36 (release), REVISION: 3.0, GCID: 36191598, BOARD: generic, EABI: aarch64, DATE: Mon May 6 17:34:21 UTC 2024

KERNEL_VARIANT: oot

TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

ll /usr/local/cuda
lrwxrwxrwx 1 root root 22 Jun 16 21:38 /usr/local/cuda → /etc/alternatives/cuda/
ll /etc/alternatives/cuda
lrwxrwxrwx 1 root root 20 Jun 19 17:36 /etc/alternatives/cuda → /usr/local/cuda-12.2/

ls -l /usr/local/cuda-12.2
total 12
drwxr-xr-x 2 root root 4096 Jun 16 21:36 compat
drwxr-xr-x 2 root root 4096 Jun 16 21:37 gds
lrwxrwxrwx 1 root root 29 Aug 15 2023 include → targets/aarch64-linux/include
lrwxrwxrwx 1 root root 25 Aug 15 2023 lib64 → targets/aarch64-linux/lib
drwxr-xr-x 3 root root 4096 Jun 16 21:36 targets

nvidia-smi
Wed Jun 19 17:59:39 2024
±--------------------------------------------------------------------------------------+
| NVIDIA-SMI 540.3.0 Driver Version: N/A CUDA Version: 12.2 |
|-----------------------------------------±---------------------±---------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Orin (nvgpu) N/A | N/A N/A | N/A |
| N/A N/A N/A N/A / N/A | Not Supported | N/A N/A |
| | | N/A |
±----------------------------------------±---------------------±---------------------+

±--------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
±--------------------------------------------------------------------------------------+

in .bashrc:
export PATH=/media/haggai/main/miniconda3/bin:/usr/local/cuda-12.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:/usr/local/cuda/compat:/usr/local/cuda-12.2/lib64:$LD_LIBRARY_PATH
export CUDNN_INCLUDE_DIR=/usr/local/include
export CUDA_HOME=/usr/local/cuda-12.2

Note that I did install in addition cuda-12.5 and nvcc --version would work if I point the environment variables to 12.5.

and I am finding nvcc in /usr/local/cuda-12.5/bin/nvcc but not in /usr/local/cuda-12.2/bin/nvcc
in fact, there is no /usr/local/cuda-12.2/bin at all? weird. this was suppose to be there by default after flashing.

and if I go to eveloper.nvidia.com/cuda-12-2-0-download-archive?target_os=Linux&target_arch=aarch64-jetson&Compilation=Native&Distribution=Ubuntu OR

there is no option for Ubuntu 22.04 which is the default for Jetpack 6.0. So how can I fix this?

Hi,
Do you use SDKManager? You can install system image and SDK Components through SDKManager. CUDA packages are in SDK Components.

Yes, i used the SDK manager to flash with JetPack 6 and in default all options were checked as I recall

Hi,
The steps are like:

  1. Let AGX Orin developer kit enter recovery mode and connect to host PC through type C to A adapter
  2. Flash system image through SDKManager
  3. AGX Orin developer kit boots up and you have to set up a user/password on developer kit
  4. Configure the user/password in SDKManager to install SDK Components

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.