Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Instructions for submodule initialization do not recurse submodules #9900

Open
danielbernard opened this issue Jan 13, 2025 · 0 comments
Open

Comments

@danielbernard
Copy link

Summary

Current instructions assume that only the top-level repository has submodules.
Since the submodule tf-psa-crypto includes framework as a submodule, submodules need to be initialized/updated recursively.

System information

Mbed TLS version (number or commit id): 67ba14c
Operating system and version: N/A
Configuration (if not default, please attach mbedtls_config.h): N/A
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): N/A
Additional environment information: N/A

Expected behavior

After initializing submodules from the top-level, make rules should compile the build.

Actual behavior

Nested submodules are not initialized with the current instructions, and warnings from the top-level build don't catch that the sub-submodule is missing.

$ make
make[1]: Entering directory '/home/code/mbedtls/library'
  Gen   ../tf-psa-crypto/core/psa_crypto_driver_wrappers.h ../tf-psa-crypto/core/psa_crypto_driver_wrappers_no_static.c
Traceback (most recent call last):
  File "/home/code/mbedtls/library/../tf-psa-crypto/scripts/generate_driver_wrappers.py", line 22, in <module>
    from mbedtls_framework import build_tree
ModuleNotFoundError: No module named 'mbedtls_framework'
make[1]: *** [Makefile:397: ../tf-psa-crypto/core/psa_crypto_driver_wrappers.h] Error 1
make[1]: Leaving directory '/home/code/mbedtls/library'
make: *** [Makefile:41: lib] Error 2

Steps to reproduce

Perform a clean clone without submodule initialization and per the guide perform a non-recursive submodule update/initialization.

Additional information

Propose updating instructions and warnings to reference recursive submodule initialization:
git submodule update --init --recursive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant