ThingerESP8266 failed to compile on mac, Lib version 2.16.0 latest

I have installed the thinger.io latest library, I am using the NodeMCU example. The default example does not compile with the library. Below is the failure.

Arduino: 1.8.15 (Mac OS X), Board: “NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 921600”

In file included from /Users/dipak.patil/Documents/Arduino/libraries/thinger.io/src/ThingerWifi.h:27,
from /Users/dipak.patil/Documents/Arduino/libraries/thinger.io/src/ThingerESP8266.h:28,
from /Users/dipak.patil/Documents/Arduino/libraries/thinger.io/examples/ESP8266/NodeMCU/NodeMCU.ino:1:
/Users/dipak.patil/Documents/Arduino/libraries/thinger.io/src/ThingerClient.h: In member function ‘virtual bool ThingerClient::read(char*, size_t)’:
/Users/dipak.patil/Documents/Arduino/libraries/thinger.io/src/ThingerClient.h:128:45: error: call of overloaded ‘abs(long unsigned int)’ is ambiguous
128 | if(read<=0 && abs(millis()-start)>=DEFAULT_READ_TIMEOUT){
| ^
In file included from /Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/cstdlib:75,
from /Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/stdlib.h:36,
from /Users/dipak.patil/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/cores/esp8266/Arduino.h:27,
from sketch/NodeMCU.ino.cpp:1:
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/stdlib.h:74:5: note: candidate: ‘int abs(int)’
74 | int abs (int);
| ^~~
In file included from /Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/cstdlib:77,
from /Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/stdlib.h:36,
from /Users/dipak.patil/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.0/cores/esp8266/Arduino.h:27,
from sketch/NodeMCU.ino.cpp:1:
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/bits/std_abs.h:79:3: note: candidate: ‘constexpr long double std::abs(long double)’
79 | abs(long double __x)
| ^~~
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/bits/std_abs.h:75:3: note: candidate: ‘constexpr float std::abs(float)’
75 | abs(float __x)
| ^~~
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/bits/std_abs.h:71:3: note: candidate: ‘constexpr double std::abs(double)’
71 | abs(double __x)
| ^~~
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/bits/std_abs.h:61:3: note: candidate: ‘long long int std::abs(long long int)’
61 | abs(long long __x) { return __builtin_llabs (__x); }
| ^~~
/Users/dipak.patil/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.0-newlib4.0.0-gnu23-48f7b08/xtensa-lx106-elf/include/c++/10.2.0/bits/std_abs.h:56:3: note: candidate: ‘long int std::abs(long int)’
56 | abs(long __i) { return __builtin_labs(__i); }
| ^~~
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Try a previous version of thinger library, sometimes that worked for me.

sorry, but still didn’t work :frowning:

I have arduino windows 10, Arduino IDE version 1.8.12, esp8266 controller board version 2.7.4 and thinger.io library version 2.15 and it works ok, try with this versions to see if it can compile the example.

Hope this helps.

Hi,
I have the very same problem in Linux Mint 19, with Arduino IDE 1.8.13 and thinger library version 2.16. I also tried previous versions of the library but I keep getting the same error. Can anyone help?
Thanks!

Hi,

Have you tried with previous version of ESP8266 controller board? Sometimes there has been incompatibilities with the last version of the board’s controller.

Regards.

Hi,
thanks for the reply. Just tried with the previous version and it did not work, just got a different error.
Regards