Build Mac

From emergent
Jump to: navigation, search
Emergent Logo
Installing and Building Emergent
  • Build from source (expert)

Build from Source, Mac

The standard Install Mac provides almost everything you need to also build the software from source -- start by doing this regular install. As of version 8.5 we have updated the emergent_install_mac_deps script to use the HomeBrew package management system for most of the dependencies -- if you haven't run that yet, it is recommended to get more automatic support for different OS versions etc.

Then follow these additional steps:

  • Install xcode -- it is a free download on the Mac AppStore:
  • Agree to the Xcode license, and then install the command-line tools and important include paths etc. Open a terminal window and execute these commands. You'll need to type "agree" after viewing the agreement that you didn't read.
sudo xcodebuild -license
xcode-select --install
  • You need to specify the path to QT5. Add the following line to your .bashrc or .bash_profile (or analogous) file in your home directory:
export QTDIR=/usr/local/Qt5.9.3/5.9.3/clang_64 

Open a new terminal window or source the .bashrc script and check that the command

which svn 

returns /usr/local/bin/svn

and that

echo $QTDIR

returns /usr/local/Qt5.9.3/5.9.3/clang_64

fatal error: 'QtCore/qsystemdetection.h' file not found

If you get this error reinstall the Xcode command line tools

xcode-select --install

then restart the build process from the emergent directory - using the "clean" option

./configure --qt5  --clean # (or do --help to see all the options)
cd build
sudo make install


  • If you're upgrading from earlier versions, it is recommended that you remove your entire emergent directory. Definitely at least include the 'clean' option to configure.
  • Download the source as detailed on the main page:
 svn checkout ~/emergent

Go to your emergent directory and do:

./configure qt5 webkit clean # (or do --help to see all the options) -- we are using webkit instead of webengine now to avoid a bug in webengine on Qt 5.9.3
cd build
sudo make install

Alternative builds

  • Build Mac Xcode -- use the xcode gui development environment
  • Build Mac Homebrew -- uses the homebrew packaging system to handle all the dependency libraries (we are mostly doing this already now) Bundle info

When you Install Mac it automatically installs an bundle in /Applications. The source for this bundle is in install_mac_app/ You can also go to that directory and type, open to run the software. If you want to create new ".app" bundles to link to different versions of emergent, you can just copy this directory (e.g., cp -av and go into the directory and change the symbolic link under Contents/MacOS/emergent and the Info.plist information. There are also .app bundles in the top level that link directly into the build and build_dbg directories, for running non-installed code as a bundle instead of just as a command-line app (this gives it proper gui menu focus etc): and

ccmake and install errors

If a file that was present during the last time cmake configured itself is subsequently removed, you'll get this kind of install error:

CMake Error at prog_lib/cmake_install.cmake:31 (file):
  file INSTALL cannot find
Call Stack (most recent call first):
  cmake_install.cmake:105 (include)

To fix this, in your build directory, do:

ccmake ../
then hit c (configure) and then g (generate) then e (exit)
sudo make install

Reference Information on Prerequisite Libraries

These are all the libraries that emergent depends upon -- on most Build procedures, these libraries are available as pre-compiled, easy-to-use packages of one form or another. This information is just for general reference and in case you want to update or otherwise do something special with a particular library.

Current versions of each relevant package are always available on our ftp site: or

The prerequisites are generally the same across operating systems but always check the operating system specific build instructions for version info.

Package Cur Version Main URL Download URL Docs URL
Qt (gui and OS api) 5.6.1 (LTS) (also works with old versions, back to 4.8 or so)
Coin & Quarter (3D scenegraph & Qt api) 3.1.3 We have our own patched version that is required: Coin3d Coin3d
ODE (Physics sim) 0.14
GSL (math library) 1.13
cmake (build system) 3.6.1 (NOTE: avoid anything before 2.8.4)
subversion (required from v6.2.0) 1.9.4 (use WANdisco, full package for mac, installs in /opt/subversion)
libsndfile (sound file load / save -- optional, needed for auditory) 1.0.26 n/a