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

Project fails to build due to "Failed to find mbedtls, cannot build security libraries"

Hi, i am using ncs version 1.6.1. I am able to build the project on my windows computer. A few months ago i set up a CI build on a Linux machine which also worked. However i have come to use the Linux machine again to run a CI build and run into the error when trying to build "Failed to find mbedtls, cannot build security libraries". It still works on my windows machine. It should be noted that ncs is downloaded each time before a CI build. I have also tried setting the ARM_MBEDTLS_PATH variable to the correct mbedtls path but this also doesn't work. Any idea as to what config might be wrong?

Parents
  • Hello, 

    The technical support team will be out due to Easter Holiday until Tuesday April 19. We're sorry for the inconvenience. 


    How have you installed the nRF Connecct SDK on you Windows machine? Can you please provide full log output from when you receive the error in Linux?

    Thanks. 

    Kind regards,
    Øyvind

  • Hi, it was a while ago since i installed it on my windows machine, but i checked out ncs v1.6.1 from github and used west to install it. The output log from Linux is below.

    -- west build: generating a build system
    83Including boilerplate (Zephyr base): /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/cmake/app/boilerplate.cmake
    84CMake Deprecation Warning at /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
    85 The OLD behavior for policy CMP0079 will be removed from a future version
    86 of CMake.
    88 The cmake-policies(7) manual explains that the OLD behaviors of all
    89 policies are deprecated and that a policy should be set to OLD only under
    90 specific short-term circumstances. Projects should be ported to the NEW
    91 behavior and not rely on setting a policy to OLD.
    92Call Stack (most recent call first):
    93 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    94 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
    95 CMakeLists.txt:7 (find_package)
    98-- Application: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app
    102-- Zephyr version: 2.6.0-rc1 (/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr), build: v2.6.0-rc1-ncs1
    103-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
    104-- Found west (found suitable version "0.13.0", minimum required is "0.7.1")
    105-- Board: gplsns, Revision: 0.0.1
    106-- Cache files will be written to: /home/runner/.cache/zephyr
    107-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
    108-- Found toolchain: gnuarmemb (/home/runner/gnuarmemb)
    109-- Found BOARD.dts: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/boards/arm/gpls/gplsns.dts
    110gplsns.dts.pre.tmp:366.32-370.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
    112-- Generated zephyr.dts: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/zephyr/zephyr.dts
    113-- Generated devicetree_unfixed.h: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/zephyr/include/generated/devicetree_unfixed.h
    114-- Generated device_extern.h: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/zephyr/include/generated/device_extern.h
    116Parsing /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/Kconfig
    117warning: LOG_PRINTK_MAX_STRING_LENGTH (defined at subsys/logging/Kconfig.processing:13) was assigned
    118Loaded configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/boards/arm/gpls/gplsns_defconfig'
    119the value '256' but got the value ''. Check these unsatisfied dependencies: LOG_PRINTK (=n),
    120Merged configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/prj.conf'
    121(!LOG_IMMEDIATE || USERSPACE) (=n). See
    123and/or look up LOG_PRINTK_MAX_STRING_LENGTH in the menuconfig/guiconfig interface. The Application
    124Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
    125the manual might be helpful too.
    128warning: LOG_PROCESS_TRIGGER_THRESHOLD (defined at subsys/logging/Kconfig.processing:48) was
    129assigned the value '2' but got the value ''. Check these unsatisfied dependencies: (!LOG_IMMEDIATE)
    130(=n). See
    132and/or look up LOG_PROCESS_TRIGGER_THRESHOLD in the menuconfig/guiconfig interface. The Application
    133Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
    134the manual might be helpful too.
    137warning: LOG_PROCESS_THREAD (defined at subsys/logging/Kconfig.processing:58) was assigned the value
    138'y' but got the value 'n'. Check these unsatisfied dependencies: (!LOG_IMMEDIATE) (=n). See
    140LOG_PROCESS_THREAD in the menuconfig/guiconfig interface. The Application Development Primer,
    141Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    142helpful too.
    145warning: LOG_PROCESS_THREAD_SLEEP_MS (defined at subsys/logging/Kconfig.processing:70) was assigned
    146the value '100' but got the value ''. Check these unsatisfied dependencies: LOG_PROCESS_THREAD (=n),
    147(!LOG_IMMEDIATE) (=n). See
    149and/or look up LOG_PROCESS_THREAD_SLEEP_MS in the menuconfig/guiconfig interface. The Application
    150Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
    160the manual might be helpful too.
    163warning: LOG_PROCESS_THREAD_STACK_SIZE (defined at subsys/logging/Kconfig.processing:77) was
    164assigned the value '4096' but got the value ''. Check these unsatisfied dependencies:
    165LOG_PROCESS_THREAD (=n), (!LOG_IMMEDIATE) (=n). See
    167and/or look up LOG_PROCESS_THREAD_STACK_SIZE in the menuconfig/guiconfig interface. The Application
    168Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of
    169the manual might be helpful too.
    171Configuration saved to '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/zephyr/.config'
    172Kconfig header saved to '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/zephyr/include/generated/autoconf.h'
    173-- The C compiler identification is GNU 9.2.1
    174-- The CXX compiler identification is GNU 9.2.1
    175-- The ASM compiler identification is GNU
    176-- Found assembler: /home/runner/gnuarmemb/bin/arm-none-eabi-gcc
    177Changed board to secure gpls (NOT NS)
    179=== child image spm - begin ===
    180Including boilerplate (Zephyr base): /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/cmake/app/boilerplate.cmake
    181CMake Deprecation Warning at /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
    186 The OLD behavior for policy CMP0079 will be removed from a future version
    187 of CMake.
    189 The cmake-policies(7) manual explains that the OLD behaviors of all
    190 policies are deprecated and that a policy should be set to OLD only under
    191 specific short-term circumstances. Projects should be ported to the NEW
    192 behavior and not rely on setting a policy to OLD.
    193Call Stack (most recent call first):
    194 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    195 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
    196 CMakeLists.txt:8 (find_package)
    199-- Application: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/samples/spm
    200-- Zephyr version: 2.6.0-rc1 (/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr), build: v2.6.0-rc1-ncs1
    201-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
    202-- Found west (found suitable version "0.13.0", minimum required is "0.7.1")
    203-- Board: gpls, Revision: 0.0.1
    204-- Cache files will be written to: /home/runner/.cache/zephyr
    205-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
    206-- Found toolchain: gnuarmemb (/home/runner/gnuarmemb)
    207-- Found BOARD.dts: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/boards/arm/gpls/gpls.dts
    208-- Generated zephyr.dts: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/zephyr.dts
    209-- Generated devicetree_unfixed.h: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/include/generated/devicetree_unfixed.h
    213-- Generated device_extern.h: /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/include/generated/device_extern.h
    214Parsing /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/zephyr/Kconfig
    215Loaded configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/boards/arm/gpls/gpls_defconfig'
    216Merged configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/samples/spm/prj.conf'
    217Merged configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    218Merged configuration '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/misc/generated/extra_kconfig_options.conf'
    219Configuration saved to '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/.config'
    220Kconfig header saved to '/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/zephyr/include/generated/autoconf.h'
    221-- The C compiler identification is GNU 9.2.1
    222-- The CXX compiler identification is GNU 9.2.1
    223-- The ASM compiler identification is GNU
    224-- Found assembler: /home/runner/gnuarmemb/bin/arm-none-eabi-gcc
    225CMake Deprecation Warning at /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/modules/lib/civetweb/CMakeLists.txt:2 (cmake_minimum_required):
    226 Compatibility with CMake < 2.8.12 will be removed from a future version of
    227 CMake.
    229 Update the VERSION argument <min> value or use a ...<max> suffix to tell
    230 CMake that the project does not need compatibility with older versions.
    233Traceback (most recent call last):
    234 File "<string>", line 1, in <module>
    235 File "/home/runner/.local/lib/python3.8/site-packages/west/manifest.py", line 1151, in from_file
    236 topdir = Path(util.west_topdir(start=start, fall_back=False)).resolve()
    216 File "/home/runner/.local/lib/python3.8/site-packages/west/util.py", line 82, in west_topdir
    217 raise WestNotFound('Could not find a west workspace '
    218west.util.WestNotFound: Could not find a west workspace in this or any parent directory
    219CMake Error at /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrfxlib/common.cmake:58 (message):
    220 Failed to find mbedtls, cannot build security libraries
    221Call Stack (most recent call first):
    222 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrfxlib/nrf_security/CMakeLists.txt:158 (get_mbedtls_dir)
    225-- Configuring incomplete, errors occurred!
    226See also "/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/CMakeFiles/CMakeOutput.log".
    227See also "/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/spm/CMakeFiles/CMakeError.log".
    228CMake Error at /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/cmake/multi_image.cmake:292 (message):
    229 CMake generation for spm failed, aborting. Command: 1
    230Call Stack (most recent call first):
    231 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/cmake/multi_image.cmake:84 (add_child_image_from_source)
    232 /home/runner/work/gas-pressure-sensor/gas-pressure-sensor/ncs/nrf/samples/CMakeLists.txt:58 (add_child_image)
    235-- Configuring incomplete, errors occurred!
    236See also "/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/CMakeFiles/CMakeOutput.log".
    237See also "/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build/CMakeFiles/CMakeError.log".
    238FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app/build -S/home/runner/work/gas-pressure-sensor/gas-pressure-sensor/app -GNinja -DBOARD=gplsns -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  • Just to confirm, have you followed all steps in the Installing nRF Connect SDK manually?

    In you case 

    west init -m github.com/.../sdk-nrf --mr v1.6.1
    west update
    west zephyr-export

    and then installed dependencies?
Reply Children
No Data
Related