Closed mischa-ai closed 5 months ago
The script seems to install gcc8 but:
echo "Compiler version: $(gcc --version)" echo "CMake version: $(cmake --version)"
Compiler version: gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0 CMake version: cmake version 3.27.0
Hi @mischa-ai, do you see this print line get triggered in the build?
On 18.04, it will install gcc-8 for Humble/Iron, and sets the CC/CXX environment vars that CMake picks up and compiles with (even though gcc
still points to the original). If that wasn't working, you may have run into build errors even earlier that were related to C++17 support.
Since your issue seems to emanate from the ros2_control
package you are adding, my guess is that package requires an even newer compiler version. gcc-8 is the latest that's in the 18.04 apt repo, however maybe you could find a newer one via a PPA like here: https://askubuntu.com/a/1149383
It's also probably worth mentioning that 18.04 is a bit long in the tooth for full ROS2 Iron, which is not formally supported on 18.04: https://www.ros.org/reps/rep-2000.html#iron-irwini-may-2023-november-2024 so if you require this package, you may need to either patch it manually (if other methods of upgrading the toolchain don't work for you), or roll back to an older version of ROS.
Hi @dusty-nv ,
yes, I guess it's the ros2_control
package (or some dependencies) that have this requirements.
I tried a lot of different configurations but nothing worked so far with gcc8 (I tested a lot and made sure that it is installed and used).
Right now I'm trying to install gcc9 into the image, so hopefully it can solve that problem.
I will update this issue as soon as I can find (hopefully) a solution.
Otherwise I will use the ros2-jetbot example project (though I really don't want to do that, because it makes absolutely no sense to me using ROS2 if I cannot use ros2_control.)
I'm interested on update gcc version, I think that I can't build nav2 for the same reason: https://github.com/dusty-nv/jetson-containers/issues/336#issuecomment-1823441182 Please, keep this updated!
Thank!!!
This is my findings so far :
in short it's not possible
I tried the same process directly on the jetson nano and also inside the provided container.
I updated the g++ version to 9 and also 11, both fails to build (the ros2_control package and also a bunch of other ros2 packages failed).
I think the combination of Ubuntu 18 (which officially reached end of live and is not supported anymore) and newer g++ and maybe some other dependencies are simply incompatible.
My solution is to use an osrf container with latest ROS2 build (which does not support the gpu drivers, so I use it only to control the robot).
Jetson Nano with
Jetpack 4.6.4 L4T 32.7.4 Docker 24.0.2
I tried to build the
ros2_control
package from source in thedustynv/ros:iron-ros-base-l4t-r32.7.1
container and also to build ros2 completely with the package with the same outcome.To build completely, I used basically this Dockerfile and this script and just added
ros2_control
andros2_controllers
to therosinstall_generator
step.In both ways this error occured:
I tried to find out what it is, and it seems to be a problem with C++17 ... but I have no idea how to proceed further to resolve that problem.
The script seems to install gcc8 but:
Any ideas @dusty-nv ?