Ubuntu build instructions

Jean-Christophe Houde edited this page Jun 12, 2017 · 8 revisions

These instructions explain how the Fibernavigator can be built on Ubuntu 14.04. They should also be applicable to different Linux distros (i.e. Linux Mint).

Dependencies

Make sure to have a compiler installed:

sudo apt-get install -y g++ build-essential

To build the Fibernavigator, you will need to install CMake. We recommend installing version 3, since it is the current one. Please check if it is already available in your package manager. If it is not the case, such as for Ubuntu 14.04, you can get it by doing the following:

sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake cmake-qt-gui

If it already was available in your package manager, simply call:

sudo apt-get install cmake cmake-qt-gui

Install the required dependencies (NOTE: on Ubuntu 12.04, wxgtk3.0 is not directly available, see bottom of page for more information on the subject):

sudo apt-get install libgtk-3-dev libglew-dev freeglut3-dev zlib1g-dev libwxgtk3.0-dev

On a recent installation of Ubuntu 14.04, the following versions of the library should be installed:

  • libgtk-3-dev: 3.10.8
  • libglew-dev: 1.10.0-3
  • freeglut3: 2.8.1-1
  • libwxgtk3.0-dev: 3.0.0-2

Having more recent versions (for example, if installing on a newer version of Ubuntu) should not cause any major problem.

Building the Fibernavigator

  • Get the source code (normally, by cloning the code from this repository, or getting an archive of the code from the main page).
  • In the main directory, create a build directory at the same level as the src directory.
  • Start the CMake GUI (cmake-gui from the command line, or directly from the launcher)
  • In the Source field, insert the path to the src directory of the Fibernavigator.
  • In the Where to build the binaries field, insert the path to the build directory of the Fibernavigator.
  • Click on Configure.
  • Make sure that no error is shown.
  • If you have an error with the missing wx-config, you need to set the path to wx-config in wxWidgets_CONFIG_EXECUTABLE. If installed through synaptic, it should be in /usr/bin/wx-config. If compiled by the user, see the instructions at the bottom of the page.
  • Set the CMAKE_BUILD_TYPE variable to "Release" (without quotation marks). If this variable is not visible, toggle the "Advanced" mode.
  • Click on Configureagain.
  • Click on Generate to generate the build files.
  • Close the CMake GUI.
  • Go to a command line terminal, go inside the Fibernavigator build directory.
  • Type make to build the application.

If the build succeeds, your compiled Fibernavigator should be in the bin subdirectory.

In case wxwidget raises an error such as

error: #error This file requires compiler and library support for the ISO C++ 2011 standard. 
This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Simply edit the file src/CMakeLists.txt and change, in the Unix section, the

set(CMAKE_CXX_STANDARD 98)

line to

set(CMAKE_CXX_STANDARD 11)

And regenerate the cmake cache.

Getting wxWidgets 3.0 on Ubuntu 12.04:

You will need to be compile wxWidgets 3.0 by hand:

You will then need to specify the full path to this directory/build/wx-config to the CMake used for the Fibernavigator.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.