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

Moderator: igrr

User avatar
By certeza
#26606 In Arduino IDE 1.6.5 the following statement placed before the line "void setup()" causes a compile error:
Code: Select allint s = 0;


In fact any declaration of variable s (String, long, int, byte) causes a compile error.
User avatar
By martinayotte
#26607 Doh ! :o
When I saw your post, I was stomached, I decided to give it a try ...
Yes, there is an error, but at link time :
Code: Select all/home/martin/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//lib/liblwip.a(dhcpserver.o):(.bss+0x10): multiple definition of `s'
/tmp/build2476085467671613982.tmp/Sketch_Buffet.cpp.o:/home/martin/arduino/arduino-1.6.5/Sketch_Buffet.ino:113: first defined here
/home/martin/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: Warning: size of symbol `s' changed from 4 in /tmp/build2476085467671613982.tmp/Sketch_Buffet.cpp.o to 2 in /home/martin/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//lib/liblwip.a(dhcpserver.o)
collect2: error: ld returned 1 exit status


So, those Espressif developpers are really amazing ! :lol:
They should have declared this variable to such thing like "dhcp_server" in their liblwip, but they didn't !!!

Simply Amazing !!!

Thanks for the discovery ...
User avatar
By kolban
#26629 Using the "nm --define-only <Archive.a>" command, we can dump each of the Espressif supplied libraries and see what they export. It seems that "s" was the only one I could find that looks egregiously wrong. Here are some other definitions that are exported that "just" might cause some puzzles ...

info
hostname
ccmp
tkip
wep
scannum
g_ic
auth_type
rf_init
tcb
pwm
p_kiss
hex2byte
show_buf

This of course is what we get when we use a single namespace language like "C". In "C" we are pretty darn close to the metal so the dial is turned to full capability away from enhanced functionality (like namespaces). <opinion>

Neil