Could not find a package configuration file provided by "Zephyr-sdk" on macOS

minimal_log_button_gpioe % west build -b custom_nrf52832
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe
-- Using NCS Toolchain 2.3.0 for building. (/opt/nordic/ncs/toolchains/v2.3.0/cmake)
-- Found Python3: /opt/nordic/ncs/toolchains/v2.3.0/bin/python3 (found suitable exact version "3.9.6") found components: Interpreter
-- Cache files will be written to: /Users/andyueng/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: custom_nrf52832
CMake Error at /opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/FindZephyr-sdk.cmake:63 (find_package):
Could not find a package configuration file provided by "Zephyr-sdk"
(requested version 0.15) with any of the following names:

Zephyr-sdkConfig.cmake
zephyr-sdk-config.cmake

Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set
"Zephyr-sdk_DIR" to a directory containing one of the above files. If
"Zephyr-sdk" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/dts.cmake:8 (find_package)
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/opt/homebrew/Cellar/west/1.0.0/libexec/bin/python3.11 -B/opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe/build -GNinja -DBOARD=custom_nrf52832 -S/opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe

  • is this ticket assigned to Nordic Support Team?

    still looking forward to the resolution of the CMake Error

    please LMK if you need additional information and whether creating a new ticket is preferred...

    thank you

  • Hi,

    I am having same error running z-test on provided Nordic test samples. 

    Installed  nRF SDK v2.00, using nRF-Connect & Tool chain manager.

    I have tried setting:

    - Set ZEPHYR_BASE to the location of the zephyr repository:
      zephyr-env.cmd

    - Set Zephyr SDK Install directory:
      set ZEPHYR_SDK_INSTALL_DIR = C:\ncs\toolchains\v2.0.0\
    - Set Zephyr Tool Chain:
      set ZEPHYR_TOOL_CHAIN_VARIANT = zephyr

    Additionally:

    To avoid reported CMake error during z-test:
    - Export Zephyr CMake package allows CMake to automatically find a Zephyr base.
     cmake -P C:\ncs\v2.0.0\zephyr\share\zephyr-package\cmake\zephyr_export.cmake
      - Consequently Added to the user package registry in:
        HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr

    However the same CMake error persists (as in previous post).

    BTW those files do not seem to be in my install directory, namely:

    zephyr-sdk-config.cmake (or similar).

    Can Nordic support suggest a solution?

    I have also posted on Discord (Zephyr support) but no replies received.

    Thanking you in advance.

Related