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

NCS No such file or directory: 'git'

Hello,

I have both an installation of NCS v1.5.0 from Toolchain Manager (TM) and from the Getting Started Assistant (GSA) on Macbook running macOS High Sierra. The TM SDK when building from the terminal is working fine but when I try to open a standard terminal and go to my GSA install I am getting an error "No such file or directory: 'git''. This error does not occur if I include the option to not use the Toolchain that was installed by the TM. Can someone help me understand why this is the case?

Build fails with west build -b nrf9160dk_nrf9160ns -p

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Akashs-MacBook-Air:asset_tracker akash$ west build -b nrf9160dk_nrf9160ns -p
-- west build: making build dir /Users/akash/Documents/ncs/nrf/applications/asset_tracker/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /Users/akash/Documents/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/akash/Documents/ncs/nrf/applications/asset_tracker
-- Using NCS Toolchain 1.5.0 for building. (/opt/nordic/ncs/v1.5.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (/Users/akash/Documents/ncs/zephyr)
-- Found Python3: /opt/nordic/ncs/v1.5.0/toolchain/bin/python3 (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
CMake Error at /Users/akash/Documents/ncs/zephyr/cmake/zephyr_module.cmake:61 (message):
Traceback (most recent call last):
File "/Users/akash/Documents/ncs/zephyr/scripts/zephyr_module.py", line 378, in <module>
main()
File "/Users/akash/Documents/ncs/zephyr/scripts/zephyr_module.py", line 283, in main
manifest = Manifest.from_file()
File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1084, in from_file
return Manifest(**kwargs)
File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1273, in __init__
self._load(source_data['manifest'],
File "/opt/nordic/ncs/v1.5.0/toolchain/Cellar/python@3.8/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/west/manifest.py", line 1527, in _load
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Build succeeds with west build -b nrf9160dk_nrf9160ns -p -- -DNCS_TOOLCHAIN_VERSION=NONE

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Akashs-MacBook-Air:asset_tracker akash$ west build -b nrf9160dk_nrf9160ns -p -- -DNCS_TOOLCHAIN_VERSION=NONE
-- west build: making build dir /Users/akash/Documents/ncs/nrf/applications/asset_tracker/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /Users/akash/Documents/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/akash/Documents/ncs/nrf/applications/asset_tracker
-- Zephyr version: 2.4.99 (/Users/akash/Documents/ncs/zephyr)
-- Found Python3: /usr/local/bin/python3.9 (found suitable exact version "3.9.1") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: nrf9160dk_nrf9160ns, Revision: 0.7.0
-- Cache files will be written to: /Users/akash/Library/Caches/zephyr
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local/opt/gnuarmemb)
-- Found BOARD.dts: /Users/akash/Documents/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns.dts
nrf9160dk_nrf9160ns.dts.pre.tmp:366.32-370.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
nrf9160dk_nrf9160ns.dts.pre.tmp:59.42-71.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
nrf9160dk_nrf9160ns.dts.pre.tmp:311.19-317.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
-- Generated zephyr.dts: /Users/akash/Documents/ncs/nrf/applications/asset_tracker/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/akash/Documents/ncs/nrf/applications/asset_tracker/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /Users/akash/Documents/ncs/nrf/applications/asset_tracker/build/zephyr/include/generated/device_extern.h
Parsing /Users/akash/Documents/ncs/nrf/applications/asset_tracker/Kconfig
Loaded configuration '/Users/akash/Documents/ncs/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160ns_defconfig'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

git and env

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Akashs-MacBook-Air:asset_tracker akash$ git --version
git version 2.17.2 (Apple Git-113)
Akashs-MacBook-Air:asset_tracker akash$ env
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
NRFJPROG_LIBRARY_PATH=/Applications/nRF Connect.app/Contents/Frameworks/nrfjprog
TERM=xterm-256color
GNUARMEMB_TOOLCHAIN_PATH=/usr/local/opt/gnuarmemb/
TMPDIR=/var/folders/vw/q4pwtsvn5dx8_y5qdyp0jz880000gn/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.EhxEsdEA5U/Render
TERM_PROGRAM_VERSION=404.1
TERM_SESSION_ID=4B4DFE7A-F4B6-4A1A-B6D7-35BD19B06B7E
USER=akash
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.s1YC0WbNzJ/Listeners
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
PWD=/Users/akash/Documents/ncs/nrf/applications/asset_tracker
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
HOME=/Users/akash
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Regards,

Akash