<!-- TITLE: Ubuntu --> <!-- SUBTITLE: Special instructions on compiling OpenSpace on Ubuntu --> # Developer Tools Install the following tools: - Git 2.7+ - GCC 7.1+ - CMake 3.8+ ## GCC You can install the newest GCC/G++ version via: ``` sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-7 g++-7 ``` If you don't want to install GCC 7.1 globally, you can overwrite the CMake options instead: ``` CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-7 CMAKE_CXX_FLAGS:STRING=-std=gnu++17 CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-7 ``` If you do want to change the defaults: [here](https://stackoverflow.com/questions/7832892/how-to-change-the-default-gcc-compiler-in-ubuntu) # Libraries Install the following libraries: - GLEW - SOIL is the recommended image library for Linux (`sudo apt-get install libsoil`). While FreeImage seems to work well with OpenSpace on other platforms, problems have been encountered while using this on Linux - Install other libraries using `sudo apt-get install <libname>`: * `libxrandr-dev` * `libxinerama-dev` * `xorg-dev` * `libcurl4-ssl-dev` (use `libcurl4-openssl-dev` if Ubuntu) * `libboost-dev` * `libboost-chrono-dev` * `libboost-system-dev` * `libboost-date-time-dev` * `libboost-thread-dev` * `libgdal-dev` # OpenSpace Obtain the source code (develop branch in this case) * `git clone --recursive https://github.com/OpenSpace/OpenSpace` * `cd OpenSpace` # Set up the build and run CMake * `mkdir build` * `cd build` * `cmake ..` * In CMake, run (c)onfigure and resolve any issues that are listed. * Run (g)enerate Makefile * `make` # Troubleshooting Make sure that you are using the correct version of gcc/g++ - Double check `CMAKE_CXX_COMPILER` and `/usr/bin/c++ --version` to be sure. It should be at least 7.1 Error: libstdc++.so.6: could not read symbols: Missing DSO from command line - Try using g++ instead of gcc. Error: GLSL 3.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES - `export MESA_GL_VERSION_OVERRIDE=4.3`