FATAL ERROR: CMake is not installed or cannot be found; cannot build

Hi,

Trying to run nRF5340 audio kit (as dev_gateway/build_debug) and get the following error 

C:\v2.0.0\nrf\applications\nrf5340_audio\tools\buildprog>python buildprog.py -c app -b debug -d gateway
+------------+----------+---------+--------------+---------------------+---------------------+
|    snr     | snr conn |  device | only reboot  | core app programmed | core net programmed |
+------------+----------+---------+--------------+---------------------+---------------------+
|    1000    |  ←[33mFalse←[0m   | headset | Not selected |     Not selected    |     Not selected    |
| 1050152930 |   ←[32mTrue←[0m   | gateway | Not selected |     Selected TBD    |     Not selected    |
|    1000    |  ←[33mFalse←[0m   | headset | Not selected |     Not selected    |     Not selected    |
+------------+----------+---------+--------------+---------------------+---------------------+
Invoking build step
Run: west build ../.. -b nrf5340_audio_dk_nrf5340_cpuapp -d ../../build/dev_gateway/build_debug
-- west build: generating a build system
FATAL ERROR: CMake is not installed or cannot be found; cannot build.
Traceback (most recent call last):
  File "buildprog.py", line 319, in <module>
    __main()
  File "buildprog.py", line 302, in __main
    __build_module(build_cfg)
  File "buildprog.py", line 130, in __build_module
    raise Exception("cmake error: " + str(ret_val))
Exception: cmake error: 1

C:\v2.0.0\nrf\applications\nrf5340_audio\tools\buildprog>

Tnx,

Eran.

Parents
  • Hi Eran,

    Do you get this error when building other samples or applications as well, or only with the nRF5340 Audio application?

    Please try updating the SDK and toolchain in Toolchain Manager:

    Best regards,

    Marte

  • HI Marte,

    Yes, I'm able to build samples or application under SDK v2.0.0 with different DK's without any issue. 

    I run the UPDATE SDK & toolchain , still the same problem.

    Tnx,

    Eran.

  • Hi Eran,

    You are missing CMake in your path. Opening the terminal from Toolchain Manager should automatically set the environment variables correctly, but I see from your other case that you are unable to open both bash and cmd from there, so until that issue is fixed and you have to open terminals outside of the Toolchain Manager you must set the environment variables in your systems environment variables.

    Since you installed the SDK using Toolchain Manager the toolchain, and thus CMake, will be in a directory called toolchains, which is at the same level as your v2.0.0 directory. Based on your logs it seems to be directly under your C:\ directory, so adding the following to the path in your systems environment variables should fix the issue:

    C:\toolchains\v2.0.0\opt\bin

    Remember that you will have to open a new terminal window for changes in environment variables to be set. You can verify whether CMake is in your path by opening a new terminal and writing "where cmake". This should show the location of cmake.exe.

    Best regards,

    Marte

Reply
  • Hi Eran,

    You are missing CMake in your path. Opening the terminal from Toolchain Manager should automatically set the environment variables correctly, but I see from your other case that you are unable to open both bash and cmd from there, so until that issue is fixed and you have to open terminals outside of the Toolchain Manager you must set the environment variables in your systems environment variables.

    Since you installed the SDK using Toolchain Manager the toolchain, and thus CMake, will be in a directory called toolchains, which is at the same level as your v2.0.0 directory. Based on your logs it seems to be directly under your C:\ directory, so adding the following to the path in your systems environment variables should fix the issue:

    C:\toolchains\v2.0.0\opt\bin

    Remember that you will have to open a new terminal window for changes in environment variables to be set. You can verify whether CMake is in your path by opening a new terminal and writing "where cmake". This should show the location of cmake.exe.

    Best regards,

    Marte

Children
No Data
Related