Ros2 foxy version compile on JetPack 4.6

i compiled ROS2 Foxy on JetPack 4.4, it works well. but on JetPack 4.6, there is a error:

— stderr: test_communication
c++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
make[2]: *** [CMakeFiles/test_publisher_subscriber_cpp.dir/test/test_publisher_subscriber.cpp.o] Error 4
make[1]: *** [CMakeFiles/test_publisher_subscriber_cpp.dir/all] Error 2
make: *** [all] Error 2

Failed <<< test_communication [3min 45s, exited with code 2]

is there some differences about 4.4 and 4.6?

similar issue discussed: ROS Hector Mapping: c++: internal compiler error: Segmentation fault (program cc1plus) - #2 by dusty_nv
you may also like to consider running ros2 from container with ubuntu 20.04

This is the docker image I made last year.
Since it has 12.8GB, please use SSD storage.

  1. JetPack 4.6
  2. OS login username: jetson
  3. Use SSD storage for docker
  4. sudo su
  5. ./
  6. export DISPLAY=:0 (Run this on docker terminal)

Gazebo and rviz2 are available in this docker.
I don’t remember the error, but looking at the dockerfile may give you some hints. (1.5 KB)
Dockerfile.ros2.foxy.jetson.jp46 (22.0 KB)

@liu.jialu there is also an option to upgrade OS to 20.04[dist upgrade] then install ros2 foxy from apt systemwide
soon 20.04 will be avlailable from jetpack installation with next JetPack releases

thanks. change stack limit works for me now.

because “sudo ulimit” can not work, so

$ sudo vi /etc/security/limits.conf

nvidia hard stack 1024
nvidia soft stack 1024

modify 1024 to 8192

nvidia hard stack 8192
nvidia soft stack 8192

after reboot, it works well now.

8192 is default value of JetPack 4.4, then why it was changed to 1024 in JetPack 4.6?

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