JetPack 5 : OpenCV Version ?! Nvidia should stick to Ubuntu standards!

Why does nvidia not stick to the ubuntu package versions?

If you want bleeding edge versions of frameworks you use rolling release operating systems.

so please nvidia. publish stable releases and no sub-versioning mess.

Thanks for the comments, I have forwarded this issue to internal team for discussion, will update once anby clear status. Thansk

thanks for forwarding.

little background: everybody who wants to install ros from .deb will get in big trouble. at the moment we try to get rid of some FLANN library errors because PCL and your new OpenCV Version are colliding.

no fun i can tell.

Hi @tobias.mueller1210, you could try uninstalling OpenCV beforehand with sudo apt-get purge -y '*opencv*'

1 Like

Regarding what @tobias.mueller1210 said, we’re also running into this issue. ROS pulls in Ubuntu’s default OpenCV packages (4.2), which then exist in parallel to the versions from nvidia jetpack (4.5), in the same directory (/usr/lib/aarch64-linux-gnu/).

In our case, this produces an obscure linker error (see below) because something compiled against opencv 4.5 and then tried to link against 4.2. This happens with a default install of Jetpack 5, in combination with the widely-used ROS framework (and probably most things that use OpenCV).

We found the solution to be to pin all opencv-related packages to the Ubuntu defaults (see below).


* undefined reference to `cv::Mat::Mat()'

If anyone finds themselves chasing the same rabbit hole: OpenCV 4.2 inlines the default constructor, which means it won’t end up in libopencv_core.so. Meanwhile, OpenCV 4.5 does not inline it, which means it will end up in the .so file. So when you accidentally compile against 4.5 but link against 4.2, because both of these are installed on your system because you’re using Jetpack 5 and ROS, you get the above error, since cv::Mat::Mat() exists neither in your executable nor in libopencv_core.so.

Removing nvidia-opencv and pinning all opencv packages to 4.2.* fixed the issue for us. Be sure to set the pin priority to 1000, otherwise apt won’t attempt to downgrade them.

1 Like