Installation/CGAL/FAQ

From OpenFOAMWiki

1 Introduction

This page aims to collect answers for frequently asked questions how to build CGAL, when using OpenFOAM's own makeCGAL script(s). Feel free to extend this page with more details.


2 Error message: "No rule to make target `/usr/.../libGL.so', needed by `lib/libCGAL_ImageIO.so....'"

Version
Known to happen with CGAL 4.
Reason
libCGAL_ImageIO.so is a library that isn't used by OpenFOAM and it might get built if the CMake build rules that CGAL uses pick up that OpenGL is supported on the current system, but then fails to find the correct libGL.so library.
Solution
The solution is to disable this option from being built at all, by running the following steps:
  1. Go into the ThirdParty folder by running this command:
    cd $WM_THIRD_PARTY_DIR
  2. Use the following command to disable this option:
    sed -e 's/\(Release\)/\1 -DWITH_CGAL_ImageIO=OFF/' makeCGAL
  3. Now it's possible to proceed with the installation instructions.