Bug? Another compilation error symptom after moving from ESP8266 core 2.4.7 to 3.0.0 or up

BertI

Member
Licensed User
Longtime User
After updating the Arduino ESP8266 core from 2.4.7 to 3.0.0 or upwards I seem to be getting a set of compilation errors, different to the ones reported by other users a while ago. This I initially found when using an earlier version of B4R but also the same for B4R 3.90. A small section of the error log is shown below but the rest is of similar gist:

Comp Err:
In file included from C:\B4R\tt1\Objects\bin\sketch\B4RDefines.h:24,
                 from C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp:1:
C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp: In static member function 'static void b4r_main::_afterreset()':
rCore.h:497:61: error: call of overloaded 'abs(ULong)' is ambiguous
  497 |   #define /*Double Abs(Double Number);*/ Common_Abs(n) abs(n)
      |                                                             ^
C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp:455:18: note: in expansion of macro 'Common_Abs'
  455 | _dift = (ULong) (Common_Abs(b4r_main::_starttime-Common_Millis()));
      |                  ^~~~~~~~~~
In file included from c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\cstdlib:75,
                 from c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\stdlib.h:36,
                 from C:\Users\BRT\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:27,
                 from C:\B4R\tt1\Objects\bin\sketch\B4RDefines.h:8,
                 from C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp:1:
c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\stdlib.h:74:5: note: candidate: 'int abs(int)'
   74 | int abs (int);
      |     ^~~
In file included from c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\cstdlib:77,
                 from c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\stdlib.h:36,
                 from C:\Users\BRT\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:27,
                 from C:\B4R\tt1\Objects\bin\sketch\B4RDefines.h:8,
                 from C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp:1:
c:\users\brt\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\bits\std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
 

peacemaker

Expert
Licensed User
Longtime User
C:\B4R\tt1\Objects\bin\sketch\b4r_main.cpp: In static member function 'static void b4r_main::_afterreset()': rCore.h:497:61: error: call of overloaded 'abs(ULong)' is ambiguous
Your code problem, I also use esp8266\hardware\esp8266\3.0.2\, it's ok
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…