xcbuild: command not found on macOS despite successful install
arielelkin opened this issue · comments
Ariel Elkin commented
macOS v10.13.3
ariel:~$ git clone --depth=1 https://github.com/facebook/xcbuild
Cloning into 'xcbuild'...
remote: Counting objects: 1253, done.
remote: Compressing objects: 100% (1048/1048), done.
remote: Total 1253 (delta 542), reused 393 (delta 162), pack-reused 0
Receiving objects: 100% (1253/1253), 727.39 KiB | 1.95 MiB/s, done.
Resolving deltas: 100% (542/542), done.
ariel:~$ cd xcbuild
ariel:xcbuild$ git submodule update --init
Submodule 'ThirdParty/googletest' (https://github.com/google/googletest.git) registered for path 'ThirdParty/googletest'
Submodule 'ThirdParty/linenoise' (https://github.com/antirez/linenoise.git) registered for path 'ThirdParty/linenoise'
Cloning into '/Users/ariel/xcbuild/ThirdParty/googletest'...
Cloning into '/Users/ariel/xcbuild/ThirdParty/linenoise'...
Submodule path 'ThirdParty/googletest': checked out 'a2b8a8e07628e5fd60644b6dd99c1b5e7d7f1f47'
Submodule path 'ThirdParty/linenoise': checked out 'c894b9e59f02203dbe4e2be657572cf88c4230c3'
ariel:xcbuild$ make
mkdir -p build
cmake -Bbuild -H. -G Ninja -DCMAKE_INSTALL_PREFIX=
make: cmake: No such file or directory
make: *** [all] Error 1
ariel:xcbuild$ cmake
-bash: cmake: command not found
ariel:xcbuild$ brew install cmake
==> Downloading https://homebrew.bintray.com/bottles/cmake-3.10.2.high_sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/7a/7ad98f403e21c76cfd0789d83acffce92cb29aad3d2ea9b4fe8b2c05de8f33b9?__g
######################################################################## 100.0%
==> Pouring cmake-3.10.2.high_sierra.bottle.tar.gz
==> Caveats
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/cmake
==> Summary
🍺 /usr/local/Cellar/cmake/3.10.2: 2,334 files, 32.4MB
ariel:xcbuild$ make
mkdir -p build
cmake -Bbuild -H. -G Ninja -DCMAKE_INSTALL_PREFIX=
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/Users/ariel/xcbuild/build/CMakeFiles/CMakeOutput.log".
make: *** [all] Error 1
ariel:xcbuild$ brew install ninja
==> Downloading https://homebrew.bintray.com/bottles/ninja-1.8.2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ninja-1.8.2.high_sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/ninja/1.8.2: 7 files, 273.2KB
ariel:xcbuild$ make
mkdir -p build
cmake -Bbuild -H. -G Ninja -DCMAKE_INSTALL_PREFIX=
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/local/bin/python (found version "3.6.4")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ariel/xcbuild/build
ninja -C build
ninja: Entering directory `build'
[28/536] Linking CXX shared library libgtest.dylib
ld: warning: directory not found for option '-L/Users/ariel/xcbuild/build/ThirdParty/googletest/googletest/src'
[30/536] Linking CXX shared library libgtest_main.dylib
ld: warning: directory not found for option '-L/Users/ariel/xcbuild/build/ThirdParty/googletest/googletest/src'
[536/536] Linking CXX executable xcbuild
ariel:xcbuild$ xcbuild
-bash: xcbuild: command not found
Have tried restarting. xcbuild
still can't be found on terminal.
Any thoughts?
Ariel Elkin commented
Just took a closer look at docs,
build output will be in the build directory. Run xcbuild with
./build/xcbuild
Sorry!