Build Linux

From emergent
Revision as of 13:12, 24 December 2016 by Oreilly (Talk | contribs) (step 2 - build the quarter library and install the package)

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

Build from source on Ubuntu 14.04/16.04 (32 or 64 bit)

step 1 - get all the needed libraries

  • Note - the spelling of libgsl0 is libgs followed by the letter ‘L’ followed by a zero - has caught many people
sudo apt-get install aptitude 
sudo aptitude update -y 
sudo aptitude upgrade -y

sudo aptitude install -y qt5-default qttools5-dev libqt5webkit5-dev qtlocation5-dev libqt5designer5 qtdeclarative5-dev libqt5sensors5-dev qtmultimedia5-dev libqt5svg5-dev
sudo aptitude install -y libcoin80-dev cmake g++ libreadline6-dev libgsl0-dev zlib1g-dev
sudo aptitude install -y libpng12-dev libjpeg-dev libncurses5-dev libsvn-dev libsndfile1-dev mercurial python-pip subversion devscripts csh pkg-config

As the libode packages have been renamed between Ubuntu 14.04 and 16.04, then if you are on Ubuntu 14.04 you will need

sudo aptitude install -y libode-sp-dev

Or for Ubuntu 16.04:

sudo aptitude install -y libode-dev

step 2 - build the quarter library and install the package

svn checkout ~/emergent
  • For a 32 bit system change "_amd64.deb" to "_i386.deb". Also, the 48 stands for the svn revision, so that might be a higher number if changes have been made to quarter since this documentation was written.
sudo dpkg -i /tmp/libquarter0_1.0-50ubuntu1_amd64.deb  # the -50 number here might change -- was 48 -- just list the /tmp dir to see

step 3 - build emergent

cd ~/emergent
./configure --qt5 --clean
cd build
make -j4

step 4 - run emergent

The executable will be in ~/emergent/build/bin. Do:

make install

To install into /usr/local/bin/emergent -- Important: this process installs the new version of emergent in /usr/local/bin, but your installation from the package installs it in /usr/bin. Depending on whether or not you want to retain the older version, you can delete it, rename it, change your PATH, or specify the full path to run the new version. You may also need to change the library path as described in an earlier section.

Troubleshooting the Build Process

The following are some errors you may run into while building Emergent.

  • configure cannot find /usr/lib/x86_64-linux-gnu/
  • this may be a symbolic link to mesa/, and perhaps you installed the nvidia native binary driver, in which case you need to manually make symlinks from the* files in /usr/lib/ to this /usr/lib/x86_64-linux-gnu directory.
error: ld terminated with signal 9 [Killed]

This likely means that you do not have enough memory for the linker and either need to add memory or increase the size of your swap file. At least 2GB is recommended.

error: CPU you selected does not support x86-64 instruction set

This can be solved by re-running configure in non-native mode. Type:

cd ~/emergent && ./configure --not-native && cd build && make

warning: inline function ‘<some function>’ used but never defined [enabled by default]

You can ignore this error.

<something about> Wno-undefined-inline

You can ignore this error. It is a flag that prevents the above meaningless warnings about inline functions, but some versions of the compiler do not recognize it.

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