Skip to content

Commit

Permalink
Update homebrew building instructions
Browse files Browse the repository at this point in the history
Tested and updated building instructions for Mac OS X. (by Elena Shebunyaeva)
  • Loading branch information
bigbes committed Jan 29, 2016
1 parent 0a29482 commit 6264401
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 191 deletions.
133 changes: 50 additions & 83 deletions README.MacOSX
Original file line number Diff line number Diff line change
@@ -1,120 +1,87 @@
OS X Readme
===========
Target OS: MacOS X "El Capitan"

This manual explains how to manually build tarantool from sources.
In the Homebrew environment, you can download the latest tarantool package
with a single command:

Supporting kinds of build with default Apple developer software and external as
homebrew as MacPorts.
brew install tarantool

If you want to build at the Homebrew environment execute:
This downloads an already built release version of tarantool.

brew install https://raw.githubusercontent.com/tarantool/tarantool/master/extra/tarantool.rb --devel
If you want to manually build tarantool from sources, read the following
instructions on how to do it using either the default Apple developer software
(Xcode Tools), or external package managers (Homebrew or MacPorts).

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):
1. Install necessary packages
-------------

Default build depended by Developer tools by Apple and -DDARWIN_BUILD_TYPE=None:
For the default Xcode Tools by Apple:
sudo xcode-select --install
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

sudo xcode-select --install
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
For Homebrew:
brew install cmake readline

To enable build type with MacPorts set up the flag -DDARWIN_BUILD_TYPE=Ports:
For MacPorts:
port install autoconf binutils cmake ncurses zlib readline

port install autoconf binutils cmake ncurses zlib readline

2. Upgrade clang to 3.2+
2. Install test-required packages and modules for Python 2.7
-------------

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.
You need: pyYAML, python-daemon, msgpack-python, gevent, six

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:
To install these packages, we recommend easy_install, pip, or setup.py.

For easy_install:
sudo easy_install pyyaml
sudo easy_install pydaemon
sudo easy_install daemon
sudo easy_install python-daemon
sudo easy_install msgpack-python
sudo easy_install gevent
sudo easy_install six

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);
For pip:
sudo pip install -r test-run/requirements.txt

For setup.py:
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.
where 'module' is the name of the installed python module and 'module-dir'
is the name of the directory where the module's archive is deflated into.

4. Download & build tarantool source code:
3. 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
Download tarantool source code from the repository at GitHub:

cd tarantool
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_CLIENT=true \
-DDARWIN_BUILD_TYPE=Ports
make
git clone https://github.com/tarantool/tarantool.git --recursive
git submodule update --init

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
Create a build directory and build the tarantool project manually, for example:

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;
cd tarantool
mkdir build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DDARWIN_BUILD_TYPE=Ports
make

To run all tests then, execute:
In this example, we are making a developer's build (-DCMAKE_BUILD_TYPE=RelWithDebInfo)
with cmake using MacPorts (-DDARWIN_BUILD_TYPE=Ports). To build a release version,
set -DCMAKE_BUILD_TYPE=Release.

cd ~/build/tarantool/test
./run
Remember also to set up the cmake's flag -DDARWIN_BUILD_TYPE depending on the package
manager you use ('-DDARWIN_BUILD_TYPE=None' for Xcode Tools and Homebrew, and
'-DDARWIN_BUILD_TYPE=None' for MacPorts).

6. Build DMG package
4. Run tarantool test suite
-------------

Building DMG depended by "Auxiliary Tools for Xcode", which be able to download from:

https://developer.apple.com (necessary login with Apple ID account).
To run all tests, execute:

Execute commands to get DMG package by root (if you not root you'll get files with incorrect permissions):
make test

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


-- EOF

16 changes: 7 additions & 9 deletions doc/sphinx/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,15 @@ Choose the package you want.
Mac OS X
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is actually a “homebrew” recipe so it's not a true binary download,
some source code is involved. First upgrade Clang (the C compiler) to version 3.2
or later using Command Line Tools for Xcode disk image version 4.6+ from Apple
Developer web-site. Then download the recipe file from
`tarantool.org/dist/master/tarantool.rb`_. Make the file executable, execute it,
and the script in the file should handle the necessary steps with cmake, make,
and make install.
You can install tarantool via Homebrew. It contains binaries for OS X 10.09 and higher. Simply use:

.. _tarantool.org/dist/master/tarantool.rb: http://tarantool.org/dist/master/tarantool.rb
.. code-block:: session
.. _dup first database:
$ brew install tarantool
==> Downloading https://homebrew.bintray.com/bottles/tarantool-1.6.7-593.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/tarantool-1.6.7-593.el_capitan.bottle.tar.gz
==> Pouring tarantool-1.6.7-593.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/tarantool/1.6.7-593: 19 files, 2.1M
=====================================================================
Starting Tarantool and making your first database
Expand Down
7 changes: 1 addition & 6 deletions doc/www/content/newsite/download.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,8 @@ blocks :
.. code-block:: bash
$ brew install http://build.tarantool.org/tarantool.rb --devel
$ brew install tarantool
Please upgrade ``clang`` to version 3.2 or later using
``Command Line Tools for Xcode`` disk image version 4.6+
from `Apple Developer`_ web-site.
.. _Apple Developer: https://developer.apple.com/downloads/
- - "Fedora 19, 20, 21, 22"
- format : rst
content: |
Expand Down
93 changes: 0 additions & 93 deletions extra/tarantool.rb

This file was deleted.

0 comments on commit 6264401

Please sign in to comment.