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

8 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 🙂

  2. Thanks for the instructions!

    I wanted to ask why the tmp folder is required? Couldn’t we use cmake in the source code folder?
    And why do we name it tmp? It doesn’t seem to be temporary since it contains the compiled binaries.

    1. Because doing it this way will pollute the src directories with build files, and it makes it a lot harder to completely remove old build files and start fresh if something goes wrong, you upgrade your OS, etc…

      @key, ccmake isn’t even available on my ubuntu machine with cmake installed, so cmake is probably a better recommendation unless you are also installing whatever provides ccmake. Thanks for the docs!

    2. Actually after you use “make install” it will copy the respective binaries to path specified ccmake (INSTALL_DIR or CMAKE_INSTALL_PREFIX). So you don’t have to keep build folder after that.

  3. I did everything in the instructions step by step. Everything worked.
    But how can I open Opencascade now?

Leave a Reply to George Cancel reply

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