Menu

SDK_Build_Environment_for_Linux_Platform

There is a newer version of this page. You can find it here.

SDK Build Environment for Linux Platform

This page discusses how to build the Magic Lantern SDK for Linux platforms using the C++ implementation.

Dependencies

The Linux build of the Magic Lantern SDK has the following dependencies:

  1. Ubuntu 14.04 LTS 64-bit operating system.
  2. Eclipse IDE for C/C++ Developers (Mars Release 4.5.0)
  3. GNU g++ toolchain (sudo apt-get install g++).
  4. Version 8.6.4.1 of ActiveTcl from ActiveState is installed. This build environment has been tested with binary build 299124.
    • Instructions assume that the installation directory is ~/bin/ActiveTcl-8.6.
    • Tcl is required by the mastering process to create a Digital Playprint.
    • The most recent version can be found at http://www.activestate.com/activetcl/downloads
  5. Version 2.4.4 of Coin 3D is built and installed.
    • Instructions assume that the installation directory is ~/bin/Coin3D.
    • Coin3D is an implementation of the SGI Inventor framework. It is required by the Magic Lantern Rehearsal Player. Note that the Rehearsal Player will be bound to the GNU General Public License if built with Coin3D. Alternative options are currently being investigated.
    • The most recent version can be found at http://www.coin3d.org/lib/downloads .
    • To build the source, use the instructions on [Building_Coin].
  6. Version 1.3.0 of SoXt is built and installed.
  7. Version 3.1.5.0 of FreeImage

Assumptions

These instructions assume the following

  • You already know how to bring up the Ubuntu 14.04 LTS 64-bit host development platform.
  • You already know how to install packages in Ubuntu using the apt-get utility.
  • You already know how to use the Eclipse for C/C++ Development IDE.
  • You already know how to use Subversion and Git.
  • The Magic Lantern software has been downloaded into the "~/Projects/MagicLantern" directory and the MLE_HOME environment variable is set to "~/Projects/MagicLantern".

Environment Variables

MLE_HOME Environment Variable

Set the variable MLE_HOME to reference the home of the Magic Lantern source. This document assumes that it is set to "$HOME/Projects/MagicLantern".

MLE_ROOT Environment Variable

Set the variable MLE_ROOT to reference the root directory where the Magic Lantern components will be installed. This document assumes that it is set to "/usr/local".

MLE_WORKPRINTS Environment Variable

Set the variable MLE_WORKPRINTS to the root directory where Magic Lantern Digital Workprints can be located. This document assumes that it is set to $HOME/Projects/MagicLantern.

The Magic Lantern Studio assumes that the Digital Workprints will be located under the $MLE_WORKPRINTS/workprints directory.

TCL_HOME Environment Variable

Set the TCL_HOME variable to the installation directory for ActiveTcl. For these instructions, use ~/bin/ActiveTcl-8.6.

COINDIR Environment Variable

Set the COINDIR variable to the installation directory for Coin3D. For these instructions, use ~/bin/Coin3D.

FREEIMAGEDIR Environment Variable

Set the FREEIMAGEDIR variable to the installation directory for FreeImage. For these instructions, use ~/bin/FreeImage/Dist.

Details

To build the Magic Lantern components using the Eclipse C/C++ toolchain, use the following instructions.


Install Subversion

Subversion is used for source code management. To install, use:

$ sudo apt-get install subversion


Install Toolchain

The following build toolchain is required:

$ sudo apt-get install build-essential g++ automake autoconf gnu-standards autoconf-doc libtool gettext autoconf-archive gawk libxt-dev


Install Java SDK

The Java Development Kit is required to run the Eclipse IDE. These instructions may be used to install the JDK on an Ubuntu 14.04 LTS platform.

Download JDK 7u79 from Oracle:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Note that we are currently running with jdk-7u79-linux-i586.tar.gz (jdk-7u79-linux-x64.tar.gz for 64-bit platform).

Execute the following commands to reference the new JDK environment:

$ sudo mkdir /opt/java
$ sudo tar zxvf jdk-7u79-linux-i586.tar.gz -C /opt/java
$ sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.7.0_79/bin/java 0
$ sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.7.0_79/bin/javac 0
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

Update the environment by appending the following to "~/.bashrc":

export JAVA_HOME=/opt/java/jdk1.7.0_79
export PATH=$JAVA_HOME/bin:$PATH


Install Eclipse IDE for C/C++ Developers

