G++ Compiler Issues with TX2 on Jetpack 4.6 (L4T 32.6.1)

Hi!
Since we had to port our product to L4T 32.6.1 we ran into an issue compiling our software. I can reproduce the issue with a stock kernel 4.9.253-tegra and the development platform P2771.

We do NOT have this issue with

  • same hardware, with kernel of Jetpack 4.3 (binary identical compiler though…)
  • jetson nano with jetpack 4.6

But with the TX2 and the newer kernels we always get internal compiler errors for some complex source files.

This is easy to reproduce with a unit test from the Eigen software library:

cd /tmp/;
wget ‘https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
tar xvjf eigen-3.4.0.tar.bz2
cd eigen-3.4.0
mkdir nbuild;cd nbuild; cmake …; make nomalloc_4;

this every time results in


– Build files have been written to: /tmp/eigen-3.4.0/nbuild
Building CXX object test/CMakeFiles/nomalloc_4.dir/nomalloc.cpp.o
c++: internal compiler error: Segmentation fault (program cc1plus)

$ uname -a

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

$ md5sum /usr/lib/gcc/aarch64-linux-gnu/7.5.0/cc1plus

ed1c09dbb81247c7f63dd736d03228cd /usr/lib/gcc/aarch64-linux-gnu/7.5.0/cc1plus
I also tried other g++ versions (8, 9 and 11) with similar results.

Using gdb I found out, that no particual line in my testfile was provoking this, but when the preprocessed file was about 130000 lines long I could see cc1plus program running into repeated loop on the callstack. RAM still had 4GB free at that time.

Did anybody run into similar issues?

Just try on J4.6.1(r32.7.1) without problem.

nvidia@nvidia-desktop:~/eigen-3.4.0/build$ make nomalloc_4
Scanning dependencies of target nomalloc_4
Building CXX object test/CMakeFiles/nomalloc_4.dir/nomalloc.cpp.o
Linking CXX executable nomalloc_4
Built target nomalloc_4

I can confirm, that it works with r32.7.1.
Thanks!

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