espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.34k stars 1.57k forks source link

Cannot build without enabling unneeded pthreads and espressif VFS (GIT8266O-423) #853

Open doragasu opened 4 years ago

doragasu commented 4 years ago

Environment

Problem Description

I have updated my project from release/v3.2 to a clean clone of release/v3.3. When linking, now I get unresolved externals to pthread stuff and to espressif VFS related stuff. Enabling these two components allows linking, but image size increases a lot. As I am using neither pthreads nor espressif VFS, I do not want to build them. I suppose this should be possible by just disabling them, and enabling CONFIG_LWIP_USE_ONLY_LWIP_SELECT in lwIP options, but dot does not work.

These are the errors generated during the link stage:


Toolchain version: crosstool-ng-1.22.0-100-ge567ec7
Compiler version: 5.2.0
Python requirements from /home/jalon/src/esp8266/ESP8266_RTOS_SDK/requirements.txt are satisfied.
App "mw-fw-rtos" version: v1.1-2-g98c1e07-dirty
LD build/mw-fw-rtos.elf
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o):(.literal.sys_init+0x14): undefined reference to `pthread_key_create'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o):(.literal.sys_thread_sem_init+0x4): undefined reference to `pthread_setspecific'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o):(.literal.sys_thread_sem_get+0x0): undefined reference to `pthread_getspecific'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o): In function `sys_init':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_arch.c:443: undefined reference to `pthread_key_create'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o): In function `sys_thread_sem_init':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_arch.c:487: undefined reference to `pthread_setspecific'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(sys_arch.o): In function `sys_thread_sem_get':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/lwip/port/esp8266/freertos/sys_arch.c:450: undefined reference to `pthread_getspecific'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(vfs_lwip.o):(.literal.esp_vfs_lwip_sockets_register+0x2c): undefined reference to `esp_vfs_register_fd_range'
/home/jalon/src/github/mw-fw-rtos/build/lwip/liblwip.a(vfs_lwip.o): In function `esp_vfs_lwip_sockets_register':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/lwip/port/esp8266/vfs_lwip.c:73: undefined reference to `esp_vfs_register_fd_range'
/home/jalon/src/github/mw-fw-rtos/build/main/libmain.a(http.o):(.literal.MwFsmSockTsk+0x10): undefined reference to `select'
/home/jalon/src/github/mw-fw-rtos/build/main/libmain.a(http.o): In function `MwFsmSockTsk':
/home/jalon/src/github/mw-fw-rtos/main/megawifi.c:701: undefined reference to `select'
/home/jalon/src/github/mw-fw-rtos/build/tcp_transport/libtcp_transport.a(transport_ssl.o):(.literal.ssl_poll_write+0x10): undefined reference to `select'
/home/jalon/src/github/mw-fw-rtos/build/tcp_transport/libtcp_transport.a(transport_ssl.o): In function `ssl_poll_write':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/tcp_transport/transport_ssl.c:265: undefined reference to `select'
/home/jalon/src/github/mw-fw-rtos/build/tcp_transport/libtcp_transport.a(transport_ssl.o): In function `ssl_poll_read':
/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/tcp_transport/transport_ssl.c:265: undefined reference to `select'
/home/jalon/src/github/mw-fw-rtos/build/tcp_transport/libtcp_transport.a(transport_tcp.o):/home/jalon/src/esp8266/ESP8266_RTOS_SDK/components/tcp_transport/transport_tcp.c:151: more undefined references to `select' follow
collect2: error: ld returned 1 exit status
make: *** [/home/jalon/src/esp8266/ESP8266_RTOS_SDK/make/project.mk:510: /home/jalon/src/github/mw-fw-rtos/build/mw-fw-rtos.elf] Error 1```

The project I am building is this: https://github.com/doragasu/mw-fw-rtos
mriksman commented 4 years ago

849