ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Segmentation fault (program cc1plus) when compile code with "ROS_ERROR_STREAM()"

asked 2021-12-15 21:30:46 -0500

Samuel_Leon_Fisher gravatar image

updated 2021-12-16 14:21:00 -0500

gvdhoorn gravatar image

I am trying to compile Autoware.io on Nvidia Jetson Xavier .

Package name : lanelet2_extension (package in Autoware.io, source code from https://github.com/Autoware-AI/autowa...)

Jetson Xavier core architecture is ARMv8

OS version:Linux nvidia-desktop 4.9.253-tegra #1 SMP PREEMPT Mon Jul 26 12:19:28 PDT 2021 aarch64 aarch64 aarch64 GNU/Linux

Distributor ID: Ubuntu

Description: Ubuntu 18.04.5 LTS

Release: 18.04

Codename: bionic

ROS version: melodic

Error msg:

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[3]: *** [CMakeFiles/utilities-test.dir/test/src/test_utilities.cpp.o] Error 4
make[2]: *** [CMakeFiles/utilities-test.dir/all] Error 2
make[1]: *** [CMakeFiles/tests.dir/rule] Error 2
make: *** [tests] Error 2
    GCC version: gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0

BTW, I tried to compile the code with gcc 5.5, the problem still exists.

I noticed another Q&A (https://answers.ros.org/question/9744...), so I commented part of the code,such as "ROS_ERROR_STREAM(__FUNCTION__ << "msg is null pointer!");" and so on. Finally, the code can be compiled correctly

so, how should I investigate the cause of the error in depth? Seems to be caused by stream output?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-12-16 04:58:32 -0500

Samuel_Leon_Fisher gravatar image

I think I may have solved this problem.

Maybe the stack size is too small. I increased the stack limit to 8192 and the problem was resolved.

To modify the stack size, please modify the file "/etc/security/limits.conf"

edit flag offensive delete link more

Comments

Glad you found an answer @Samuel_Leon_Fisher. Thank you for sharing

osilva gravatar image osilva  ( 2021-12-18 09:51:38 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-15 21:29:02 -0500

Seen: 1,040 times

Last updated: Dec 16 '21