Error of nvcc while compiling code with Gstreamer

Hello. I am trying to compile a program on Jetson AGX Xavier. For nvcc I have cuda_12.3.r12.3/compiler.33281558_0

OS is Ubuntu 22.04

While compiling a code I have an error:

In file included from /usr/lib/aarch64-linux-gnu/glib-2.0/include/glibconfig.h:9,
from /usr/include/glib-2.0/glib/gtypes.h:32,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/gstreamer-1.0/gst/gst.h:27,
from main_read_images.cu:23:
/usr/include/glib-2.0/glib/gmacros.h:249:28: error: missing ‘)’ after “__has_attribute”
249 | #if g_macro__has_attribute(noinline) // here there are 2 underscores before and after “noinline” but they are disappeared on the forum
|
In file included from /usr/local/cuda/bin/…/targets/sbsa-linux/include/device_types.h:59,
from /usr/local/cuda/bin/…/targets/sbsa-linux/include/builtin_types.h:56,
from /usr/local/cuda/bin/…/targets/sbsa-linux/include/cuda_runtime.h:90,
from :
/usr/local/cuda/bin/…/targets/sbsa-linux/include/crt/host_defines.h:91:23: error: missing binary operator before token “(”
91 | attribute((noinline))

It happens in the lines:
#if g_macro__has_attribute(noinline) // here there are 2 underscores before and after “noinline” but they are disappeared on the forum
define G_GNUC_NO_INLINE attribute ((noinline)) // here there are 2 underscores before and after “noinline” but they are disappeared on the forum
else
define G_GNUC_NO_INLINE
endif

Then I tried to switch to cuda 11.4 still being on Ubuntu 22.04, but while installing tensorrt I had an error:
The following packages have unmet dependencies:
python3-libnvinfer : Depends: python3 (< 3.9) but 3.10.6-1~22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

I installed Python3.8 and removed Python3.10 with the commands:
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get install -y python3.8
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 100
RUN echo python3 --version
RUN rm -rf /var/lib/apt/lists/*
&& apt-get clean
RUN apt-get update && apt-get purge --auto-remove -y python3.10

but the error is still there.

On the Ubuntu 20.04 based container it was ok, but I need to use Ubuntu 22.04 due to some reasons.

What would you advice in this situation?

Hi,

from /usr/local/cuda/bin/…/targets/sbsa-linux/include/cuda_runtime.h:90,

It looks like you are using sbsa package.
For Jetson, please make sure your package is aarch64-jetson.

We don’t have a package for CUDA 12.3 currently.
But you can find the package for CUDA 12.2 below:

Thanks.

This installation is for Ubuntu 20 containers only. Is there something for Ubuntu 22?

And also I have a question: which version of TensorRT should I use with CUDA 12.2 on Jetson AGX Xavier?

Hi,

Do you want to run the Ubuntu container on the Jetson?
Or the installing question is for a desktop environment?
You will need to use a l4t based container to run with CUDA.

We don’t have a TensorRT package with CUDA 12 for Jetson right now.
The latest comes with JetPack 5.1.2 and the version is 8.5 with CUDA 11.4.

Thanks.

I want to run Ubuntu-based container on Jetson. But it must be Ubuntu 22 based container. I install nvidia-l4t-core there. And now I wonder which versions of Cuda and TensorRT should I install there.

Hi,

Our container uses l4t OS and the latest version is based on Ubuntu 20.04.
But based on the announcement below, you can wait for the JetPack 6 which will use Ubuntu 22.04:

Thanks

Thank you for information!

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