Skip to content

Building MBEDTLS example on Windows has issues #91032

Open
@RichardSWheatley

Description

@RichardSWheatley

Describe the bug

While building the MBEDTLS test on Windows, the build fails.
Same example on Linux does not fail.

Using main from Zephyr and all relevant modules are at manifest-rev

Regression

  • This is a regression.

Steps to reproduce

  • west update
  • delete all files in build folder
  • run west build -p -b apollo510_evb ./tests/crypto/mbedtls

Relevant log output

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/code/Zephyr/zephyrproject/zephyr/tests/crypto/mbedtls
-- CMake version: 3.27.1
-- Found Python3: C:/code/Zephyr/zephyrproject/.venv/Scripts/python.exe (found suitable version "3.11.9", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: C:/code/Zephyr/zephyrproject/zephyr/.cache
-- Zephyr version: 4.1.99 (C:/code/Zephyr/zephyrproject/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
-- Board: apollo510_evb, qualifiers: apollo510
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.17.0 (C:/Users/richard.wheatley/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (C:/Users/richard.wheatley/zephyr-sdk-0.17.0)
-- Found Dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6") 
-- Found BOARD.dts: C:/code/Zephyr/zephyrproject/zephyr/boards/ambiq/apollo510_evb/apollo510_evb.dts
-- Generated zephyr.dts: C:/code/Zephyr/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: C:/code/Zephyr/zephyrproject/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: C:/code/Zephyr/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h

warning: MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS (defined at lib/libc\minimal/Kconfig:6) was assigned
the value 'y' but got the value 'n'. Check these unsatisfied dependencies: MINIMAL_LIBC (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS and/or
look up MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS in the menuconfig/guiconfig interface. The Application
Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
the manual might be helpful too.


warning: MINIMAL_LIBC_RAND (defined at lib/libc\minimal/Kconfig:30) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: MINIMAL_LIBC (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MINIMAL_LIBC_RAND and/or look up
MINIMAL_LIBC_RAND in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: The choice symbol MINIMAL_LIBC (defined at lib/libc/Kconfig:77) was selected (set =y), but
PICOLIBC (defined at lib/libc/Kconfig:90) ended up as the choice selection. See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MINIMAL_LIBC and/or look up MINIMAL_LIBC in
the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

Parsing C:/code/Zephyr/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/code/Zephyr/zephyrproject/zephyr/boards/ambiq/apollo510_evb/apollo510_evb_defconfig'
Merged configuration 'C:/code/Zephyr/zephyrproject/zephyr/tests/crypto/mbedtls/prj.conf'
Configuration saved to 'C:/code/Zephyr/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to 'C:/code/Zephyr/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/users/richard.wheatley/zephyr-sdk-0.17.0/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/richard.wheatley/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Warning at C:/code/Zephyr/zephyrproject/zephyr/subsys/random/CMakeLists.txt:12 (message):
  

      Warning: CONFIG_TIMER_RANDOM_GENERATOR and CONFIG_TEST_CSPRNG_GENERATOR are
      not truly random generators. This capability is not secure and it is
      provided for testing purposes only. Use it carefully.


-- Using ccache: C:/Strawberry/c/bin/ccache.exe
-- Found gen_kobject_list: C:/code/Zephyr/zephyrproject/zephyr/scripts/build/gen_kobject_list.py
-- Configuring done (98.6s)
-- Generating done (0.6s)
-- Build files have been written to: C:/code/Zephyr/zephyrproject/zephyr/build
←[92m-- west build: building application
[2/296] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.1.99 (C:/code/Zephyr/zephyrproject/zephyr), build: v4.1.0-rc2-5501-g2c851d998caa
[153/296] Linking C static library modules\mbedtls\libmbedTLSBase.a
FAILED: modules/mbedtls/libmbedTLSBase.a
cmd.exe /C "cd . && ccache "C:\Program Files\CMake\bin\cmake.exe" -E rm -f modules\mbedtls\libmbedTLSBase.a && ccache C:\Users\richard.wheatley\zephyr-sdk-0.17.0\arm-zephyr-eabi\bin\arm-zephyr-eabi-ar.exe qc modules\mbedtls\libmbedTLSBase.a  @CMakeFiles\mbedTLSBase.rsp && ccache C:\Users\richard.wheatley\zephyr-sdk-0.17.0\arm-zephyr-eabi\bin\arm-zephyr-eabi-ranlib.exe modules\mbedtls\libmbedTLSBase.a && cd ."
C:\Users\richard.wheatley\zephyr-sdk-0.17.0\arm-zephyr-eabi\bin\arm-zephyr-eabi-ar.exe: modules/mbedtls/CMakeFiles/mbedTLSBase.dir/C_/code/Zephyr/zephyrproject/modules/crypto/mbedtls/library/aes.c.obj: No such file or directory
[162/296] Linking C static library modules\mbedtls\libmbedTLSX509.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\code\Zephyr\zephyrproject\zephyr\build'

Impact

Showstopper – Prevents release or major functionality; system unusable.

Environment

Edition Windows 11 Business
Version 24H2
Installed on ‎2/‎25/‎2025
OS build 26100.4061
Serial number PF30QJ60
Experience Windows Feature Experience Pack 1000.26100.84.0

Additional Context

Processor 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz 2.80 GHz
Installed RAM 16.0 GB (15.7 GB usable)
System type 64-bit operating system, x64-based processor

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions