Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By schufti
#25935 Hi,
including ESP8266WiFi.h doesn't compile with the recent staging version. The error messages are:
Code: Select allIn file included from d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:64:0,
                 from d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\memory:62,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/WiFiClient.h:28,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32,
                 from WeatherDisplay.ino:14:
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_pair.h:194:21: error: macro "swap" requires 2 arguments, but only 1 given
       swap(pair& __p)
                     ^
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_pair.h:254:50: error: macro "swap" passed 4 arguments, but takes just 2
     swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
                                                  ^
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_pair.h:255:35: error: macro "swap" requires 2 arguments, but only 1 given
     noexcept(noexcept(__x.swap(__y)))
                                   ^
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_pair.h:256:19: error: macro "swap" requires 2 arguments, but only 1 given
     { __x.swap(__y); }
                   ^
In file included from d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\memory:63:0,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/WiFiClient.h:28,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32,
                 from WeatherDisplay.ino:14:
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\allocator.h:209:32: error: macro "swap" requires 2 arguments, but only 1 given
   __c.get_allocator()).swap(__c);


can sb have a look at it?

thanks,
schufti

p.s.: the project is https://github.com/ardyesp/WeatherDisplay , needing https://github.com/somhi/ESP_SSD1306 and Adafrfuit gfx lib to compile, too.
User avatar
By schufti
#26125 update:
it is not a problem with ESP8266WiFi.h per se. In some sketches it is working flawlessly.

BUT: if I include ESP8266WiFi.h in a flawlessly compilig sketch (e.g. ESP_ssd1306 demo) I get depending on order of includes either the "swap" or the following error:
Code: Select allESP_ssd1306_128x64_SPI.ino: In function 'void testfilltriangle()':
ESP_ssd1306_128x64_SPI.ino:345:57: error: 'min' was not declared in this scope
ESP_ssd1306_128x64_SPI.ino:345:57: note: suggested alternative:
In file included from d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\memory:62:0,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/WiFiClient.h:28,
                 from D:\arduino\portable\packages\esp8266\hardware\esp8266\1.6.5-1044-g170995a\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32,
                 from ESP_ssd1306_128x64_SPI.ino:22:
d:\arduino\portable\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\bits\stl_algobase.h:239:5: note:   'std::min'
     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^

WTF min() is standard function mentioned in Arduino reference ???

so please can someone in the know look over these symptoms ???

As the "stable" was updated from staging recently, how can I go back to an older stable version for tests?

thanks,
schufti
User avatar
By kolban
#26160 How Schufti,

On the comment "WTF min() is standard function mentioned in Arduino reference ???" ... I think it is important to realize two things.

The first is that this is an Open Source project and there are only 1 or 2 (or< 6) folks tinkering with it in their free time. As such, there will undoubtedly be things broken or missing.

The second is the goal of the project ... which is to provide the Arduino IDE for ESP8266 programming. For the most part, that seems done (to my eyes). The second goal of the project is to get the most important libraries that were built for the Arduino ported to the ESP environment (where porting is needed). Just because something is present for the real Arduino doesn't mean that it automatically becomes present for the ESP environment.