Skip to content

Commit e058b9e

Browse files
authored
Merge pull request #68 from ChainSQL/develop
Develop to master
2 parents 8023066 + efa567b commit e058b9e

File tree

1,013 files changed

+103007
-40130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,013 files changed

+103007
-40130
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ bin/project-cache.jam
2424
build
2525
tags
2626
TAGS
27+
bin/chainsqld
2728
Debug/*.*
2829
Release/*.*
2930

@@ -39,12 +40,17 @@ Release/*.*
3940
tmp
4041

4142
# Ignore database directory.
43+
db/
4244
db/*.db
4345
db/*.db-*
4446

4547
# Ignore debug logs
4648
debug_log.txt
4749

50+
# Ignore customized configs
51+
chainsqld.cfg
52+
validators.txt
53+
4854
# Doxygen generated documentation output
4955
HtmlDocumentation
5056

@@ -73,6 +79,9 @@ DerivedData
7379
# Profiling data
7480
gmon.out
7581

82+
# Build Log
83+
chainsqld-build.log
84+
7685
/Builds/XCode/*
7786
!/Builds/XCode/README.md
7887
/Builds/VisualStudio2015/*
@@ -82,6 +91,11 @@ gmon.out
8291
!/Builds/Ubuntu/*.sh
8392
!/Builds/Ubuntu/README.md
8493

94+
Builds/VisualStudio2015/*.db
95+
Builds/VisualStudio2015/*.user
96+
Builds/VisualStudio2015/*.opendb
97+
Builds/VisualStudio2015/*.sdf
98+
8599
# ignore
86100
third_party/
87101

Builds/CMake/CMakeFuncs.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,6 @@ macro(link_common_libraries cur_project)
843843
$<$<OR:$<CONFIG:Release>,$<CONFIG:ReleaseClassic>>:VC/static/libeay32MT>)
844844
target_link_libraries(${cur_project}
845845
legacy_stdio_definitions.lib Shlwapi kernel32 user32 gdi32 winspool comdlg32
846-
advapi32 shell32 ole32 oleaut32 uuid odbc32 odbccp32)
846+
advapi32 shell32 ole32 oleaut32 uuid odbc32 odbccp32 crypt32)
847847
endif (NOT MSVC)
848848
endmacro()

Builds/Ubuntu/install_rippled_depends_ubuntu.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ if [ -z "${ubuntu_release}" ]; then
1919
exit 1
2020
fi
2121

22-
# install third party
23-
python ./install_third_party.py
24-
2522
if [ ${ubuntu_release} == "12.04" ]; then
2623
apt-get install python-software-properties
2724
add-apt-repository ppa:afrank/boost

Builds/VisualStudio2015/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
> 2. 安装完 Open SSL 后,并将 OPENSSL_ROOT_DIR 环境变量设置为 OpenSSL 安装路径
2929
3030
### install boost
31-
> 1. 下载 [boost](http://slproweb.com/products/Win32OpenSSL.html)
31+
> 1. 下载 [boost](http://www.boost.org/users/news/)
3232
> 2. 编译 boost
3333
```cmd
34-
> cd C:\lib\boost_1_62_0
34+
> cd C:\lib\boost_1_63_0
3535
> bootstrap
3636
> bjam --toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared,static stage --stagedir=stage64
3737
```
17.3 KB
Loading
7.96 KB
Loading

Builds/XCode/README.md

Lines changed: 142 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,183 @@
1-
macOS-Xcode 编译指南
2-
## 重要提示
3-
我们并不推荐使用OS X来编译运行chainsqld工程。根据当前的测试数据来看,使用Ubuntu平台能获得最高的性能保障。
4-
## 前置条件
5-
OSX 10.8及更高版本
6-
7-
需提前准备好下列软件:<br>
8-
- [XCode](https://developer.apple.com/xcode/)
9-
- [HomeBrew](https://brew.sh/)
10-
- [Git](https://git-scm.com/)
11-
- [SCons](http://www.scons.org/)
12-
- [MySQL](https://www.mysql.com/)
13-
14-
## 软件安装
15-
**安装XCode**<br>
16-
如果你已经安装XCode,请直接跳过此步骤。<br>
17-
XCode可直接通过AppStore安装或直接点击此[安装链接](https://developer.apple.com/xcode/).<br>
18-
命令行工具可在终端输入如下命令安装:
1+
# macos Build Instructions
2+
3+
## Important
4+
5+
We don't recommend macos for rippled production use at this time. Currently, the
6+
Ubuntu platform has received the highest level of quality assurance and
7+
testing. That said, macos is suitable for many development/test tasks.
8+
9+
## Prerequisites
10+
11+
You'll need macos 10.8 or later
12+
13+
To clone the source code repository, create branches for inspection or
14+
modification, build rippled using clang, and run the system tests you will need
15+
these software components:
16+
17+
* [XCode](https://developer.apple.com/xcode/)
18+
* [Homebrew](http://brew.sh/)
19+
* [Git](http://git-scm.com/)
20+
* [CMake](http://cmake.org/)
21+
22+
## Install Software
23+
24+
### Install XCode
25+
26+
If not already installed on your system, download and install XCode using the
27+
appstore or by using [this link](https://developer.apple.com/xcode/).
28+
29+
For more info, see "Step 1: Download and Install the Command Line Tools"
30+
[here](http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac)
31+
32+
The command line tools can be installed through the terminal with the command:
33+
1934
```
2035
xcode-select --install
2136
```
2237

23-
**安装HomeBrew**<br>
24-
如果已安装HomeBrew请跳过此步骤。<br>
25-
安装HomeBrew,需要先安装Ruby,安装Ruby的的方法可参考[这里](http://blog.csdn.net/u012701023/article/details/52183100).<br>
26-
安装完之后在命令行运行如下命令:
27-
```
28-
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
29-
```
38+
### Install Homebrew
39+
40+
> "[Homebrew](http://brew.sh/) installs the stuff you need that Apple didn’t."
41+
42+
Open a terminal and type:
3043

31-
**安装Git**
3244
```
33-
brew install git
45+
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3446
```
3547

36-
**安装Scons**<br>
37-
Scons版本最低要求是2.3.0,brew默认安装最新版本的软件,所以通过brew安装将会满足chainSQL对Scons的最低版本要求。
48+
For more info, see "Step 3: Install Homebrew"
49+
[here](http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac)
50+
51+
### Install Git
52+
3853
```
39-
brew install scons
54+
brew update brew install git
4055
```
4156

42-
**安装MySQL**<br>
57+
For more info, see "Step 4: Install Git"
58+
[here](http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac)
59+
60+
**NOTE**: To gain full featured access to the
61+
[git-subtree](http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/)
62+
functionality used in the rippled repository, we suggest Git version 1.8.3.2 or
63+
later.
64+
65+
### Install Scons
66+
67+
Requires version 3.6.0 or later
68+
4369
```
44-
brew install mysql
70+
brew install cmake
4571
```
4672

47-
## 依赖及环境变量设置
73+
`brew` will generally install the latest stable version of any package, which
74+
should satisfy the cmake minimum version requirement for rippled.
75+
76+
### Install Package Config
4877

49-
**安装Package Config**<br>
5078
```
5179
brew install pkg-config
5280
```
5381

54-
**安装cmake**<br>
82+
## Install/Build/Configure Dependencies
83+
84+
### Build Google Protocol Buffers Compiler
85+
86+
Building rippled on osx requires `protoc` version 2.5.x or 2.6.x (later versions
87+
do not work with rippled at this time).
88+
89+
Download [this](https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2)
90+
91+
We want to compile protocol buffers with clang/libc++:
92+
5593
```
56-
brew install cmake
94+
tar xfvj protobuf-2.6.1.tar.bz2
95+
cd protobuf-2.6.1
96+
./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
97+
make -j 4
98+
sudo make install
5799
```
58100

59-
**安装Google Protocol Buffers编译环境**<br>
101+
If you have installed `protobuf` via brew - either directly or indirectly as a
102+
dependency of some other package - this is likely to conflict with our specific
103+
version requirements. The simplest way to avoid conflicts is to uninstall it.
104+
`brew ls --versions protobuf` will list any versions of protobuf
105+
you currently have installed.
106+
107+
### Install OpenSSL
108+
60109
```
61-
brew install protobuf
110+
brew install openssl
62111
```
63112

64-
**安装OpenSSL**<br>
113+
### Build Boost
114+
115+
We want to compile boost with clang/libc++
116+
117+
Download [a release](https://sourceforge.net/projects/boost/files/boost/1.61.0/boost_1_61_0.tar.bz2)
118+
119+
Extract it to a folder, making note of where, open a terminal, then:
120+
65121
```
66-
brew install openssl
122+
./bootstrap.sh ./b2 toolset=clang threading=multi runtime-link=static link=static cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" address-model=64
67123
```
68124

69-
**安装Boost环境**<br>
70-
通过brew安装boost库:
125+
Create an environment variable `BOOST_ROOT` in one of your `rc` files, pointing
126+
to the root of the extracted directory.
127+
128+
### Clone the rippled repository
129+
130+
From the terminal
131+
71132
```
72-
brew install boost
133+
git clone git@github.com:ripple/rippled.git
134+
cd rippled
73135
```
74-
然后将BOOST_ROOT设置为环境变量,具体方法为:<br>
75-
1.进入当前用户home目录<br>
76-
2.文本编辑器打开“.bash_profile”文件<br>
77-
3.在文件最后添加如下语句(其中等号后面的路径为boost文件夹所在目录,可以根据brew安装完之后的提示获得路径,也可以去“/usr/local/Cellar/boost”路径下查找):
136+
137+
Choose the master branch or one of the tagged releases listed on
138+
[GitHub](https://github.com/ripple/rippled/releases GitHub).
139+
78140
```
79-
export BOOST_ROOT=/usr/local/Cellar/boost/boost版本
141+
git checkout master
80142
```
81-
4.执行如下命令使更改生效:
143+
144+
or to test the latest release candidate, choose the `release` branch.
145+
82146
```
83-
source .bash_profile
147+
git checkout release
84148
```
85-
5.最后可以执行“echo $BOOST_ROOT”检测设置是否生效
86149

87-
## 克隆chainSQL代码库
150+
### Configure Library Paths
151+
152+
If you didn't persistently set the `BOOST_ROOT` environment variable to the
153+
root of the extracted directory above, then you should set it temporarily.
154+
155+
For example, assuming your username were `Abigail` and you extracted Boost
156+
1.61.0 in `/Users/Abigail/Downloads/boost_1_61_0`, you would do for any
157+
shell in which you want to build:
88158

89-
在终端执行如下命令:
90159
```
91-
git clone git@github.com:ChainSQL/chainsqld.git
160+
export BOOST_ROOT=/Users/Abigail/Downloads/boost_1_61_0
92161
```
93162

94-
## 创建chainSQL-Xcode项目文件
95-
进入chainSQL代码库根目录,然后进入“Builds/XCode”目录,执行下面命令:
163+
## Build
164+
96165
```
97-
cmake -G Xcode ../..
166+
mkdir xcode_build && cd xcode_build
167+
cmake -GXcode ..
98168
```
99-
之后会在“Builds/XCode”目录下生成xcode项目文件:chainsqld.xcodeproj,然后双击即可打开Xcode。
100-
可通过选择“Product/Scheme”下面的chainsqld或者chainsqld_classic或者ALL_BUILD来选择不同的编译方式生成chainsqld。
169+
170+
There are a number of variables/options that our CMake files support and they
171+
can be added to the above command as needed (e.g. `-Dassert=ON` to enable
172+
asserts)
173+
174+
After generation succeeds, the xcode project file can be opened and used to
175+
build and debug.
176+
177+
## Unit Tests (Recommended)
178+
179+
rippled builds a set of unit tests into the server executable. To run these unit
180+
tests after building, pass the `--unittest` option to the compiled `rippled`
181+
executable. The executable will exit after running the unit tests.
182+
183+

0 commit comments

Comments
 (0)