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?