我是buck的新手,但是我想让getbuck运行(因为我想开始使用nuclide)。
好吧,我们尝试运行buck --version
它已经给了我这个输出。
BUILD FAILED: Failed to read NDK version from /Users/mlostek/Library/Android/sdk/ndk-bundle
/Users/mlostek/Library/Android/sdk/ndk-bundle/source.properties
的内容Pkg.Desc = Android NDK
Pkg.Revision = 12.1.2977051
和
echo $ANDROID_NDK
/Users/mlostek/Library/Android/sdk/ndk-bundle
顺便说一句,我已经通过android studio而不是brew安装了NDK!
brew doctor
说,一切都很好。更新1
当我运行
brew install --HEAD buck
时,buck构建的日志文件会告诉我以下内容(ant构建可以正常运行)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
任何提示如何使降压运行
最佳答案
这几乎可以肯定是由Homebrew提供的Buck版本太旧造成的。您可以通过运行brew rm buck && brew install --HEAD buck
安装Buck的最新开发版本,它将解决此问题。
这个GitHub问题正在跟踪将Buck从Homebrew更新到最新版本:https://github.com/facebook/buck/issues/835。