Can no longer build using crypto service when moving to 1.7.0. error: No SOURCES given to Zephyr library: drivers__entropy

Until today - we have been using nRFConnect 1.5.1.  We are trying to upgrade the SDK/Zephyr to nRFConnect 1.7.0.

My existing projects that use crypto interfaces no longer build using 1.7.0 because of the following error.  Note: We build are projects directly at the command using cmake/west/ninja and not through the Segger Embedded Studio.

CMake Error at C:/compilers/nordic-nrfconnect/zephyr/cmake/extensions.cmake:473 (target_sources):
Cannot specify sources for target
"..__..__..__nordic__v1.7.0__nrf__drivers__entropy" which is not built by
this project.
Call Stack (most recent call first):
C:/compilers/nordic-nrfconnect/zephyr/cmake/extensions.cmake:1387 (zephyr_library_sources)
../../../drivers/entropy/CMakeLists.txt:7 (zephyr_library_sources_ifdef)


CMake Warning (dev) at C:/compilers/nordic-nrfconnect/nrfxlib/nrf_security/cmake/extensions.cmake:652:
Syntax Warning in cmake code at column 32

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
C:/compilers/nordic-nrfconnect/nrfxlib/nrf_security/CMakeLists.txt:185 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at C:/compilers/nordic-nrfconnect/zephyr/CMakeLists.txt:718 (message):
No SOURCES given to Zephyr library: drivers__entropy

Excluding target from build.


-- Configuring incomplete, errors occurred!
See also "C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/CMakeFiles/CMakeOutput.log".
See also "C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/CMakeFiles/CMakeError.log".

To rule any issue with 'my stuff' - I have tried building the following example project: v1.7.0\nrf\samples\crypto\persistent_key_usage using Segger Embedded studio.  This does work.  However when trying to build the same example from the command line.  I get the same error that I get on my project.  Below is error when attempting to build the example project directly at the command line.  The listing also contains the prj.conf file.

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>ls
CMakeLists.txt README.rst boards prj.conf sample.yaml src

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>cmake -GNinja -S . -B _build -DBOARD=nrf5340dk_nrf5340_cpuapp

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>mkdir _build

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>cmake -GNinja -S . -B _build -DBOARD=nrf5340dk_nrf5340_cpuapp
Including boilerplate (Zephyr base): C:/compilers/nordic-nrfconnect/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage
-- Using NCS Toolchain 1.7.0 for building. (C:/compilers/nordic-nrfconnect/toolchain/cmake)
-- Zephyr version: 2.6.99 (C:/compilers/nordic-nrfconnect/zephyr), build: v2.6.99-ncs1
-- Found Python3: C:/compilers/nordic-nrfconnect/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: C:/compilers/nordic-nrfconnect/zephyr/.cache
-- Found dtc: C:/compilers/nordic-nrfconnect/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/compilers/nordic-nrfconnect/toolchain/opt)
-- Found BOARD.dts: C:/compilers/nordic-nrfconnect/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/dts.cmake
Parsing C:/compilers/nordic-nrfconnect/zephyr/Kconfig
Loaded configuration 'C:/compilers/nordic-nrfconnect/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/prj.conf'
Merged configuration 'C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/boards/nrf5340dk_nrf5340_cpuapp.conf'
Configuration saved to 'C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/.config'
Kconfig header saved to 'C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/compilers/nordic-nrfconnect/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Error at C:/compilers/nordic-nrfconnect/zephyr/cmake/extensions.cmake:473 (target_sources):
Cannot specify sources for target
"..__..__..__nordic__v1.7.0__nrf__drivers__entropy" which is not built by
this project.
Call Stack (most recent call first):
C:/compilers/nordic-nrfconnect/zephyr/cmake/extensions.cmake:1387 (zephyr_library_sources)
../../../drivers/entropy/CMakeLists.txt:7 (zephyr_library_sources_ifdef)


CMake Warning (dev) at C:/compilers/nordic-nrfconnect/nrfxlib/nrf_security/cmake/extensions.cmake:652:
Syntax Warning in cmake code at column 32

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
C:/compilers/nordic-nrfconnect/nrfxlib/nrf_security/CMakeLists.txt:185 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning at C:/compilers/nordic-nrfconnect/zephyr/CMakeLists.txt:718 (message):
No SOURCES given to Zephyr library: drivers__entropy

Excluding target from build.


-- Configuring incomplete, errors occurred!
See also "C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/CMakeFiles/CMakeOutput.log".
See also "C:/nordic/v1.7.0/nrf/samples/crypto/persistent_key_usage/_build/CMakeFiles/CMakeError.log".

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>cat prj.conf
# The Zephyr CMSIS emulation assumes that ticks are ms, currently
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096

# Enable loging using RTT and UART
CONFIG_CONSOLE=y
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BUFFER_SIZE=15360
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=15360

# Enable nordic security backend and PSA APIs
CONFIG_MBEDTLS_LIBRARY_NRF_SECURITY=y
CONFIG_NORDIC_SECURITY_BACKEND=y
CONFIG_MBEDTLS_PSA_CRYPTO_C=y

# Enable persistent storage APIs
CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C=y
CONFIG_PSA_NATIVE_ITS=y

CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=8192

C:\nordic\v1.7.0\nrf\samples\crypto\persistent_key_usage>

Related