ソースを参照

HADOOP-16263. Update BUILDING.txt with macOS native build instructions. Contributed by Siyao Meng.

Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
(cherry picked from commit 4fecc2a95e2bd7a4f5ba0b930f1bd6be7227d1b5)
Siyao Meng 5 年 前
コミット
f4afeb6805
1 ファイル変更44 行追加0 行削除
  1. 44 0
      BUILDING.txt

+ 44 - 0
BUILDING.txt

@@ -352,6 +352,50 @@ export MAVEN_OPTS="-Xms256m -Xmx1536m"
 
 ----------------------------------------------------------------------------------
 
+Building on macOS (without Docker)
+
+----------------------------------------------------------------------------------
+Installing required dependencies for clean install of macOS 10.14:
+
+* Install Xcode Command Line Tools
+  $ xcode-select --install
+* Install Homebrew
+  $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+* Install OpenJDK 8
+  $ brew tap AdoptOpenJDK/openjdk
+  $ brew cask install adoptopenjdk8
+* Install maven and tools
+  $ brew install maven autoconf automake cmake wget
+* Install native libraries, only openssl is required to compile native code,
+you may optionally install zlib, lz4, etc.
+  $ brew install openssl
+* Protocol Buffers 2.5.0 (required), since 2.5.0 is no longer in Homebrew,
+we need to compile it from source
+  $ wget https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
+  $ tar zxvf protobuf-2.5.0.tar.gz
+  $ cd protobuf-2.5.0
+  $ ./configure
+  $ make
+  $ make check
+  $ make install
+  $ protoc --version
+
+Note that building Hadoop 3.1.1/3.1.2/3.2.0 native code from source is broken
+on macOS. For 3.1.1/3.1.2, you need to manually backport YARN-8622. For 3.2.0,
+you need to backport both YARN-8622 and YARN-9487 in order to build native code.
+
+----------------------------------------------------------------------------------
+Building command example:
+
+* Create binary distribution with native code but without documentation:
+  $ mvn package -Pdist,native -DskipTests -Dmaven.javadoc.skip \
+    -Dopenssl.prefix=/usr/local/opt/openssl
+
+Note that the command above manually specified the openssl library and include
+path. This is necessary at least for Homebrewed OpenSSL.
+
+----------------------------------------------------------------------------------
+
 Building on Windows
 
 ----------------------------------------------------------------------------------