The Eclipse development toolchain needs to be installed in the Ubuntu host development platform:

  1. tar -xvzf eclipse-inst-linux64.tar.gz -C ~/bin
  2. cd ~/bin/eclipse-installer
  3. ./eclipse-inst
  4. Choose "Eclipse IDE for C/C++ Developers" from the list of choices in eclipseinstaller dialog.
  5. Modify the configuration parameters in the C/C++ IDE installation page (if desired) and select INSTALL.

Install Active TCL

TCL is a requirement for the Magic Lantern mastering tools.

  1. tar -xvzf ActiveTcl8.6.4.1.299124-linux-x86_64-threaded.tar.gz -C ~/bin
  2. cd ~/bin/ActiveTcl8.6.4.1.299124-linux-x86_64-threaded
  3. sudo ./install.sh
  4. Follow the instructions in the installation dialogs.

Retrieve the Source

Using subversion, retrive the Magic Lantern source:

$ svn checkout svn://svn.code.sf.net/p/wz-mle/code/trunk wz-mle-code


Build the Core util Library for Tools

These instructions build the Core util libraries for the Magic Lantern Studio tools using the Eclipse IDE.

  • Eclipse Project: "$MLE_HOME/Core/util/linux/build/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlutil project.

In the Eclipse ProjectExplorer, right-click on the libmlutil project and select "Build Project" from the pop-up menu.

Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/Core/util/linux/build") and then run "make distclean").

To install the library, right-click on the libmlutil project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built include

Library Directory Location Component
libmlutil.a "$MLE_ROOT/lib" Magic Lantern SDK (Debug)
libmlutil.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Core math Libraries

These instructions build the Core math libraries for the Magic Lantern Studio tools, the Magic Lantern SDK for the OpenGL target, and the Magic Lantern Rehearsal Player. The Eclipse IDE development tool is used.

  • Eclipse Makefile: "$MLE_HOME/Core/math/linux/libmlmath/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlmath project.

In the Eclipse ProjectExplorer, right-click on the libmlmath project and select "Build Project" from the pop-up menu.

Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/Core/math/linux/libmlmath") and then run "make distclean").

To install the library, right-click on the libmlmath project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built for the Magic Lantern SDK (OpenGL Target Platform) include

Library Directory Location Component
libmlmath.a "$MLE_ROOT/lib/" Magic Lantern SDK (Debug)
libmlmath.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Digital Workprint Libraries

These instructions build the Digital Workprint libraries for the Magic Lantern Studio tools and Rehearsal Player using the Eclipse IDE.

  • Eclipse Makefile: "$MLE_HOME/DigitalWorkprint/lib/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libDWP project.

In the Eclipse ProjectExplorer, right-click on the libDWP project and select "Build Project" from the pop-up menu.

Note: Before building, you may need to first regenerate the autoconf environment. The easiest way to do this is from the command line. In a terminal, change to the project directory (i.e. "cd $MLE_HOME/DigitalWorkprint/lib/linux") and then run "make distclean").

To install the library, right-click on the libDWP project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built for the Magic Lantern SDK (OpenGL Target Platform) include

Library Directory Location Component
libDWP.a "$MLE_ROOT/lib/" Magic Lantern SDK (Debug)
libDWP.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.

The executable components that are built for the Magic Lantern SDK include

Executable Directory Location Component
DWPChecker.exe "$MLE_ROOT/bin" DWP Validation tool, Magic Lantern Studio (Debug)

where MLE_ROOT is currently /usr/local.


Build the Digital Playprint Libraries

These instructions build the Digital Playprint libraries for the Magic Lantern Studio tools using the Eclipse IDE.

  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/lib/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libDPP project.

In the Eclipse ProjectExplorer, right-click on the libDPP project and select "Build Project" from the pop-up menu.

To install the library, right-click on the libDPP project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built for the Magic Lantern Studio include

Library Directory Location Component
libDPP.a "$MLE_ROOT/lib" Magic Lantern SDK (Debug)
libDPP.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Digital Playprint Runtime Library for Tools

These instructions explain how to build the Digital Playprint runtime component employed by the Magic Lantern Studio mastering tools using the Eclipse IDE.

  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/runtime/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libplayprint project.

In the Eclipse ProjectExplorer, right-click on the libplayprint project and select "Build Project" from the pop-up menu.

To install the library, right-click on the libplayprint project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built for the Magic Lantern Studio include

