The core for the open cad platform OpenCascade can be a bit tricky to install on Linux due to the need to compile it yourself before installation (many different third party dependencies). Therefore a short step by step description for this can be found here for a clean installation of Ubuntu 18.04.

Information for other linux distributions and systems can be found in the internal dox catalogue in the git repository.

Start by opening the terminal in Ubuntu and installing general system packages needed:

sudo apt-get install software-properties-common
sudo apt-get install libtool autoconf automake gfortran gdebi
sudo apt-get install gcc-multilib libxi-dev libxmu-dev libxmu-headers
sudo apt-get install libx11-dev mesa-common-dev libglu1-mesa-dev
sudo apt-get install libfontconfig1-dev

The minimum requirements for third party dependencies to run OpenCascade itself is Freetype 2.5 and Tcl/TK 8.6.

Edit: To install Freetype 2.5 just run

sudo apt-get install libfreetype6 libfreetype6-dev

Freetype 2.5 does not come prepackaged to Ubuntu 18.04 so it has to be downloaded and installed manually in the terminal wit configure + make + make install

Tcl/TK 8.6 also comes as apt packages in Ubuntu 18.04 so they can be installed easily.

sudo apt-get install tcl tcl-dev tk tk-dev

Download the OpenCascade 7.4 source from the download center and place in the Downloads folder. Create a temp build folder and start the cmake wizard. Inspect suggested variables (shoud be prefilled) and start configuration with key c.

cd ~/Downloads
tar xf opencascade-7.4.0.tar.gz
mkdir tmp
cd tmp
ccmake ../Downloads/opencascade-7.4.0

Finish up with build and install

sudo make
sudo make install

4 thoughts on “How to install opencascade 7.4 on Ubuntu 18.04 LTS

  1. Thanks for this blogpost !

    Some improvement comments :
    – Paths in Linux use / not \
    – The Ubuntu freetype packages are libfreetype6 and libfreetype6-dev, use those instead of building yourself.
    – If you don’t want to use the packages and want to compile freetype for yourself, then it’s ./configure in the freetype block. Never use . in your search path.
    – The ‘make install’s will need a sudo before it. Never compile as root.
    – The opencascade make benefits from a flag like -j4 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *