« Previous - Version 22/35 (diff) - Next » - Current version
Naush, 05/02/2011 08:29 pm


Installing Luabind on Linux, Mac OS X, ...

Since luabind is not available from macports (I think certain Linux Distributions do not provide it too), here the short summary how to install luabind on a Unix like system :)

Installing lua

To build luabind, you need liblua. Install it, for example on a Mac using macports:

sudo port install lua

On Ubuntu 10.04:
sudo apt-get install liblua5.1-0-dev

On CentOS 5+

yum install lua-devel

Getting the source

While writing this, the most current version is 0.9. Get it!
On Mac OS X:

curl -O http://sunet.dl.sourceforge.net/project/luabind/luabind/0.9/luabind-0.9.tar.gz

On Linux:

wget http://sunet.dl.sourceforge.net/project/luabind/luabind/0.9/luabind-0.9.tar.gz

Alternativly, you can take the source on Kervala's repository

hg clone http://hg.kervala.net/packaging/file/

Here is a clone on bitbucket:

hg clone https://bitbucket.org/rti/ryzom-core-luabind

That version includes a cmake config and allows to build a debian package.

Extract the source

tar zxf luabind-0.9.tar.gz

Building and installing

All CMake platforms

If you downloaded sources from http://hg.kervala.net/packaging/file/ or https://bitbucket.org/rti/ryzom-core-luabind/src, you just need to type

cd luabind
mkdir build
cd build
cmake ..

# with STLport, append: -DWITH_STLPORT=ON
# in static, append: -DWITH_STATIC=ON

make
sudo make install

On Ubuntu 10.04:

install boost build:

sudo apt-get install boost-build libboost-dev

and compile / install with the following command:

sudo bjam --prefix=/usr/local install

On Gentoo

if boost-build package is not installed:

sudo emerge boost-build -av

and compile /install with the following command: (replace 1_41 by your version of bjam)

sudo bjam-1_41 --prefix=/usr/local install

check if lib is named correctly.
ls /usr/local/lib/libluabind*.so

if lib si named libluabindd.so create a symlink
sudo ln -s /usr/local/lib/libluabindd.so /usr/local/lib/libluabind.so

On Mac OS X:

Using bjam:

sudo bjam --toolset=darwin --prefix=/usr/local install

Kervala's repository works great on Mac OS X as well.
Be sure to build a static library (-DWITH_STATIC=ON), else strange errors might occur. (see #1212)

hg clone https://bitbucket.org/rti/ryzom-core-luabind
cd ryzom-core-luabind
mkdir build
cd build
cmake -DWITH_STATIC=ON -G "Unix Makefiles" ..
make
sudo make install

Thats all

Hope that works for you.
Have fun!