I am attempting to compile the peripheral_uart example targeting nrf52840dk, I've done quite a bit of work with zephyr but never with the nRF Connect SDK. I've encountered this on two different systems -- Manjaro and Ubuntu 22.04. After following the steps at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html and get the following error
dan@dan-MS-7C02:~/nrfbuild/nrf/samples/bluetooth/peripheral_uart$ west build -b nrf52840dk_nrf52840
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart
-- Using NCS Toolchain 2.0.0 for building. (/home/dan/ncs/toolchains/v2.0.0/cmake)
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Python3 (missing: Interpreter) (Required is exact version
"3.10")
Reason given by package:
Interpreter: Cannot run the interpreter "/home/dan/ncs/toolchains/v2.0.0/usr/local/bin/python3"
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindPython/Support.cmake:3180 (find_package_handle_standard_args)
/usr/share/cmake-3.22/Modules/FindPython3.cmake:490 (include)
/home/dan/nrfbuild/zephyr/cmake/modules/python.cmake:46 (find_package)
/home/dan/nrfbuild/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
/home/dan/nrfbuild/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
/home/dan/nrfbuild/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:76 (include_boilerplate)
CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart/build -S/home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart -GNinja -DBOARD=nrf52840dk_nrf52840
This looks like an issue linking against the SDKs dynamic libraries, but when I add them to the path it shows up as the wrong version (v3.8.2 vs 3.10)
dan@dan-MS-7C02:~/nrfbuild$ /home/dan/ncs/toolchains/v2.0.0/usr/local/bin/python3 /home/dan/ncs/toolchains/v2.0.0/usr/local/bin/python3: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory dan@dan-MS-7C02:~/nrfbuild$ LD_LIBRARY_PATH="/home/dan/ncs/toolchains/v2.0.0/usr/local/lib/" /home/dan/ncs/toolchains/v2.0.0/usr/local/bin/python3 Python 3.8.2 (default, Jun 2 2022, 09:16:00) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> dan@dan-MS-7C02:~/nrfbuild/nrf/samples/bluetooth/peripheral_uart$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dan/ncs/toolchains/v2.0.0/usr/local/lib/ west build -b nrf52840dk_nrf52840 -- west build: generating a build system Loading Zephyr default modules (Zephyr base (cached)). -- Application: /home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart -- Using NCS Toolchain 2.0.0 for building. (/home/dan/ncs/toolchains/v2.0.0/cmake) CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python3: Found unsuitable version "3.8.2", but required is exact version "3.10" (found /home/dan/ncs/toolchains/v2.0.0/usr/local/bin/python3, found components: Interpreter) Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:592 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindPython/Support.cmake:3180 (find_package_handle_standard_args) /usr/share/cmake-3.22/Modules/FindPython3.cmake:490 (include) /home/dan/nrfbuild/zephyr/cmake/modules/python.cmake:46 (find_package) /home/dan/nrfbuild/zephyr/cmake/modules/zephyr_default.cmake:121 (include) /home/dan/nrfbuild/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include) /home/dan/nrfbuild/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:81 (include_boilerplate) CMakeLists.txt:12 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart/build -S/home/dan/nrfbuild/nrf/samples/bluetooth/peripheral_uart -GNinja -DBOARD=nrf52840dk_nrf52840