Skip to content
Snippets Groups Projects
README.MacOSX 3.31 KiB
Newer Older
Roman Tsisyk's avatar
Roman Tsisyk committed
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.

Eugine Blikh's avatar
Eugine Blikh committed
If you want to build at the Homebrew environment execute:
Roman Tsisyk's avatar
Roman Tsisyk committed

Eugine Blikh's avatar
Eugine Blikh committed
    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
Roman Tsisyk's avatar
Roman Tsisyk committed

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
Roman Tsisyk's avatar
Roman Tsisyk committed
2. Upgrade clang to 3.2+
Roman Tsisyk's avatar
Roman Tsisyk committed

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.

bigbes's avatar
bigbes committed
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

Roman Tsisyk's avatar
Roman Tsisyk committed
where module is the name of the installed module and module-dir is the name of
the directory the module's archive deflates into.
Roman Tsisyk's avatar
Roman Tsisyk committed
4. Download & build tarantool source code:
NOTE: If you want to get DMG package go to section 6.

Eugine Blikh's avatar
Eugine Blikh committed
    git clone --recursive git://github.com/tarantool/tarantool.git
Eugine Blikh's avatar
Eugine Blikh committed
    cd tarantool
    mkdir build && cd build
    cmake .. \
Eugine Blikh's avatar
Eugine Blikh committed
        -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
        -DENABLE_CLIENT=true \
        -DDARWIN_BUILD_TYPE=Ports
    make
Roman Tsisyk's avatar
Roman Tsisyk committed
5. Run tarantool test suite
NB: the following tests are not runnable on MacOS X at this point:
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:
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):

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 \