Error during compiling/upload for EVERY device

Hi, , I can’t upload any code to the devices. Compiling ends up with a very long error (and its not a YAML error). Those is for EVERY device …

Compiling /data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/FrameworkArduino/uart.c.o
Compiling /data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/FrameworkArduino/umm_malloc/umm_malloc.c.o
Archiving /data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/libFrameworkArduino.a
Linking /data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/firmware.elf
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_recvEPvP7tcp_pcbP4pbufl+0x4): multiple definition of `AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, long)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_recvEPvP7tcp_pcbP4pbufl+0x10): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_sent(void*, tcp_pcb*, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_sentEPvP7tcp_pcbt+0x4): multiple definition of `AsyncClient::_s_sent(void*, tcp_pcb*, unsigned short)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_sentEPvP7tcp_pcbt+0x10): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_error(void*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8_s_errorEPvl+0x4): multiple definition of `AsyncClient::_s_error(void*, long)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8_s_errorEPvl+0xc): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_poll(void*, tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_pollEPvP7tcp_pcb+0x4): multiple definition of `AsyncClient::_s_poll(void*, tcp_pcb*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_pollEPvP7tcp_pcb+0x10): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::AsyncClient(tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x30): multiple definition of `AsyncClient::AsyncClient(tcp_pcb*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x48): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::AsyncClient(tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x30): multiple definition of `AsyncClient::AsyncClient(tcp_pcb*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x48): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_connected(void*, void*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12_s_connectedEPvS0_l+0x4): multiple definition of `AsyncClient::_s_connected(void*, void*, long)'

I had to cut the log since its too long, this is the end of it

Copy to clipboard

data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6_errorEl+0x4): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_dns_found(ip_addr const*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10_dns_foundEPK7ip_addr+0xc): multiple definition of `AsyncClient::_dns_found(ip_addr const*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10_dns_foundEPK7ip_addr+0xc): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x4): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x4): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x4): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x4): multiple definition of `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x4): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x8): multiple definition of `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x8): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x8): multiple definition of `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x8): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onPacket(std::function<void (void*, AsyncClient*, pbuf*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8onPacketESt8functionIFvPvPS_P4pbufEES1_+0x8): multiple definition of `AsyncClient::onPacket(std::function<void (void*, AsyncClient*, pbuf*)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8onPacketESt8functionIFvPvPS_P4pbufEES1_+0x8): first defined here
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib224/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x8): multiple definition of `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)'
/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/lib3bd/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x8): first defined here
collect2: error: ld returned 1 exit status
*** [/data/14a_gate_door_bridge_shelly/.pioenvs/14a_gate_door_bridge_shelly/firmware.elf] Error 1
========================= [ERROR] Took 107.72 seconds =======================

are you using the web_server component? try removing it

1 Like

yes I can try.
EDIT: yes that was it, I tried on one device

But can’t it be solved otherwise? I do use the webserver sometimes

You can add it back once it works first time. Don’t use clean build

Hello,
I cant complile without the web server, after that I add the webserver, but it produces compile error…
How can we add the web server again?

Thanks in advance!

+Me Too
I do use the WebServer component so if this can be resolved, it would be appreciated.

Works for me. I spent several hours yesterday trying to get my file to compile, but I always used the clean compile option. Not using it made my file compile without any problems.

There are people that is suggesting the same happens with mqtt component, the problem is that dependencies of the components uses different versions and there cannot be linked two different versions of the same library.
I don’t know how to fix this.

I’m not sure how to fix either, but I am certain it is a new “feature”
I’ve had the webserver component enabled for the better part of 2019, and these compiler errors are new as of today for me. Commenting out the webserver allows the compile to succeed, uncommenting it, causes the compiling to fail, clean or “dirty”
I don’t have the MQTT component loaded for what its worth.

I’ve managed to get it working by switching over to esphome dev branch.

In hass.io simply add "esphome_version": "dev" in the addon config section. maybe you could change that back once the addon has successfully started once and the new dependencies are downloaded. but i haven’t tried that.

The root of the problem seems to be that ESPAsyncTCP has been updated to v1.2.1 four days ago and now there are two versions of ESPAsyncTCP installed 1.2.0 and 1.2.1

4 Likes

I was able to get past this by deleting one of the instances of the ESPAsyncTCP library:

sudo rm -rf "ESPHome/my_esp_project/.piolibdeps/ESPAsyncTCP_ID305"