Personal tools
The Open Lighting Project has moved!

We've launched our new site at www.openlighting.org. This wiki will remain and be updated with more technical information.

Difference between revisions of "OLA Mac Install From Tarball"

From wiki.openlighting.org

Jump to: navigation, search
(Created page with "= Install a Compiler= The easiest is to install [http://developer.apple.com/technology/xcode.html Xcode] . Xcode comes in two versions: XCode 4 which you need to pay for and XCo…")
 
(Download OLA)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Install a Compiler=
+
{{ MacInstallPrep }}
 
 
The easiest is to install [http://developer.apple.com/technology/xcode.html Xcode] . Xcode comes in two versions: XCode 4 which you need to pay for and XCode 3 which is free. XCode 3 works just fine.
 
 
 
You can use other compilers but that's outside the scope of this tutorial.
 
 
 
= Install OLA Dependancies =
 
 
 
The easiest way is to install the dependancies using [http://www.macports.org/ MacPorts].
 
 
 
Once you have MacPorts installed, running the following command to download and build the dependancies.
 
 
 
sudo port install pkgconfig cppunit protobuf-cpp unittest-cpp libmicrohttpd libusb protobuf-python27
 
 
 
You may need to change which protobuf-python port you install based on the version of Python on your system. You can find that out by running
 
 
 
  python --version
 
 
 
On my system I get
 
 
 
  Python 2.7.1
 
 
 
So I install the protobuf-python27 port. Remember which version you install because you'll need it in the next section.
 
 
 
You also need git installed, if you haven't got it already run
 
 
 
  sudo port install git
 
 
 
= Set some environment variables =
 
 
 
Set $PATH to point to something sane, and fix some other environment variables:
 
 
 
export PATH="$PATH:/usr/local/lib/"
 
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
 
export CPPFLAGS="-I/opt/local/include"
 
export LDFLAGS="-L/opt/local/lib"
 
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
 
 
 
You may need to tweak the PYTHONPATH depending on where protobuf-python was installed. You can find that out by running:
 
 
 
  port contents protobuf-python27
 
 
 
Make sure the port name matches the one you installed in the step above.
 
  
 
= Download OLA  =
 
= Download OLA  =
  
Download the latest tarball from http://code.google.com/p/linux-lighting/downloads/list.
+
Download the latest tarball from https://github.com/OpenLightingProject/ola/releases.
  
 
Extract the tarball:
 
Extract the tarball:
Line 52: Line 10:
 
   cd ola-0.X.Y
 
   cd ola-0.X.Y
  
= Run autoreconf=
+
{{ MacOLABuild }}
 
 
If this is the first time run with -i to install the missing files
 
 
 
autoreconf -i
 
 
 
= Do the usual build steps=
 
 
 
You can pass additional options to ./configure . Run
 
 
 
  ./configure --help
 
 
 
to see all options. The most popular option is --enable-python-libs to build the Python Client Module.
 
 
 
Once you've decided on the options, it's time to build OLA
 
 
 
./configure --enable-python-libs
 
make
 
make check
 
sudo make install
 
 
 
  
 
= Common Problems =
 
= Common Problems =
  
== Architectures ==
+
See [[Common Problems When Building OLA on Mac]]
 
 
Snow Leopard and newer builds binaries as 64-bit by default. If you need to build the libraries as 32-bit, use the following command to fetch with the right architecture in ports:
 
 
 
  sudo port install pkgconfig cppunit +universal protobuf-cpp +universal unittest-cpp libmicrohttpd libusb +universal
 
 
 
And then modify the build step:
 
 
 
  export CPPFLAGS="-arch i386"
 
  export LDFLAGS=" -arch i386"
 
  ./configure
 
  make
 
  make check
 
 
 
== Mac OS X Version 10.4 ==
 
 
 
If you're building for 10.4 you need to run configure and make with MACOSX_DEPLOYMENT_TARGET:
 
 
 
  export MACOSX_DEPLOYMENT_TARGET=10.4
 
 
 
otherwise you'll get errors in the form
 
 
 
/Developer/usr/bin/ld: multiple definitions of symbol _create  ../plugins/stageprofi/.libs/libolastageprofi.dylib(single module) definition of _create
 

Latest revision as of 10:51, 20 December 2014

Install a Compiler

The easiest is to install Xcode . Xcode comes in two versions: XCode 4 which you need to pay for and XCode 3 which is free. XCode 3 works just fine.

You can use other compilers but that's outside the scope of this tutorial.

Install OLA Dependancies

The easiest way is to install the dependancies using MacPorts.

Once you have MacPorts installed, running the following command to download and build the dependancies.

sudo port install pkgconfig cppunit protobuf-cpp libmicrohttpd libusb py27-protobuf

You may need to change which py27-protobuf port you install based on the version of Python on your system. You can find that out by running

 python --version

On my system I get

 Python 2.7.1

So I install the py27-protobuf port. Remember which version you install because you'll need it in the next section.

You also need git installed, if you haven't got it already run

 sudo port install git-core

Set some environment variables

Set $PATH to point to something sane, and fix some other environment variables:

export PATH="$PATH:/usr/local/bin/"
export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"
export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

You may need to tweak the PYTHONPATH depending on where the python protobufs were installed. You can find that out by running:

 port contents py27-protobuf

Make sure the port name matches the one you installed in the step above.

Download OLA

Download the latest tarball from https://github.com/OpenLightingProject/ola/releases.

Extract the tarball:

 tar -zxf ola-0.X.Y.tar.gz
 cd ola-0.X.Y

Run autoreconf

If this is the first time run with -i to install the missing files

autoreconf -i

Do the usual build steps

You can pass additional options to ./configure . Run

 ./configure --help

to see all options. The most popular option is --enable-python-libs to build the Python Client Module. If you want to use the RDM responder tests add --enable-rdm-tests.

Once you've decided on the options, it's time to build OLA. If you have a multi-core machine, you can speed up the build by using make -j N. A good value of N is the number of cores on your machine. On a MacBook Pro (4 core) using -j 4 reduced the build time from 5 minutes to 2.5 minutes.

./configure --enable-rdm-tests
make
make check
sudo make install

Common Problems

See Common Problems When Building OLA on Mac