Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

mbedtls causing stubs from libnosys to get linked (IDFGH-13518) #14409

Closed
3 tasks done
KaeLL opened this issue Aug 20, 2024 · 3 comments
Closed
3 tasks done

mbedtls causing stubs from libnosys to get linked (IDFGH-13518) #14409

KaeLL opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@KaeLL
Copy link
Contributor

KaeLL commented Aug 20, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

git describe: v5.4-dev-2194-gd7ca8b94c8

ld output:
/idf/tools/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/mbedtls/mbedtls/library/libmbedx509.a(x509_crt.c.obj):(.literal.mbedtls_x509_crt_parse_path+0x28): warning: readdir is not implemented and will always fail
/idf/tools/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/mbedtls/mbedtls/library/libmbedx509.a(x509_crt.c.obj):(.literal.mbedtls_x509_crt_parse_path+0x2c): warning: closedir is not implemented and will always fail
/idf/tools/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/mbedtls/mbedtls/library/libmbedx509.a(x509_crt.c.obj):(.literal.mbedtls_x509_crt_parse_path+0x10): warning: opendir is not implemented and will always fail

@espressif-bot espressif-bot added the Status: Opened Issue is new label Aug 20, 2024
@github-actions github-actions bot changed the title mbedtls causing stubs from libnosys to get linked mbedtls causing stubs from libnosys to get linked (IDFGH-13518) Aug 20, 2024
@igrr
Copy link
Member

igrr commented Aug 21, 2024

Could you please attach your sdkconfig and the full build output? I suppose that VFS component is either not included in the build and/or CONFIG_VFS_SUPPORT_DIR is disabled. If that is the case, the warning makes sense to me: we do provide the stub but it will always return with an error code.

@KaeLL
Copy link
Contributor Author

KaeLL commented Aug 21, 2024

I suppose ... CONFIG_VFS_SUPPORT_DIR is disabled

You supposed correctly. Isn't there an argument to be made for the use of mbedtls y-select this config? Thanks, btw, and feel free to close the issue.

@igrr
Copy link
Member

igrr commented Aug 21, 2024

for the use of mbedtls y-select this config

There is no "enable switch" for mbedtls use, so it's not trivial. Also, mbedtls component is currently always linked into the app due to some dependencies from IDF itself, so if it enables VFS support, it won't be possible to disable VFS at all.

However, we can do it the other way around: make mbedtls MBEDTLS_FS_IO config option dependent on CONFIG_VFS_SUPPORT_IO && CONFIG_VFS_SUPPORT_DIR. This will disable compilation of the filesystem-related functions in mbedtls.

@AdityaHPatwardhan AdityaHPatwardhan self-assigned this Aug 22, 2024
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new labels Sep 2, 2024
espressif-bot pushed a commit that referenced this issue Oct 25, 2024
By default MBEDTLS_FS_IO option in mbedtls uses the filesystem supported
added by vfs component.
If the vfs support is disabled by user then mbedtls raises a warning
that the filesystem realted operation shall always fail
This commit fixes the behaviour by enabling respective depedency check for the
MBEDTLS_FS_IO option

Closes #14409
espressif-bot pushed a commit that referenced this issue Oct 25, 2024
By default MBEDTLS_FS_IO option in mbedtls uses the filesystem supported
added by vfs component.
If the vfs support is disabled by user then mbedtls raises a warning
that the filesystem realted operation shall always fail
This commit fixes the behaviour by enabling respective depedency check for the
MBEDTLS_FS_IO option

Closes #14409
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

4 participants