me-no-dev / AsyncTCP

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

compilation error on linux #28

Closed erfan-khadem closed 5 years ago

erfan-khadem commented 5 years ago

Hi I have recently used this library on windows 10 together with ESPUI and I was quite happy with it But i had to move my whole work to linux(parrot OS) and after installing arduino 1.8.7 and esp32 package, I started with gui example. It didn't work. Here's the error message: Arduino: 1.8.7 (Linux), Board: "ESP32 Dev Module, Disabled, Default, QIO, 80MHz, 4MB (32Mb), 921600, None"

Build options changed, rebuilding all /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:27: error: field 'call' has incomplete type 'tcpip_api_call' struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: forward declaration of 'struct tcpip_api_call' struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_output(tcp_pcb)': /root/Arduino/libraries/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); ^ /root/Arduino/libraries/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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_write(tcp_pcb, const char, size_t, uint8_t)': /root/Arduino/libraries/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); ^ /root/Arduino/libraries/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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_recved(tcp_pcb, size_t)': /root/Arduino/libraries/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); ^ /root/Arduino/libraries/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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_connect(tcp_pcb, ip_addr_t, uint16_t, tcp_connected_fn)': /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:338:66: 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_connect_api, (struct tcpip_api_call)&msg); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:338:66: 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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_close(tcp_pcb)': /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:352: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_close_api, (struct tcpip_api_call)&msg); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:352: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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_abort(tcp_pcb)': /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:367: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_abort_api, (struct tcpip_api_call)&msg); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:367: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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'esp_err_t _tcp_bind(tcp_pcb, ip_addr_t, uint16_t)': /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:382:63: 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_bind_api, (struct tcpip_api_call)&msg); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:382:63: 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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: In function 'tcp_pcb _tcp_listen_with_backlog(tcp_pcb, uint8_t)': /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:397: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_listen_api, (struct tcpip_api_call)&msg); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:397: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)' /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:259:12: note: class type 'tcpip_api_call' is incomplete struct tcpip_api_call call; ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp: At global scope: /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:624:6: error: prototype for 'void AsyncClient::_dns_found(ip_addr_t)' does not match any in class 'AsyncClient' void AsyncClient::_dns_found(ip_addr_t ipaddr){ ^ In file included from /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:24:0: /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.h:84:10: error: candidate is: void AsyncClient::_dns_found(_ip_addr) void _dns_found(struct _ip_addr ipaddr); ^ /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:946:6: error: prototype for 'void AsyncClient::_s_dns_found(const char, ip_addr_t, void)' does not match any in class 'AsyncClient' void AsyncClient::_s_dns_found(const char name, ip_addr_t ipaddr, void arg){ ^ In file included from /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.cpp:24:0: /root/Arduino/libraries/AsyncTCP/src/AsyncTCP.h:164:17: error: candidate is: static void AsyncClient::_s_dns_found(const char, _ip_addr, void) static void _s_dns_found(const char name, struct _ip_addr ipaddr, void arg); ^ Multiple libraries were found for "WiFi.h" Used: /root/Arduino/hardware/espressif/esp32/libraries/WiFi Not used: /home/user/arduino-1.8.7/libraries/WiFi exit status 1 Error compiling for board ESP32 Dev Module. As a sidenote, since I had to do my work on a flash memory and persistent partition, I had no choice but doing EVERYTHING as a root user. Arduino ide cannot work without it(Serial usb access) and even arduino playground solution for that cannot help, since it is a live user

d0ct0rd-dalimo commented 5 years ago

Hi!

I have the same issue after ESP32 Arduino core and libs updating. You should downgrade WiFi lib for ESP32. It's so sad, because I want to connect to enterprise net, it works on latest version of ESP32 lib, AsyncTCP not:(

ccoenen commented 5 years ago

Same here on windows 10 with Arduino IDE 1.8.8 and esp32-arduino 1.0.1-rc2 It looks like a duplicate of #24

ccoenen commented 5 years ago

I can also confirm that the suggestion proposed in #24 compiles fine: Use the idf-update branch (now merged into master).

I haven't tested it beyond compiling, though!

jonathanleistiko commented 5 years ago

I'm on a mac running 10.10.5 with Arduino IDE 1.8.7, with AsyncTCP's idf-update branch installed, the esp32-arduino development release 1.0.1-rc2, and Adafruit HUZZAH32 Feather boards.

I no longer get the compile error, but I can't get painlessMesh v1.3.0 to work without crashing. If anyone on this thread (past or future) happens to get painlessMesh working in Arduino IDE, I'd love to hear about your success. :)

abeco commented 5 years ago

I must be missing something, I'm getting the same issue but I don't see any idf-update branch. the link @ccoenen posted leads nowhere

ccoenen commented 5 years ago

That branch has been merged into master: https://github.com/me-no-dev/AsyncTCP/commit/1656fed6fbd8bef515d3ad6caf1bf9d96ee3fe06 so the master should compile.

stale[bot] commented 5 years ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.