2.0/Mega not compiling on Platformio/OS X

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
balk
New user
Posts: 2
Joined: 12 Jan 2018, 21:27

2.0/Mega not compiling on Platformio/OS X

#1 Post by balk » 12 Jan 2018, 21:49

Hi, I am new here but not new to ESP Easy; love it :)

I've compiled ESP Easy before but I recently ran into errors (see below). I am running Atom/Platformio on OS X 10.13.2. I've downloaded various versions of ESP Easy and all of them fail with a similar error. I've even tried to recompile a version that I downloaded in June last year, and successfully compiled at that time. It does not compile today. I've also installed Atom on a new user profile on my Mac as a fresh start. Same result.

The error log is pretty long; this is the first error in red (in the Platformio log)

Code: Select all

lib/IRremoteESP8266/IRMitsubishiAC.cpp:81:44: error: no matching function for call to 'min(unsigned in
t, uint8_t&)'
It follows a longer trail in yellow. After this, it goes on and on.

Code: Select all

lib/IRremoteESP8266/IRMitsubishiAC.cpp:80:44: note:   mismatched types 'std::initializer_list<_Tp>' an
d 'unsigned int'
temp = max(MITSUBISHI_AC_MIN_TEMP, temp);
^
In file included from /Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++
/4.8.2/algorithm:61:0,
from /Users/sander/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:240,

from lib/IRremoteESP8266/IRremoteInt.h:33,
from lib/IRremoteESP8266/IRremoteESP8266.h:35,
from lib/IRremoteESP8266/IRMitsubishiAC.h:2,
from lib/IRremoteESP8266/IRMitsubishiAC.cpp:12:
/Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algoba
se.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Com
pare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algoba
se.h:260:5: note:   template argument deduction/substitution failed:
lib/IRremoteESP8266/IRMitsubishiAC.cpp:80:44: note:   deduced conflicting types for parameter 'const _

Tp' ('unsigned int' and 'uint8_t {aka unsigned char}')
temp = max(MITSUBISHI_AC_MIN_TEMP, temp);
^
In file included from /Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++
/4.8.2/algorithm:61:0,
from /Users/sander/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:240,
from lib/IRremoteESP8266/IRremoteInt.h:33,
from lib/IRremoteESP8266/IRremoteESP8266.h:35,
from lib/IRremoteESP8266/IRMitsubishiAC.h:2,
from lib/IRremoteESP8266/IRMitsubishiAC.cpp:12:
/Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algoba
se.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/Users/sander/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_algoba
se.h:216:5: note:   template argument deduction/substitution failed:
lib/IRremoteESP8266/IRMitsubishiAC.cpp:80:44: note:   deduced conflicting types for parameter 'const _
Tp' ('unsigned int' and 'uint8_t {aka unsigned char}')
temp = max(MITSUBISHI_AC_MIN_TEMP, temp);
^
lib/IRremoteESP8266/IRMitsubishiAC.cpp:81:44: error: no matching function for call to 'min(unsigned in
t, uint8_t&)'
Does anyone have the same issue?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: 2.0/Mega not compiling on Platformio/OS X

#2 Post by TD-er » 13 Jan 2018, 02:13

Probably upgrade the external library IRMitsubishiAC ?

balk
New user
Posts: 2
Joined: 12 Jan 2018, 21:27

Re: 2.0/Mega not compiling on Platformio/OS X

#3 Post by balk » 13 Jan 2018, 23:08

IRMitsubishiAC is shipped with ESPEasy as part of IRremoteESP8266. There is another lib: toolchain-xtensa which is external to ESPEasy and resides in

Code: Select all

/Users/<username>/.platformio/packages/toolchain-xtensa
It may have gotten updated and now incompatible with IRremoteESP8266.
Anyhow, my problem is solved after I've deleted _P016_IR.ino and _P035_IRTX.ino from src.

Question is: where does a bug report belong? ESP Easy? Toolchain-xtensa? IRremoteESP8266?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: 2.0/Mega not compiling on Platformio/OS X

#4 Post by TD-er » 13 Jan 2018, 23:33

If there is a newer version of the library, I would suggest opening an issue at our Github: https://github.com/letscontrolit/ESPEasy/issues

BigAndi
New user
Posts: 3
Joined: 12 Jan 2018, 19:17

Re: 2.0/Mega not compiling on Platformio/OS X

#5 Post by BigAndi » 14 Jan 2018, 12:39

Yesterday i had the same issue. Fixing this is easy.

Code: Select all

lib/IRremoteESP8266/IRMitsubishiAC.cpp:80:44: note:   mismatched types 'std::initializer_list<_Tp>' an
d 'unsigned int'
temp = max(MITSUBISHI_AC_MIN_TEMP, temp);
^
Change all the max() (or min())-calls in the code (lib/IRremoteESP8266/IRKelvinator.cpp, lib/IRremoteESP8266/IRMitsubishiAC.cpp, lib/IRremoteESP8266/IRremoteESP8266.cpp) to:

Code: Select all

temp = max<int>(MITSUBISHI_AC_MIN_TEMP, temp);
(means, add the <int> after the function call)
and it'll compile without errors.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 33 guests