Tasmota: Error build code in plarformio

Created on 18 Apr 2018  路  20Comments  路  Source: arendst/Tasmota

Today I build(git clone https://github.com/arendst/Sonoff-Tasmota.git ) the firmware and get an error:

lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp: In member function 'bool AsyncUDP::listenMulticast(ip_addr_t*, uint16_t, uint8_t)': lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp:254:57: error: 'udp_set_multicast_netif_addr' was not declared in this scope udp_set_multicast_netif_addr(_pcb, multicast_if_addr); ^ lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp:258:36: error: 'udp_set_multicast_ttl' was not declared in this scope

All 20 comments

Can you try using build 8e0a25f? The next commit adds a bunch of code for the KNX protocol which does not appear in the commit message - was it even intended for this to be added already?

I get master branch (git clone -b master https://github.com/arendst/Sonoff-Tasmota.git), they build without problem. Development build is broken.

@beho1der It's weird, I could build it (yesterday's commit 107379)under Arduino IDE 1.85 and it works fine. Files timestamp was 2018-17-04 08:05:24.
Check if you didn't comment out a define that shouldn't in user_config.h, it can give that kind of error

I test current git (git clone https://github.com/arendst/Sonoff-Tasmota.git). Edit only platformio.ini uncomment

env_default = sonoff

and BUILD, i get error:

Compiling .pioenvs/sonoff/lib530/esp-knx-ip-async-udp-0.4.0.15/esp-knx-ip-send.cpp.o
lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp: In member function 'bool AsyncUDP::listenMulticast(ip_addr_t*, uint16_t, uint8_t)':
lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp:254:57: error: 'udp_set_multicast_netif_addr' was not declared in this scope
udp_set_multicast_netif_addr(_pcb, multicast_if_addr);
^
lib/ESPAsyncUDP-0.21/src/AsyncUDP.cpp:258:36: error: 'udp_set_multicast_ttl' was not declared in this scope
udp_set_multicast_ttl(_pcb, ttl);
^
*** [.pioenvs/sonoff/lib076/ESPAsyncUDP-0.21/AsyncUDP.cpp.o] Error 1

OK, found it !
-> Remove the library Sonoff-Tasmota-development\lib\ESPAsyncUDP-0.21, it is currently not needed but still compiled
I admit that from the archive I only extract the \sonoff directory and only check library changes if I get a build error :-/

_[Edith]_
... remove also new lib esp-knx-ip-async-udp-0.4.0.15 (if you get other errors)
_[/Edith]_

It seems that the makefile dedendencies under Arduino IDE are more efficient that under Platformio. The libraries are not compiled if not called by the source code. I could add both new libs to the project and recompile without issue.
@beho1der , does it work for you now?

I remove folder ESPAsyncUDP-0.21 and esp-knx-ip-async-udp-0.4.0.15 and all build success!
Need Fix it

Hi,

There is no need to fix the development branch.

The issue that you are experiencing is that both libraries now requires version 2.4.0 of the esp8266 board libraries.

Will not compile under 2.3.0 as explained on the libraries readme files:
esp-knx-ip readme
ESPAsyncUDP readme

You need to update your esp8266 board libraries as explained here

If you are using Arduino, just update the esp8266 library from _Program/Libraries/Manage Libraries_ and look for _esp8266_ and click on update

If you are using Platform.io, just change on the file _platformio.ini_:

[env:sonoff]
;platform = [email protected]  ; v2.3.0
platform = [email protected]  ; v2.4.0
;platform = espressif8266

or under the language you prefer.

It works on platform = [email protected] Thanks all for help.

Great! :+1:

I made the PR #2487 to add to the Sonoff-Tasmota readme this requirement. Thanks.

OK, I confirm I was already in 2.40 under Arduino IDE.

Need platform = [email protected]

Yes, but just once.

The first time Platform.io see platform = [email protected] will download the library.
Then, using the platform = espressif8266 will make platform.io use the one just downloaded.

Remember that with this type of change, platform.io also needs a REBUILD C/C++

image

I have no time for testing today but am I right that 2.3.0 still works when KNX is disabled?

If not, then we have to change things as I still want 2.3.0 to be available on non-KNX systems.

On 2.3.0 all Build with KNX

I have no time for testing today but am I right that 2.3.0 still works when KNX is disabled?

nope, KNX commented out in user_config.h and still getting errors while compiling with 2.3.0.

Hi, I'm downgrading the esp-knx-ip library to use 2.3.0 so KNX will run on 2.3.0

I will make the PR soon

The fix will be just:

  • Update ESP-KNX-IP library
  • Delete ESPAsyncUDP library that is no longer used by ESP-KNX-IP library

No other change will be needed. And everything under ESP8266 v2.3.0

PR #2492 to:

  • Update ESP-KNX-IP library
  • Delete ESPAsyncUDP library that is no longer used by ESP-KNX-IP library

Compiled and Tested under ESP8266 Board Library 2.3.0, with and without #define USE_KNX

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jensuffhaus picture jensuffhaus  路  3Comments

Joeyhza picture Joeyhza  路  3Comments

wirelesssolution picture wirelesssolution  路  3Comments

renne picture renne  路  3Comments

he-so picture he-so  路  3Comments