This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF Connect SDK build error

Hi,

I am trying to configure the nRF Connect SDK on a Mac running Catalina for the first time and have followed the nRf Connect v3.6.0 - Getting Started Assistant.

I am getting errors when running "pip3 install -r zephyr/scripts/requirements.txt"

ERROR: nrfutil 5.2.0 has requirement click~=7.0, but you'll have click 6.7 which is incompatible.

ERROR: nrfutil 5.2.0 has requirement pyyaml~=4.2b1, but you'll have pyyaml 5.3.1 which is incompatible.

I am not sure how to resolve these dependency errors.

When I complete the SDK installation, it verifies each step with no errors but when I launch the SES (Nordic Edition) V5.10d with a nRF5340 PDK connected, I get a build error:

File "/Users/nick/Development/NordicConnectSDK/ncs/zephyr/scripts/dts/gen_defines.py", line 29, in <module>    import edtlib

File "/Users/nick/Development/NordicConnectSDK/ncs/zephyr/scripts/dts/edtlib.py", line 78, in <module>     import yaml

ModuleNotFoundError: No module named 'yaml'

The yaml module is in "/usr/local/lib/python3.7/site-packages/yaml" and the $PATH includes "/usr/local/lib/python3.7/site-packages".

I'm not sure if the pyyaml dependency error running the requirements script is related to this build error but I I would welcome any suggestions as I can't get past this point and build any of the sample apps.

Thanks!

Nick

Parents
  • Hi, Nick!

    Could you try to apply the fix Ian has proposed for a similar issue? I.e, comment out line 44 and 45 of the <ncs_root>/zephyr/cmake/python.cmake file like so:

    #find_package(Python3 ${PYTHON_MINIMUM_REQUIRED} REQUIRED ${PYTHON_EXACT})
    #set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})


    Please report back if this works for you or not!

    And thank you for reaching out. We are aware that the installation procedure for MacOS is not currently satisfactory.

    Best regards,
    Carl Richard

Reply
  • Hi, Nick!

    Could you try to apply the fix Ian has proposed for a similar issue? I.e, comment out line 44 and 45 of the <ncs_root>/zephyr/cmake/python.cmake file like so:

    #find_package(Python3 ${PYTHON_MINIMUM_REQUIRED} REQUIRED ${PYTHON_EXACT})
    #set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})


    Please report back if this works for you or not!

    And thank you for reaching out. We are aware that the installation procedure for MacOS is not currently satisfactory.

    Best regards,
    Carl Richard

Children
  • Carl,

    Thanks for the quick response - I’ve been trying to solve this for several days now as I’m trying to decide whether to port my code from SDK17 to NRF Connect…
    I tried commenting out the line and opening Blinky sample for the 5340 PDK board I have - it got further but still failed.
    I haven’t looked in any of the cmake logs mentioned yet. I get the same error with Hello World as well.  
  • the CMakeError.log referenced above contains:

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
    Build flags:
    Id flags:

    The output was:
    1
    clang: error: unknown argument '-meabi=5'; did you mean '-mabi=5'?

    Which doesn't seem terribly positive...

  • The output in CMakeError.txt is not always very informative as there is likely other issues leading to said CMakeError. 

    As a next step I would like you to close SES and call the following command:

    rm -r /Users/<your_username>/Library/Caches/zephyr

    This removes the CMake cache used by Zephyr, and will hopefully rid you of any inherited errors. In addition I want you to make sure that your environment is set correctly. Confirm the following environment variables are set "ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb" and "GNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb/" and that you've called "source <ncs_root>/zephyr/zephyr-env.sh".

    When all of this is done and confirmed. Try to build again. If it fails would also like you to try building from the command line. Go to a sample of choice <ncs_root>/zephyr/samples/hello_world for example and call the following command: 

    west build -b nrf5340pdk_nrf5340_cpuapp -p


    Please report the build logs back to me in both cases. Thanks!

    Best regards,
    Carl Richard

  • Case 1:

    Case 2:

    /Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world

    ratpro:hello_world nick$ west build -b nrf5340pdk_nrf5340_cpuapp -p

    -- west build: generating a build system

    Including boilerplate (Zephyr base): /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake

    -- Application: /Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world

    -- Zephyr version: 2.4.0 (/Users/nick/Development/NordicConnectSDK/ncs/zephyr)

    CMake Error at /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/west.cmake:14 (get_filename_component):

      get_filename_component called with incorrect number of arguments

    Call Stack (most recent call first):

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake:139 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:5 (find_package)

    CMake Error at /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/west.cmake:42 (if):

      if given arguments:

        "NOT" "(" "/usr/local/Cellar/[email protected]/3.7.9_2/Frameworks/Python.framework/Versions/3.7/bin/python3.7" "STREQUAL" ")"

      Unknown arguments specified

    Call Stack (most recent call first):

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/cmake/app/boilerplate.cmake:139 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/nick/Development/NordicConnectSDK/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:5 (find_package)

    -- Configuring incomplete, errors occurred!

    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.7 -B/Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world/build -S/Users/nick/Development/NordicConnectSDK/ncs/zephyr/samples/hello_world -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp

    ratpro:hello_world nick$ 

  • Hi again.

    I see that this did not make things much better. Could I purpose that you remove your current installation of the gnuarmemb and download the signed app package instead? That could at least rule out any problems with Catelina's strict security. Links for download and additional instructions can be found in the manual installation guide for NCS.

    The errors you get when building from the command line stems from my initial suggestion to comment out lines in python.cmake. My apologies for this. Could you uncomment them and then see which Python version is used by SES by going to Tools -> Options -> nRF Connect SDK options?

    Best regards,
    Carl Richard

Related