Compiling with GCC6?

Anyone done this? Ubuntu on Windows 10 does not support 32bit executables so I am stuck trying to use 64bit executables which means the very latest arm compiler.

It all gets quite far until:
CXX: /mnt/i/github/ardupilot-dist/modules/PX4Firmware/src/modules/uORB/uORBDevices_nuttx.cpp
In file included from /opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/c++/6.3.1/string:52:0,
from /mnt/i/github/ardupilot-dist/modules/PX4Firmware/src/modules/uORB/uORBUtils.hpp:37,
from /mnt/i/github/ardupilot-dist/modules/PX4Firmware/src/modules/uORB/uORBDevices_nuttx.cpp:40:
/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/c++/6.3.1/bits/basic_string.h: In function ‘float std::__cxx11::stof(const string&, size_t*)’:
/opt/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/c++/6.3.1/bits/basic_string.h:5454:31: error: ‘strtof’ is not a member of ‘std’
{ return __gnu_cxx::__stoa(&std::strtof, “stof”, __str.c_str(), __idx); }
^~~
compilation terminated due to -Wfatal-errors.
make[3]: *** [uORBDevices_nuttx.cpp.o] Error 1

Will I have better luck with master or is this a pointless exercise?

andy

I have the same problem compiling rover on Fedora 25 with arm-none-eabi 6.2.0 so you are not alone.
I am compiling the latest git master branch too.

There is a 64-bit version of the ARM GCC 4.9. Look at step 10 in http://ardupilot.org/dev/docs/building-ardupilot-onwindows10.html#setup-ardupilot-dev-enviromment-for-ubuntu-bash-on-windows-10

GCC 6 isn’t supported for now in ArduPilot.

Thanks! I shall try that.

The repository for that 64-bit version of the ARM GCC 4.9 is no longer available. Currently, I get the same error message as Andy, because I was left with installing gcc6, when I followed the instructions on the link pointed to by OXINARF.
Thanks in advance for help!

Alberto, not sure what repository you are referring to where arm gcc 4.9 is not available. But check step 9 of http://ardupilot.org/dev/docs/building-ardupilot-onwindows10.html#setup-ardupilot-dev-enviromment-for-ubuntu-bash-on-windows-10

it will get you the right compiler.
Specifically:

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1

sudo apt-get update
sudo apt-get upgrade

EDIT: That said [see below], I was able to successfully build the latest version of ArduPilot for Plane using the latest GCC (sudo apt-get install gcc-arm-none-eabi)

Unfortunately, that’s just the issue.
That version is no longer available from the quoted repository.

See output below:

The repository seems to have a couple other issues:

Hi, did you encounter any errors as mentioned by OP? i.e. 'strtof' is not a member of 'std' etc. ? If so, how did you solve it?? I’m trying to compile with the latest GCC as well, would greatly appreciate your help!

I didn’t encounter any hard errors, though there are warnings throughout.
I followed the standard WSL + waf guide pretty much to the letter: http://ardupilot.org/dev/docs/building-ardupilot-onwindows10.html

The only difference was in step 9:
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1

I’m running into errors with the suggestion from Evan110011, and the steps listed in on the doc page I listed all of my issues and errors over at the ardupilot wiki. I’m stumped and hoping there is an easy solution.

Thanks,
Jeremy