C++11 support not detected

I recently go my Tx1 up and running using Jetpack 2.1. I am now attempting to compile some software for a robotic application (SLAM) and am running into an issue with cmake (output below). Cmake tests to see if the compiler support C++11 and fails with a “double free or corruption (top)” error. I am wondering if my compiler doesn’t actually support C++11 or if it is different error. How can I check that my compiler supports C++11 or not?

I have also read that the particular error may be caused due to low RAM or swap space. Is this likely? If so it looks like I may have to recompile the kernel to enable swap.

Any help would be greatly appreciated. BTW, I am using Linux tegra-ubuntu 3.10.67-g458d45c

– The C compiler identification is GNU 4.8.4
– The CXX compiler identification is GNU 4.8.4
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
Build type: Release
– Performing Test COMPILER_SUPPORTS_CXX11
*** Error in /usr/bin/c++': double free or corruption (top): 0x0009b7a8 *** -- Performing Test COMPILER_SUPPORTS_CXX11 - Failed -- Performing Test COMPILER_SUPPORTS_CXX0X *** Error in /usr/bin/c++': double free or corruption (top): 0x0009b7a8 ***
– Performing Test COMPILER_SUPPORTS_CXX0X - Failed
CMake Error at CMakeLists.txt:26 (message):
The compiler /usr/bin/c++ has no C++11 support. Please use a different C++
compiler.

There may be some complication from user space being 32-bit but kernel running 64-bit. I don’t know if there is an existing arm compiler compatible with the 4.8 user space environment which also supports C++11. You could attempt to try this out by setting up with newer compilers in a cross-compile environment, but there is a lot that could make that difficult. More recent cross-compile tools from Linaro are here (start with the oldest 4.9 series and work your way towards newer):
[url]https://releases.linaro.org/components/toolchain/binaries/[/url]

For user space you will want the arm-linux-gnueabihf 32-bit variants. The next L4T release should migrate to everything using aarch64-linux-gnu 64-bit (not just kernel), which I suspect has C++11.

Thanks for your reply. I was able to get it compile and run finally. I removed the -march=native compiler option which seemed to do the trick. However, I am wondering if the performance of my program is suffering due to the compilation not being optimized. I may try to compile with the -march option again, however, I’m not sure what I should set it to. I know the processor is a Cortex A57 Processor, but I don’t know what that corresponds to in the -march options.

The correct arch option is “-march=armv8-a”.

You can also specify “-mtune=cortex-a57” to optimize for this core specifically.

What SLAM software are you using?