Files
rippled/Builds/XCode
Vinnie Falco d8dea963fa Squashed 'src/beast/' changes from 1b9a714..6d5547a
6d5547a Set version to 1.0.0-b34
6fab138 Fix and tidy up CMake build scripts:
ccefa54 Set version to 1.0.0-b33
32afe41 Set internal state correctly when writing frames:
fe3e20b Add write_frames unit test
578dcd0 Add decorator unit test
aaa3733 Use fwrite return value in file_body
df66165 Require Visual Studio 2015 Update 3 or later
b8e5a21 Set version to 1.0.0-b32
ffb1758 Update CMake scripts for finding packages:
b893749 Remove http Writer suspend and resume feature (API Change):
27864fb Add io_service completion invariants tests
eba05a7 Set version to 1.0.0-b31
484bcef Fix badge markdown in README.md
5663bea Add missing dynabuf_readstream member
0d7a551 Tidy up build settings
0fd4030 Move the handler, don't copy it

git-subtree-dir: src/beast
git-subtree-split: 6d5547a32c50ec95832c4779311502555ab0ee1f
2017-04-20 13:40:52 -07:00
..
2017-01-13 15:01:20 -08:00

macos Build Instructions

Important

We don't recommend OS X for rippled production use at this time. Currently, the Ubuntu platform has received the highest level of quality assurance and testing.

Prerequisites

You'll need OSX 10.8 or later

To clone the source code repository, create branches for inspection or modification, build rippled using clang, and run the system tests you will need these software components:

Install Software

Install XCode

If not already installed on your system, download and install XCode using the appstore or by using this link.

For more info, see "Step 1: Download and Install the Command Line Tools" here

The command line tools can be installed through the terminal with the command:

xcode-select --install

Install Homebrew

"Homebrew installs the stuff you need that Apple didnt."

Open a terminal and type:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

For more info, see "Step 3: Install Homebrew" here

Install Git

brew update brew install git

For more info, see "Step 4: Install Git" here

NOTE: To gain full featured access to the git-subtree functionality used in the rippled repository, we suggest Git version 1.8.3.2 or later.

Install Scons

Requires version 2.3.0 or later

brew install scons

brew will generally install the latest stable version of any package, which will satisfy the scons minimum version requirement for rippled.

Install Package Config

brew install pkg-config

Install/Build/Configure Dependencies

Build Google Protocol Buffers Compiler

Building rippled on osx requires protoc version 2.5.x or 2.6.x (later versions do not work with rippled at this time).

Download this

We want to compile protocol buffers with clang/libc++:

tar xfvj protobuf-2.6.1.tar.bz2
cd protobuf-2.6.1
./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
make -j 4
sudo make install

If you have installed protobuf via brew - either directly or indirectly as a dependency of some other package - this is likely to conflict with our specific version requirements. The simplest way to avoid conflicts is to uninstall it. brew ls --versions protobuf will list any versions of protobuf you currently have installed.

Install OpenSSL

brew install openssl

Build Boost

We want to compile boost with clang/libc++

Download a release

Extract it to a folder, making note of where, open a terminal, then:

./bootstrap.sh ./b2 toolset=clang threading=multi runtime-link=static link=static cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" address-model=64

Create an environment variable BOOST_ROOT in one of your rc files, pointing to the root of the extracted directory.

Clone the rippled repository

From the terminal

git clone git@github.com:ripple/rippled.git
cd rippled

Choose the master branch or one of the tagged releases listed on [GitHub](https://github.com/ripple/rippled/releases GitHub).

git checkout master

or to test the latest release candidate, choose the release branch.

git checkout release

Configure Library Paths

If you didn't persistently set the BOOST_ROOT environment variable to the root of the extracted directory above, then you should set it temporarily.

For example, assuming your username were Abigail and you extracted Boost 1.61.0 in /Users/Abigail/Downloads/boost_1_61_0, you would do for any shell in which you want to build:

export BOOST_ROOT=/Users/Abigail/Downloads/boost_1_61_0

Build

scons

See: here

rippled builds a set of unit tests into the server executable. To run these unit tests after building, pass the --unittest option to the compiled rippled executable. The executable will exit after running the unit tests.