HADOOP-16263. Update BUILDING.txt with macOS native build instructions. Contributed by Siyao Meng.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
5740eea081
commit
4fecc2a95e
44
BUILDING.txt
44
BUILDING.txt
@ -380,6 +380,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
|
Building on Windows
|
||||||
|
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user