Skip to content

Instantly share code, notes, and snippets.



Last active Jul 12, 2019
What would you like to do?
SOFA Ubtuntu 18.04 build steps

SOFA Soft Robots build on Ubuntu 18.04

Steps to install and build SOFA with soft robots from scratch on a fresh Ubuntu 18.04 virtual machine (windows host)

Naturally we start with update and installing git

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git

install dependencies

From linux build instructions here

build essentials, CMAKE and ccache

sudo apt-get install build-essential cmake cmake-qt-gui
sudo apt-get install ccache



sudo apt-get install libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev


sudo apt-get install python2.7-dev python-numpy python-scipy

Other libraries

sudo apt-get install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev
sudo apt-get install libxml2-dev libcgal-dev libblas-dev liblapack-dev libsuitesparse-dev libassimp-dev

QT - unified installer - downloaded file and make it executable

chmod a+x

Do not create an account. Under the latest version

  • check Desktop gcc 64-bit and qt charts

Building SOFA

Now we are following the soft robots build instructions instead here

sofa main

from home get latest unstable sofa

git clone -b master sofa/master/src/

this makes /home/james/sofa/master/src

soft robots plugin

from home again

git clone

STLIB plugin

git clone

cmake gui

cd to /home/james/sofa then run the cmake gui cmake-gui

  • point source to /home/james/sofa/master/src

  • point build directory to /home/james/sofa/build

  • Click generate and then use defaults "unix makefiles" and "use default native compilers"

  • add /home/james/STLIB;/home/james/SoftRobots; to SOFA_EXTERNAL_DIRECTORIES THE ORDER MATTERS





If you hit generate then we get errors because it cannot find qt, so use the instructions at the bottom here

  • click Add Entry then CMAKE_PREFIX_PATH with type path and then point to path /home/james/Qt/5.13.0/gcc_64

If you configure now you should get "Configuring done"

Hit Generate, and then in the build directory

make -j 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.