You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In my project I am using MQTT TLS so I have CONFIG_NET_SOCKETS_SOCKOPT_TLS=y. I am also using Zephyr ESP32 WiFi drivers which automatically select POSIX_API. Build fails when using both of this.
[237/293] Building C object modules/mbedtls/CMakeFiles/..__modules__crypto__mbedtls.dir/library/ssl_cli.c.obj
In file included from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform.h:68,
from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:56:
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c: In function 'ssl_generate_random':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:99:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration]
#define mbedtls_time time
^~~~
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:724:9: note: in expansion of macro 'mbedtls_time'
t = mbedtls_time( NULL );
^~~~~~~~~~~~
[239/293] Building C object modules/mbedtls/CMakeFiles/..__modules__crypto__mbedtls.dir/library/ssl_srv.c.obj
In file included from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform.h:68,
from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_srv.c:56:
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_srv.c: In function 'ssl_write_server_hello':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:99:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration]
#define mbedtls_time time
^~~~
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_srv.c:2479:9: note: in expansion of macro 'mbedtls_time'
t = mbedtls_time( NULL );
^~~~~~~~~~~~
[247/293] Building C object modules/mbedtls/CMakeFiles/..__modules__crypto__mbedtls.dir/library/x509.c.obj
In file included from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_util.h:61,
from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/cipher.h:64,
from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/oid.h:64,
from /home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/x509.c:67:
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/x509.c: In function 'x509_get_current_time':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:99:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration]
#define mbedtls_time time
^~~~
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/x509.c:935:10: note: in expansion of macro 'mbedtls_time'
tt = mbedtls_time( NULL );
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(ssl_cli.c.obj):(.literal.mbedtls_ssl_handshake_client_step+0x38): undefined reference to `time'
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(ssl_cli.c.obj): in function `ssl_generate_random':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:707: undefined reference to `time'
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(ssl_cli.c.obj): in function `ssl_parse_server_hello':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:1894: undefined reference to `time'
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(ssl_srv.c.obj): in function `ssl_parse_client_hello':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_srv.c:2011: undefined reference to `time'
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(ssl_srv.c.obj): in function `ssl_write_server_hello':
/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/ssl_srv.c:2483: undefined reference to `time'
/home/users/mbudimir/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: modules/mbedtls/lib..__modules__crypto__mbedtls.a(x509.c.obj):/home/users/mbudimir/zephyrproject/modules/crypto/mbedtls/library/x509.c:935: more undefined references to `time' follow
The text was updated successfully, but these errors were encountered:
There are conflicts if one selects CONFIG_POSIX_API and mbedtls. You can also try to unset CONFIG_NET_TCP_ISN_RFC6528=n if it helps (see commits 51beb28 and 6526b5b for details).
Describe the bug
In my project I am using MQTT TLS so I have
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
. I am also using Zephyr ESP32 WiFi drivers which automatically selectPOSIX_API
. Build fails when using both of this.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Zephyr project builds successfully
Logs and console output
The text was updated successfully, but these errors were encountered: