Compile error, gcc arm on linux, firmware v.0.6.1

I’m using gcc arm 4.9 to compile the latest firmware (v0.6.1) on ubuntu. I ran into an error:

…/wiring/inc/spark_wiring_error.h:61:34: error: reference to ‘system_error’ is ambiguous

I tracked it down to defining a “system_error” object in two places, one in the Particle firmware at:
and another in the gcc arm toolchain, located on my computer at:

I was able to get the firmware compiling by temporarily removing the gcc arm system_error class, but I am wondering if there is a more proper way to compile with this toolchain or if I am doing something wrong. I do not have any compile errors for previous firmware versions. Thanks!

Have you tried po-util? po-util is a tool I created for building locally on Linux and macOS.

To install on Linux just run this command:

$ bash <( curl -sL ) install

po-util has many features including Atom integration with shortcuts for accelerated development.

If you get stuck, try the README or the manpage for po, or contact me here.

I can build the firmware using gcc 4.9.3 with no problems. Do you use using namespace std in your application header files? If yes, then moving these statements to .cpp files should solve the problem (make sure to put them after all #include directives).

We’ll rename our internal system_error type to something else in next release to avoid this kind of errors.