Installing Fluxus on Mac OS X 10.6-10.8

kleineFluxus is a “a live coding environment for 3D graphics, music and game” available at http://www.pawfal.org/fluxus/. If you know Racket (or LISP, or Scheme) it will look immediately familiar. I wanted to install it for our new Computer Science degree, where we teach Racket, and I wanted to do some experiments with its music capabilties. However, the installation is not exactly user-friendly… I have tried the precompiled package available from the website but sound did not work for me (flexa was missing). In the end, I installed the source files and compiled them, and I managed to have the sound.

This is what I have done on a Mac OS X 10.6 (a 6 year-old Mac Pro) and Mac OS X 10.8 (a 3-week old Mac Book Pro). It is essentially what the README file in the source tree tells you to do; the problem is that you find a lot of websites giving you different suggestions, including the README file itself. For instance, the README file tells you that you can use Homebrew to install fluxus, but the homebrew installation is broken for the moment… So, here it goes:

  • Install the 32 bit version of Racket, dowloadable from http://racket-lang.org/download/. I have installed 5.3.6. Notice that you really need the 32 version: fluxus will not link against the 64-bit version.
  • Install Macports from https://www.macports.org/install.php. This is needed to install all the fluxus dependencies below.
  • Clone the fluxus source code: git clone git://git.savannah.nongnu.org/fluxus.git
  • Add the following two lines to your .bash_profile:
    PATH=$PATH:/opt/local/bin:/Applications/Racket\ v5.3.6/bin/
    export DYLD_FRAMEWORK_PATH=/Applications/Racket\ v5.3.6/lib/

    Make sure that the Racket version is correct, and change it appropriately if needed.The file .bash_profile shoud be in your home directory, typically something like /Users/franco/. If it does not exist, just create it and make sure to open a new terminal so that these variables are loaded. You can check this with the command echo $PATH from the command line.

  • Install all the dependencies using macport. From the command line, run:
    sudo port install fftw-3 +universal glew +universal freetype \
      +universal jpeg +universal liblo +universal libpng +universal \
      libsndfile +universal ode +universal tiff +universal zlib \ 
      +universal scons

    (all this should be on a single line. If not, remember to add the backslash at the end). This will take a bit of time, don’t worry and have a coffee or tea in the meanwhile.

  • Install JackOSX from http://www.jackosx.com/. I have installed version 0.90 beta 15. This requires to reboot your computer, do this now and have another coffee or tea in the meanwhile.
  • Go back to the directory where you have downloaded fluxus. In this directory, type:
    scons ADDONS=0

    to compile fluxus. Again, you will need to wait a bit (but not too much, not enough for another coffee or tea). Scons is yet another building system that was installed using macports a few lines above.

  • Finally, you can install fluxus with:
    sudo scons ADDONS=0 install

You are now ready to test the sytem. You need to start Jack and fluxa, and then you’ll be able to play some music. More in detail:

  • In Applications, look for the folder called Jack, open it and double click on JackPilot. Check that the configuration is correct, save it, and then start JackPilot. Wait a few seconds and it should be ready, giving you CPU load.
  • In a terminal, launch the command fluxa (it should be in your path). It should just say “fluxa server ready”
  • Finally, let’s try to play something. In a terminal, go to the source tree of Fluxus, enter the “examples” directory, and at the command line type fluxus sound.scm. Press ctrl+e (or F5) and enjoy…

5 thoughts on “Installing Fluxus on Mac OS X 10.6-10.8

  1. Jean Paul

    I’m on Maverick. At the point where I type :
    scons ADDONS=0
    I get many lines of “yes” but after GLEW:yes, it terminates with :
    ERROR : ‘jack’ must be installed.
    And yes, I rebooted the computer after installing Jack.
    Any hint ? Thanks.

    Reply
  2. Darrin

    Thanks much for the rundown. I’m still trying to get it to work. Did you install the 32-bit or 64/32-bit version of JackOSX?

    Reply
  3. Darrin

    OK, I had to make two fixes.

    1. Put Jack’s lib where Fluxus’ build expects it:

    sudo ln -s /usr/local/lib/libjack.dylib /opt/local/lib/

    2. If building with Xcode >= 5.0 patch SConstruct thus:

    diff --git a/SConstruct b/SConstruct
    index 2937e4b..1f513dc 100644
    --- a/SConstruct
    +++ b/SConstruct
    @@ -105,6 +105,8 @@ if env['PLATFORM'] == 'darwin':
    env.Append(CCFLAGS = ' -arch i386 ')
    env.Append(LINKFLAGS = ' -arch i386 ')
    env.Append(CCFLAGS = ' -mmacosx-version-min=10.6 ')
    + # force pre C++11 stdlib, needed for Xcode 5+ which uses C++11 by default
    + env.Append(LINKFLAGS = ' -stdlib=libstdc++ ')
    if os.path.exists('/opt/local/lib'):
    # macports
    IncludePaths += ['/opt/local/include', '/opt/local/include/freetype2']

    I discovered the patch in danomatika’s unofficial fluxus mirror: https://github.com/danomatika/fluxus. It looks like a better starting point than the official sources at the moment.

    Reply
  4. Jean Paul

    JackOSX 32 bits, Racket 5.3.6 32 bits.
    At the point I have to type
    scons ADDONS=0
    it starts ok but fails :

    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    scons: *** [fluxa/fluxa] Error 1
    scons: building terminated because of errors.

    Reply

Leave a Reply to Jean Paul Cancel reply

Your email address will not be published. Required fields are marked *


nine − = 5

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>