forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.MacOSX
120 lines (81 loc) · 3.31 KB
/
README.MacOSX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
OS X Readme
===========
This manual explains how to manually build tarantool from sources.
Supporting kinds of build with default Apple developer software and external as
homebrew as MacPorts.
If you want to build at the Homebrew environment execute:
brew install https://raw.githubusercontent.com/tarantool/tarantool/master/extra/tarantool.rb --devel
Possible flags are:
--devel - for installing master's branch version
--with-tests - for testing tarantool after building/installing
--with-debug - for building tarantool with -DCMAKE_BUILD_TYPE=Debug
Target OS: MacOS X "Lion"
First of all, make sure mac ports are available (to install packages from).
1. Install necessary packages (ports):
-------------
Default build depended by Developer tools by Apple and -DDARWIN_BUILD_TYPE=None:
sudo xcode-select --install
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
To enable build type with MacPorts set up the flag -DDARWIN_BUILD_TYPE=Ports:
port install autoconf binutils cmake ncurses zlib readline
2. Upgrade clang to 3.2+
-------------
Go to http://developer.apple.com/ to download and install the latest version
of "Command Line Tools for Xcode". This package contains /usr/bin/clang and
/usr/bin/clang++ binaries. Check that clang version is at least 3.2.
3. Install necessary python modules: pyYAML, python-daemon
-------------
If you use latest Mac OS X version it is recommended using easy_install or pip.
For instance to install these packages via easy_install just type following commands
into terminal:
sudo easy_install pyyaml
sudo easy_install pydaemon
sudo easy_install daemon
Otherwise see following instruction
NB: it is recommended to install python modules through setup.py,
using the default python (which should be >= 2.6.x and < 3.x);
tar -xzf module.tar.gz
cd module-dir
sudo python setup.py install
where module is the name of the installed module and module-dir is the name of
the directory the module's archive deflates into.
4. Download & build tarantool source code:
-------------
NOTE: If you want to get DMG package go to section 6.
git clone --recursive git://github.com/tarantool/tarantool.git
cd tarantool
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DENABLE_CLIENT=true \
-DDARWIN_BUILD_TYPE=Ports
make
5. Run tarantool test suite
-------------
NB: the following tests are not runnable on MacOS X at this point:
box/lua.test
box_big/lua.test
connector_c/xlog_rpl.test
To disable those add each of them to the 'disabled' clause in suite.ini file
in the appropriate directory; for instance, tarantool/test/box/suite.ini must
be edited to disable any test in the 'box' suite;
To run all tests then, execute:
cd ~/build/tarantool/test
./run
6. Build DMG package
-------------
Building DMG depended by "Auxiliary Tools for Xcode", which be able to download from:
https://developer.apple.com (necessary login with Apple ID account).
Execute commands to get DMG package by root (if you not root you'll get files with incorrect permissions):
mkdir build && cd build
sudo -s
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Rel \
-DENABLE_BACKTRACE=OFF \
-DCMAKE_C_COMPILER="clang" \
-DCMAKE_CXX_COMPILER="clang++" \
-DDARWIN_BUILD_TYPE=None \
-DENABLE_CLIENT=ON
make package
-- EOF