Local compile throwing out 706 errors

It appears I have a problem related to the gcc-arm compiler - Local compile is throwing out these sorts of error

/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h: In instantiation of 'static void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, const std::_Any_data&, std::true_type) [with _Functor = int (*)(const char*); std::true_type = std::integral_constant<bool, true>]':
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:211:16:   required from 'static bool std::_Function_base::_Base_manager<_Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Functor = int (*)(const char*)]'
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:677:19:   required from 'std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = int (*)(const char*); <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = int; _ArgTypes = {String}]'
../wiring/inc/spark_wiring_cloud.h:214:25:   required from 'static bool CloudClass::function(const T&, Types ...) [with T = char [13]; Types = {int (*)(const char*)}]'
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-locker-base/src/zioxi-locker-base.ino:8072:49:   required from here
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:167:4: error: no matching function for call to 'operator new(sizetype, void*)'
  167 |    ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I have tried a quit and reload of VSC. The startup appears to work fine.

Do I need to re-install Workbench?

Thanks

Do I need to re-install Workbench?

you should never need to reinstall. this is still the recommended troubleshooting steps:

in particular, steps 10 & 11 are essential :pray: :+1:

Matt

  1. Done - similar issue not found
  2. Done
  3. Updates VSC - says no updates available and CLI dependencies updated Workbench is 1.13.8 and VSC 1.56.2

Version: 1.56.2
Commit: 054a9295330880ed74ceaedda236253b4f39a335
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 20.4.0
4.


5. Not relevant
6. Not relevant
7. Not relevant
8. Not relevant
9. Not applicable
10. Local Compile - every time OS compiles fine then application stage throws out warnings and errors as per the example provided

  1. Environment Audit

Happy to share the above with you by email.

I have tried clean environment and that hasn’t worked.

William Steen
wjsteen@talktalk.net

every time OS compiles fine then application stage throws out warnings and errors as per the example provided

what leads you to believe these errors and warning are inaccurate? are you able to build w/ previous (e.g. v1.x) versions of the Device OS toolchain?

This looks more like an error with the application you are building. Could you paste the context here?

I think you might be right Nathan - I just can’t see where the problem is yet. This all kicked off after a branch merge.

I tried another application and that builds OK.

How and where have you got remoteAdmin defined?

// Particle function forward declaration
int remoteAdmin(const char * command); 
int remoteParam(const char * command);
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/tuple:1383:5: note:   template argument deduction/substitution failed:
In file included from /Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/functional:59,
                 from ../communication/inc/protocol_defs.h:3,
                 from ../communication/inc/spark_protocol_functions.h:25,
                 from ../wiring/inc/spark_wiring_version.h:27,
                 from ../wiring/inc/spark_wiring_system.h:29,
                 from ../wiring/inc/spark_wiring.h:49,
                 from ./inc/application.h:42,
                 from ./inc/Particle.h:5,
                 from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-locker-base/src/zioxi-locker-base.ino:142:
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h: In instantiation of 'static void std::_Function_base::_Base_manager<_Functor>::_M_init_functor(std::_Any_data&, _Functor&&, std::true_type) [with _Functor = void (*)(); std::true_type = std::integral_constant<bool, true>]':
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:223:19:   required from 'static void std::_Function_base::_Base_manager<_Functor>::_M_init_functor(std::_Any_data&, _Functor&&) [with _Functor = void (*)()]'
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:675:34:   required from 'std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = void (*)(); <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = void; _ArgTypes = {}]'
../wiring/inc/spark_wiring_watchdog.h:59:65:   required from here
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:248:4: error: no matching function for call to 'operator new(sizetype, void*)'
  248 |  { ::new (__functor._M_access()) _Functor(std::move(__f)); }
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<built-in>: note: candidate: 'void* operator new(unsigned int)'
<built-in>: note:   candidate expects 1 argument, 2 provided
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h: In instantiation of 'static void std::_Function_base::_Base_manager<_Functor>::_M_clone(std::_Any_data&, const std::_Any_data&, std::true_type) [with _Functor = void (*)(); std::true_type = std::integral_constant<bool, true>]':
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:211:16:   required from 'static bool std::_Function_base::_Base_manager<_Functor>::_M_manager(std::_Any_data&, const std::_Any_data&, std::_Manager_operation) [with _Functor = void (*)()]'
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:677:19:   required from 'std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = void (*)(); <template-parameter-2-2> = void; <template-parameter-2-3> = void; _Res = void; _ArgTypes = {}]'
../wiring/inc/spark_wiring_watchdog.h:59:65:   required from here
/Users/wjsteen/.particle/toolchains/gcc-arm/9.2.1/arm-none-eabi/include/c++/9.2.1/bits/std_function.h:167:4: error: no matching function for call to 'operator new(sizetype, void*)'
  167 |    ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A bit more detail of the errors reported - I’m now blind to what this is if it is in the application.

Overnight I had a thought to roll-back to the last commit on a branch that had compiled and sure enough it compiled - so not a Workbench issue - closed as solved.

[update] It appears that the code that would not build had this “algorithm” in {settings.json}


Everything else is the same - any rational explanation for what this does and how it got inserted?