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

  • I actually fixed the dependency issue with 'click' and 'pyyaml' but still have the 'yaml module not found' issue.  

    I wrote a simple python script that imports the yaml library and this runs from the command line which would imply that PATHs are OK so I'm not clear why SES is having issues....

    Anyone got any pointers for what is probably a simple environment issue?

  • 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

  • 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

Related