me-no-dev / AsyncTCP

Async TCP Library for ESP32
GNU Lesser General Public License v3.0
757 stars 439 forks source link

Got new errors when upgrading framework-arduinoespressif32 #24

Closed trycoon closed 5 years ago

trycoon commented 6 years ago

I upgraded https://github.com/espressif/arduino-esp32.git locally to commit: 85032b226c7775bae510e954112823a2ae32181a and now I get the following error when I compile:

.piolibdeps/AsyncTCP/src/AsyncTCP.cpp:259:27: error: field 'call' has incomplete type 'tcpip_api_call' struct tcpip_api_call call; ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:259:12: note: forward declaration of 'struct tcpip_api_call' struct tcpip_api_call call; ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_output(tcp_pcb)': .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:291:65: error: invalid conversion from 'err_t ()(tcpip_api_call) {aka signed char ()(tcpip_api_call)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call_data)}' [-fpermissive] tcpip_api_call(_tcp_output_api, (struct tcpip_api_call)&msg); ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:291:65: error: cannot convert 'tcpip_api_call' to 'tcpip_api_call_data' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data)' .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_write(tcp_pcb, const char, size_t, uint8_t)': .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:307:64: error: invalid conversion from 'err_t ()(tcpip_api_call) {aka signed char ()(tcpip_api_call)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call_data)}' [-fpermissive] tcpip_api_call(_tcp_write_api, (struct tcpip_api_call)&msg); ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:307:64: error: cannot convert 'tcpip_api_call' to 'tcpip_api_call_data' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data)' .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_recved(tcp_pcb, size_t)': .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:322:65: error: invalid conversion from 'err_t ()(tcpip_api_call) {aka signed char ()(tcpip_api_call)}' to 'tcpip_api_call_fn {aka signed char ()(tcpip_api_call_data)}' [-fpermissive] tcpip_api_call(_tcp_recved_api, (struct tcpip_api_call)&msg); ^ .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:322:65: error: cannot convert 'tcpip_api_call' to 'tcpip_api_call_data' for argument '2' to 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call_data)' .piolibdeps/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete

My project have the following dependencies: lib_deps = AsyncMqttClient@0.8.2 AsyncTCP=https://github.com/me-no-dev/AsyncTCP.git#5453ec2e3fdd9beb92b8423878008b57be7805e6 ESP Async WebServer=https://github.com/me-no-dev/ESPAsyncWebServer.git#bed4146ec647fd1cdfd1d2485724369c92cab8e6 ArduinoJson@5.13.3 ArduinoLog@1.0.2 PID@1.2.0

sillyfrog commented 6 years ago

I'm having a similar issue (I think), going back to a project I haven't done anything on in months, and getting a bunch of similar errors as per above (just recompiling what I had, and I let things update). It looks like a structure has changed names, but I'm not that across the internals of all of this. I'll take a look when I get a chance, but it maybe a couple of weeks...

trycoon commented 6 years ago

@sillyfrog It works if you use this branch: https://github.com/me-no-dev/AsyncTCP/tree/idf-update

sillyfrog commented 6 years ago

@trycoon Thank you! I have added https://github.com/me-no-dev/AsyncTCP.git#idf-update to my lib_deps section in the platformio.ini, and it now compiles again - cheers!

Onno-Dirkzwager commented 6 years ago

I had the same problems using the Prerelease for 1.0.1 and can confirm the idf-update branch solved the errors. Thanks @trycoon for pointing this out!

nevercast commented 6 years ago

idf-update has been merged in to master, this library compiles for me if you use the latest github (master branch) instead of the lib on PIO, and ensure your framework is up to date. As I'm using PIO the option was under Updates > Update All.

trycoon commented 5 years ago

Working now.