Library Directory Location Component
libplayprint.a "$MLE_ROOT/lib" Magic Lantern SDK (Debug)
libplayprint.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Mastering Library and Tools

These instructions explain how to build the Digital Playprint library employed by the Magic Lantern Studio mastering tools. It also explains how to build the mastering tools.

  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/libDPPGen/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/gentables/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/gengroup/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/genscene/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/genmedia/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/genmakefile/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/genppscript/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/gendpp/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/dumpgroup/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/dumpscene/.project"
  • Eclipse Makefile: "$MLE_HOME/DigitalPlayprint/master/linux/dumpmedia/.project"

Import the above Eclipse projects by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above Eclipse project.

In the Eclipse ProjectExplorer, right-click on the Eclipse project and select "Build Project" from the pop-up menu.

To install the library, right-click on the Eclipse project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built include

Library Directory Location Component
libDPPGen.a "$MLE_ROOT\lib" Magic Lantern Studio Mastering Library (Debug)
libDPPGend.so "$MLE_ROOT\lib\" Magic Lantern Studio Mastering Library (Debug)

where MLE_ROOT is currently /usr/local.

The executable tools that are built include

Exectuable Directory Location Component
gentables.exe "$MLE_ROOT\bin" Generates the tables (source code) for the title (Debug)
gengroup.exe "$MLE_ROOT\bin" Generates the Group chunks for the DPP (Debug)
genscene.exe "$MLE_ROOT\bin" Generates the Scene chunks for the DPP (Debug)
genmedia.exe "$MLE_ROOT\bin" Generates the MediaRef chunks for the DPP (Debug)
gendppscript.exe "$MLE_ROOT\bin" Generates a TCL script for laying out the DPP (Debug)
gendpp.exe "$MLE_ROOT\bin" Generates a DPP using the TCL script (Debug)
dumpgroup.exe "$MLE_ROOT\bin" Dump the contents of a Group chunk (Debug)
dumpmedia.exe "$MLE_ROOT\bin" Dump the contents of a MediaRef chunk (Debug)
dumpscene.exe "$MLE_ROOT\bin" Dump the contenst of a Scene chunk (Debug)
genmakefile.exe "$MLE_ROOT\bin" Generates a Makefile for the title (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern Runtime Engine Libraries

These instructions build the Magic Lantern SDK Runtime Engine libraries for the OpenGL platform using the Eclipse IDE.

  • Eclipse Makefile: "$MLE_HOME/Core/mlert/linux/rehearsal/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above libmlert project.

In the Eclipse ProjectExplorer, right-click on the libmlert project and select "Build Project" from the pop-up menu.

To install the library, right-click on the libmlert project and select "Make Targets->Build..." from the pop-up menu. This will bring up a dialog panel showing the possible Make Targets for this project. Select "install" from Target list and then complete the action by selecting the "Build" button.

The library components that are built for the Magic Lantern Studio include

Library Directory Location Component
libmlert.a "$MLE_ROOT/lib" Magic Lantern SDK (Debug)
libmlert.so "$MLE_ROOT/lib" Magic Lantern SDK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern Authoring Toolkit (ATK)

These instructions build the Magic Lantern Studio Authoring Toolkit for the Inventor platform.

  • Eclipse Makefile: "$MLE_HOME/ATK/linux/rehearsal/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above rehearsal project.

In the Eclipse ProjectExplorer, right-click on the libmleatk project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
libmleatk.a "$MLE_ROOT/lib" Magic Lantern Studio ATK (Debug)
libmleatk.so "$MLE_ROOT/lib" Magic Lantern Studio ATK (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern SDK Properties Distribution

These instructions discuss how to build the Properties and Digital Workprints for Magic Lantern SDK.

  1. Open a shell that is compatible with the Wizzer Works development environment (e.g. Bash).
  2. cd $MLE_HOME/Parts/props/linux
  3. make install

This distributes the props header files to "$MLE_ROOT/include/mle" and the props workprint files to "$MLE_ROOT/include/workprints".

Note: the current Makefiles are based on the Wizzer Works ISM (Independent Software Module) scripts and require them to be installed in the $MLE_ROOT/include/make directory. To install the ISM scripts, simply copy $MLE_HOME/include/make directory to $MLE_ROOT/include/make.


Build the Magic Lantern SDK Roles

These instructions build the Magic Lantern Roles for the Inventor (Rehearsal) platform.

  • Eclipse Makefile: "$MLE_HOME/Parts/roles/inventor/build/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MleIvRoles project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
libivroles.a "$MLE_ROOT/lib" Magic Lantern Studio SDK (Debug)
libivroles.so "$MLE_ROOT/lib" Magic Lantern Studio SDK (Debug)
MleIv2dRole.a "$MLE_ROOT/lib" Magic Lantern Studio 2D Role for Inventor target (Debug)
MleIv2dRole.so "$MLE_ROOT/lib" Magic Lantern Studio 2D Role for Inventor target (Debug)
MleIv3dRole.a "$MLE_ROOT/lib" Magic Lantern Studio 3D Role for Inventor target (Debug)
MleIv3dRole.so "$MLE_ROOT/lib" Magic Lantern Studio 3D Role for Inventor target (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern SDK Sets

These instructions build the Magic Lantern Sets for the Inventor (Rehearsal) platform.

  • Eclipse Makefile: "$MLE_HOME/Parts/sets/inventor/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MleIvSets project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
MleIvSet.a "$MLE_ROOT/lib" Magic Lantern Studio Set for Inventor target (Debug)
MleIvSet.so "$MLE_ROOT/lib" Magic Lantern Studio Set for Inventor target (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern SDK MediaRefs

These instructions build the Magic Lantern MediaRefs for the Inventor (Rehearsal) platform.

  • Eclipse Makefile: "$MLE_HOME/Parts/mediaref/rehearsal/build/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MleMediaref project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
Mle3dModelMediaref.a "$MLE_ROOT/lib" 3D Model MediaRef for Inventor target (Debug)
Mle3dModelMediaref.so "$MLE_ROOT/lib" 3D Model MediaRef for Inventor target (Debug)
Mle3dTextureMapMediaref.a "$MLE_ROOT/lib" 3D Texture Map MediaRef for Inventor target (Debug)
Mle3dTextureMapMediaref.so "$MLE_ROOT/lib" 3D Texture Map MediaRef for Inventor target (Debug)
Mle3dColorMapMediaref.a "$MLE_ROOT/lib" 3D Color Map MediaRef for Inventor target (Debug)
Mle3dColorMapMediaref.so "$MLE_ROOT/lib" 3D Color Map MediaRef for Inventor target (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern SDK Stages

These instructions build the Magic Lantern Stages for the Inventor (Rehearsal) platform.

  • Eclipse Makefile: "$MLE_HOME/Parts/stages/rehearsal/build/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MleIvStage project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
MleIvtage.a "$MLE_ROOT/lib" Stage for Inventor target (Debug)
MleIvStage.so "$MLE_ROOT/lib" Stage for Inventor target (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern SDK Actors

These instructions build the Magic Lantern Actors for the Inventor (Rehearsal) platform.

  • Eclipse Makefile: "$MLE_HOME/Parts/actors/rehearsal/build/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MleActors project and select "Build Project" from the pop-up menu.

The library components that are built include

Library Directory Location Component
MleEscapeActor.a "$MLE_ROOT/lib" Escape Key Actor (Debug)
MleEscapeActor.so "$MLE_ROOT/lib" Escape Key Actor (Debug)
Mle3dCameraActor.a "$MLE_ROOT/lib" 3D Camera Actor (Debug)
Mle3dCameraActor.so "$MLE_ROOT/lib" 3D Camera Actor (Debug)
Mle2dImageActor.a "$MLE_ROOT/lib" Image Actor(Debug)
Mle2dImageActor.so "$MLE_ROOT/lib" Image Actor (Debug)

where MLE_ROOT is currently /usr/local.


Build the Magic Lantern Rehearsal Player

These instructions build the Magic Lantern Rehearsal Player.

  • Eclipse Makefile: "$MLE_HOME/Players/rehearsal/build/linux/.project"

Import the above Eclipse project by selecting "File->Import...". This will bring up a Import dialog where you can choose "Existing Projects into Workspace" under the "General" tree item. Select "Next>" button to continue and browse to the above linux project.

In the Eclipse ProjectExplorer, right-click on the MlePlayers project and select "Build Project" from the pop-up menu.

The executable components that are built include

Library Directory Location Component
player "$MLE_ROOT/bin" Magic Lantern Rehearsal Player (Debug)

Note: Make sure that $MLE_ROOT\bin is in your environment PATH.

Unit Testing

Magic Lantern uses the Google Test framework to perform unit testing. For more information on setting up Google Test and executing test cases developed for Magic Lantern, please go to

[Unit_Testing_for_Linux_Platform]


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.