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 on OS X"

From wiki.openlighting.org

Jump to: navigation, search
(get git from MacPorts too)
Line 1: Line 1:
This page describes how to get OLA working on OS X, by downloading and compiling the source code.
+
__TOC__
  
If you just want to get OLA working and aren't a developer consider using the Mac Installer (.dmg file) to install a pre-compiled version [http://code.google.com/p/linux-lighting/ available here].
+
There are at least 4 ways to install OLA on a mac, which one you choose depends on your system, the level of control and speed of updates you prefer. Avoid mixing the methods as odd behavior can result.
  
 +
; Use a Mac Installer
 +
: This is the easiest for new users but tends to lag behind the main released. It can be downloaded [http://code.google.com/p/linux-lighting/ here] (look for the .dmg file). The installer only supports 10.6 and intel macs.
 +
 +
; Use Mac Ports
 +
: This is a good middle-of-the-road option. It gives you some control over how OLA is configured as well as relatively frequent updates. It should support all platforms and OS X versions.
  
== Basic setup ==
+
; Install from tarball
 +
: This is similar to using mac ports but you get a bit more control. You can also access programs that aren't installed normally like the RDM testing code.
  
* Install [http://developer.apple.com/technology/xcode.html Xcode]
+
; Install from the git repo
* install [http://www.macports.org/ MacPorts]
+
: This is the bleeding edge and recommended for power users and developers. May break at any time.
  
== Use MacPorts to install dependencies==
 
  
$ port install pkgconfig git cppunit unittest-cpp protobuf-cpp
+
== Install With Mac Ports ==
  
== Set some environment variables==
+
This can take a while as you need to download & install Xcode as well as all the OLA dependancies.
 +
 
 +
* 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.
 +
* Install [http://www.macports.org/ MacPorts]
 +
* Install OLA and all the dependancies by running
 +
 
 +
$ sudo port install ola
 +
 
 +
== Install from tarball or git repo ==
 +
 
 +
 
 +
* 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.
 +
* Install [http://www.macports.org/ MacPorts], we use this to install all the OLA dependancies.
 +
 
 +
=== Use MacPorts to install dependencies ===
 +
 
 +
$  sudo port install pkgconfig cppunit protobuf-cpp unittest-cpp libmicrohttpd libusb
 +
 
 +
If you intend to use git install it now
 +
 
 +
  $ sudo port install git
 +
 
 +
=== Set some environment variables ===
  
 
set $PATH to point to something sane:
 
set $PATH to point to something sane:
Line 21: Line 48:
 
  export LDFLAGS="-L/opt/local/lib"
 
  export LDFLAGS="-L/opt/local/lib"
  
== Optionally install microhttpd==
+
=== Checkout OLA or Download the tarball ===
 
 
If you want the web interface you need these
 
 
 
* http://www.gnu.org/software/libmicrohttpd/ [>= 0.4] (Currently you need to install libgcrypt too for this library to work)
 
sudo port install libgcrypt
 
or you can disable https support (which works with OLA) by using the configure line "./configure --enable-https=no"
 
 
 
* Make sure you build AND install this before running "./configure" on OLA otherwise it will not detect the libraries and ignore all the HTTP server code
 
 
 
== Checkout OLA or Download the tarball ==
 
  
 
   git clone http://git.opendmx.net/ola
 
   git clone http://git.opendmx.net/ola
Line 42: Line 59:
 
   cd lla
 
   cd lla
  
== Run autoreconf==
+
=== Run autoreconf===
  
 
If this is the first time run with -i to install the missing files
 
If this is the first time run with -i to install the missing files
Line 48: Line 65:
 
  autoreconf -i
 
  autoreconf -i
  
== Do the usual steps==
+
=== Do the usual steps===
  
 
  ./configure
 
  ./configure
Line 71: Line 88:
  
 
   make CPPFLAGS="-arch i386"  LDFLAGS="-arch i386" check
 
   make CPPFLAGS="-arch i386"  LDFLAGS="-arch i386" check
 
=== ltdl/libtool ===
 
 
If you get an error like the following:
 
 
/bin/sh ./libtool --tag=CC  --mode=compile gcc -DHAVE_CONFIG_H -I.  -I/opt/local/var/macports/software/protobuf-cpp/2.0.3_0/opt/local/include/  -g -O2 -c -o ltdl.lo ltdl.c
 
./libtool: line 464: CDPATH: command not found
 
/Users/simonn/lighting/lla/libltdl/libtool: line 464: CDPATH: command not found
 
/Users/simonn/lighting/lla/libltdl/libtool: line 1142: func_opt_split: command not found
 
libtool: Version mismatch error.  This is libtool 2.2.6, but the
 
libtool: definition of this LT_INIT comes from an older release.
 
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
 
libtool: and run autoconf again.
 
 
Your system uses a different version of libtool. Run:
 
 
  glibtoolize --ltdl -c -f
 
 
and then start from the autoreconf step again. This problem shouldn't occur in releases >= 0.7.0.
 

Revision as of 08:04, 29 June 2011

There are at least 4 ways to install OLA on a mac, which one you choose depends on your system, the level of control and speed of updates you prefer. Avoid mixing the methods as odd behavior can result.

Use a Mac Installer
This is the easiest for new users but tends to lag behind the main released. It can be downloaded here (look for the .dmg file). The installer only supports 10.6 and intel macs.
Use Mac Ports
This is a good middle-of-the-road option. It gives you some control over how OLA is configured as well as relatively frequent updates. It should support all platforms and OS X versions.
Install from tarball
This is similar to using mac ports but you get a bit more control. You can also access programs that aren't installed normally like the RDM testing code.
Install from the git repo
This is the bleeding edge and recommended for power users and developers. May break at any time.


Install With Mac Ports

This can take a while as you need to download & install Xcode as well as all the OLA dependancies.

  • 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.
  • Install MacPorts
  • Install OLA and all the dependancies by running
$ sudo port install ola

Install from tarball or git repo

  • 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.
  • Install MacPorts, we use this to install all the OLA dependancies.

Use MacPorts to install dependencies

$  sudo port install pkgconfig cppunit protobuf-cpp unittest-cpp libmicrohttpd libusb

If you intend to use git install it now

 $ sudo port install git

Set some environment variables

set $PATH to point to something sane:

export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPPFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"

Checkout OLA or Download the tarball

 git clone http://git.opendmx.net/ola
 cd ola

or

 wget $ola_url
 tar -zxf $ola_file
 cd lla

Run autoreconf

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

autoreconf -i

Do the usual steps

./configure
make
make check
sudo make install


Common Problems

Architectures

Snow Leopard builds binaries as 64-bit by default. If you need to build as 32-bit use the following to configure:

 CPPFLAGS="-arch i386"  LDFLAGS=" -arch i386" ./configure

Then, build using:

 make CPPFLAGS="-arch i386"  LDFLAGS="-arch i386"

Note you'll need to do the same when you run make check:

 make CPPFLAGS="-arch i386"  LDFLAGS="-arch i386" check