This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cannot configure the build system to include X509 functions

Hi,

I'm working on a simple app that is supposed to generate a CSR and have it signed by a web server.

The problem is, I can't even get zephyr to build the components I need, as there seems to be some sort of circular dependency in Kconfig.

When I want to select MBEDTLS_X509_CSR_WRITE_C via menuconfig, I am forced to enable MBEDTLS_X509_LIBRARY, NRF_SECURITY_ADVANCED, NRF_SECURITY_ANY_BACKEND, and NORDIC_SECURITY_BACKEND to even get there. But if I correctly understand the help text for that symbol, all these need to be disabled. Which would explain, that after saving that configuration (which prompts no complaints from west or ninja), the build will fail, and even re-configuration via `west build -t menuconfig` fails with the same error message, and the only way to recover is to restore .config from .config.old.

Is this really broken or am I just missing something?

Best Regards and thanks in advance,

Alex

  • no, actually it's a new one:

    ninja: error: 'spm/libspmsecureentries.a', needed by 'zephyr/zephyr_prebuilt.elf', missing and no known rule to make it
    FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /totally_secret_path/ncs/nrf9160-button/build
  • Which operating system and version are you using?

  • I'm using Linux Mint 20, with kernel 5.11.0. Also, I had to re-install my OS over the weekend, but I just successfully built my program without the mbedtls parts, just to make sure everything that worked before still works.

  • Not sure about that error, but a colleague solved a similar error recently by changing the name of the sample.

    Try changing the name of the sample folder to something you are certain is completely unique. Delete the build folder again for good measure.

  • I did what you suggested, but it didn't help. here's the linker error again:

    [270/279] Linking C executable zephyr/zephyr_prebuilt.elf
    FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map /path_to/src/project/ncs/csr-signing-demo/build/zephyr/zephyr_prebuilt.map
    : && ccache /opt/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc   zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr/zephyr_prebuilt.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  tfm/secure_fw/s_veneers.o  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_prebuilt.cmd  -Wl,-Map=/path_to/src/project/ncs/csr-signing-demo/build/zephyr/zephyr_prebuilt.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/newlib/liblib__libc__newlib.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/boards/boards/arm/nrf9160dk_nrf9160_ns/libboards__arm__nrf9160dk_nrf9160.a  zephyr/subsys/net/libsubsys__net.a  zephyr/subsys/net/ip/libsubsys__net__ip.a  zephyr/subsys/random/libsubsys__random.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/entropy/libdrivers__entropy.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/lib/nrf_modem_lib/lib..__nrf__lib__nrf_modem_lib.a  modules/nrf/lib/at_monitor/lib..__nrf__lib__at_monitor.a  modules/nrf/lib/at_cmd_parser/lib..__nrf__lib__at_cmd_parser.a  modules/nrf/lib/lte_link_control/lib..__nrf__lib__lte_link_control.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/lib/modem_key_mgmt/lib..__nrf__lib__modem_key_mgmt.a  modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a  modules/trusted-firmware-m/libtfm_api.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  /path_to/src/project/ncs/nrfxlib/nrf_modem/lib/cortex-m33/soft-float/libmodem.a  modules/nrfxlib/nrfxlib/nrf_security/src/zephyr/libmbedtls_zephyr.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -L"/opt/zephyr-sdk-0.13.1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/thumb/v8-m.main/nofp"  -L/path_to/src/project/ncs/csr-signing-demo/build/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  tfm/platform/libplatform_ns.a  tfm/app/libtfm_api_ns.a  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -no-pie  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  spm/libspmsecureentries.a  -lm  -Wl,-lc  -L"/opt/zephyr-sdk-0.13.1/arm-zephyr-eabi/arm-zephyr-eabi"/lib/thumb/v8-m.main/nofp  -Wl,-lgcc  -lc  -lgcc  -specs=nano.specs  modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/libmbedtls.a  modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/libmbedx509.a  -mcpu=cortex-m33  -mthumb  -mabi=aapcs  -mfp16-format=ieee  modules/nrfxlib/nrfxlib/nrf_security/src/libmbedcrypto.a  -lc  -L && cd /path_to/src/project/ncs/csr-signing-demo/build/zephyr && /usr/bin/cmake -E echo
    arm-zephyr-eabi-gcc: error: missing argument to '-L'
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /path_to/src/project/ncs/csr-signing-demo/build

Related