i am new to buck, but i am trying to getbuck running (because i wanted to start working with nuclide).
Well, wenn i try to run buck --version
it already gives me this output.
BUILD FAILED: Failed to read NDK version from /Users/mlostek/Library/Android/sdk/ndk-bundle
The content of the /Users/mlostek/Library/Android/sdk/ndk-bundle/source.properties
Pkg.Desc = Android NDK
Pkg.Revision = 12.1.2977051
And
echo $ANDROID_NDK
/Users/mlostek/Library/Android/sdk/ndk-bundle
By the way, i have installed the NDK via android studio, not via brew! And brew doctor
says it's all fine out there.
When i run brew install --HEAD buck
then the logfile of the buck build tells me the following (ant build runs fine)
2016-08-08 12:30:13 +0200
./bin/buck
build
buck
Not using buckd because watchman isn't installed.
[2016-08-08 12:30:20.756][error][command:null][tid:01][com.facebook.buck.cli.Main] Uncaught exception at top level
java.lang.IllegalStateException: /Users/mlostek/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc
at com.google.common.base.Preconditions.checkState(Preconditions.java:174)
at com.facebook.buck.android.NdkCxxPlatforms.getToolPath(NdkCxxPlatforms.java:577)
at com.facebook.buck.android.NdkCxxPlatforms.getCTool(NdkCxxPlatforms.java:626)
at com.facebook.buck.android.NdkCxxPlatforms.build(NdkCxxPlatforms.java:378)
at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:137)
at com.facebook.buck.android.NdkCxxPlatforms.getPlatforms(NdkCxxPlatforms.java:101)
at com.facebook.buck.rules.KnownBuildRuleTypes.createBuilder(KnownBuildRuleTypes.java:339)
at com.facebook.buck.rules.KnownBuildRuleTypes.createInstance(KnownBuildRuleTypes.java:233)
at com.facebook.buck.rules.KnownBuildRuleTypesFactory.create(KnownBuildRuleTypesFactory.java:48)
at com.facebook.buck.rules.Cell.<init>(Cell.java:115)
at com.facebook.buck.rules.Cell.createCell(Cell.java:159)
at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:829)
at com.facebook.buck.cli.Main.runMainThenExit(Main.java:610)
at com.facebook.buck.cli.Main.main(Main.java:1679)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.facebook.buck.cli.bootstrapper.ClassLoaderBootstrapper.main(ClassLoaderBootstrapper.java:62)
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 850db4ebf473738ffba8424065d62954d3c95dd1
Last commit: 35 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c6756fa5bfe3ed5881831398ae98cf6190cdd317
Core tap last commit: 10 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
GCC-4.2: build 0
Clang: 7.3 build 703
Git: 2.7.4 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_66, 1.6.0_65-b14-468
OS X: 10.11.6-x86_64
Xcode: 7.3.1
CLT: 7.3.1.0.1.1461711523
X11: N/A
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CFLAGS: -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin
CXXFLAGS: -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/include/darwin
SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
MACOSX_DEPLOYMENT_TARGET: 10.11
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/Homebrew/os/mac/pkgconfig/10.11
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin:/usr/local/Library/Homebrew/shims/super:/usr/local/opt/ant/bin:/usr/bin:/bin:/usr/sbin:/sbin
Any tips how to get buck running
This is almost definitely caused by the version of Buck available from Homebrew being too old. You can install the latest development version of Buck by running brew rm buck && brew install --HEAD buck
, it should fix the issue.
This GitHub issue is tracking updating Buck from Homebrew to a more recent version: https://github.com/facebook/buck/issues/835.