compile error: segmentation fault

anyone knows why this happens?

g++: internal compiler error: Segmentation fault (program cc1plus)

I tried a few suggestions from google but nothing works so far.
Out of 18 projects that I’m trying to compile 6 fail with this error.

Are you compiling natively from Jetson (if so, which release version)? Is there a publicly available program that can be used to reproduce this? Otherwise there isn’t any way to make any conclusion.


I’m compiling on Jetson yes. I upgraded to R21.3 recently.
I did not had this issue on original R19.3

Was there a change in the gcc installation? Maybe I can downgrade gcc and try a different version

I could try to cross-compile it on my ubuntu laptop.

I saw some comments on the internet that it might be issue with memory. So I added swap to Jetson but it still doesn’t compile.
So the search continues…

I don’t know of any significant change to gcc. I’ve compiled under R19.2 through R21.3 without this showing up. I’ve actually seen the internal error on older x86 machines long ago but have not seen this in years (some of those older errors were compiler bugs, others were RAM failure). Thus the question on the actual source code being compiled…perhaps it is related to the source code, especially to options used in its compile.

Is there a simple example someone could use to verify the error? Without that there isn’t much of a chance of finding out what is going on.

If you want to try newer GCC 4.9 version, this might work:

You might also be able to sometimes work around internal compiler errors by changing the optimisation flags used in the project.

I’ll check the flags first, might be issues in my lua scripts.
And try gcc 4.9 if everything else fails


didn’t had time to analyse it in depth, but I’ll try to figure out what’s going on

gcc v4.9 solved the segmentation error