CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[] Openfoam 5 on centos 7, environment variables issue

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2018, 15:28
Default Openfoam 5 on centos 7, environment variables issue
Join Date: Mar 2016
Posts: 33
Rep Power: 10
mahmoodn is on a distinguished road
I am trying to install Openfoam 5 on a centos 7 box. I followed the steps on the wiki pages with the following commands:

cd /share/apps
mkdir OpenFOAM
cd OpenFOAM/
wget "" -O OpenFOAM-5.0.tgz
wget "" -O ThirdParty-5.0.tgz 
tar -xzf OpenFOAM-5.0.tgz
tar -xzf ThirdParty-5.0.tgz
mv OpenFOAM-5.x-version-5.0 OpenFOAM-5.0
mv ThirdParty-5.x-version-5.0 ThirdParty-5.0
cd ThirdParty-5.0
mkdir download
wget -P download
wget -P download
wget -P download
tar -xzf download/cmake-3.9.0.tar.gz
tar -xJf download/CGAL-4.10.tar.xz
tar -xjf download/boost_1_55_0.tar.bz2

cd ..
sed -i -e 's/\(boost_version=\)boost-system/\1boost_1_55_0/' OpenFOAM-5.0/etc/
sed -i -e 's/\(cgal_version=\)cgal-system/\1CGAL-4.10/' OpenFOAM-5.0/etc/
echo "alias of50='source /share/apps/OpenFOAM/OpenFOAM-5.0/etc/bashrc $FOAM_SETTINGS'" >> $HOME/.bashrc
source ~/.bashrc
wget ""
wget ""
wget ""
chmod +x get* make*
./getGcc gcc-4.8.5 gmp-5.1.2 mpfr-3.1.2 mpc-1.0.1
./makeGcc -no-multilib gmp-5.1.2 mpfr-3.1.2 mpc-1.0.1 gcc-4.8.5
./makeBinutils gcc-4.8.5
#change version of cmake to 3.9.0 in makeCmake
At the last command, ./makeCGAL, I get an error that cmake: no such file
I opened makeCGAL and added the full path of the cmake instead of the cmake command only. Then I got another error which says can not find GMP.

== Set up flags ==
-- Build type: Release
-- USING CXXFLAGS = ' -frounding-math -O3 -DNDEBUG'
== Set up flags (DONE) ==

== Detect external libraries ==
-- External libraries supported: GMP;GMPXX;MPFR;ZLIB;OpenGL;LEDA;MPFI;RS;RS3;OpenNL;Eigen3;BLAS;LAPACK;QGLViewer;ESBTL;Coin3D;NTL;IPE
-- Preconfiguring library: GMP ...
CMake Error at cmake/modules/CGAL_SetupDependencies.cmake:66 (message):
  CGAL requires GMP to be found
Call Stack (most recent call first):
  CMakeLists.txt:681 (include)

-- Configuring incomplete, errors occurred!
See also "/share/apps/OpenFOAM/ThirdParty-5.0/build/linux64Gcc48/CGAL-4.10/CMakeFiles/CMakeOutput.log".
+ exit 1
[root@rocks7 ThirdParty-5.0]# ls
Allclean          build        etc          makeBinutils    makeLLVM      README.html
Allwmake          CGAL-4.10    gcc-4.8.5    makeCGAL        makeParaView
AllwmakeLibccmio  cmake-3.9.0  getBinutils  makeCmake       mpc-1.0.1     README_scotch
binutils-2.23     COPYING      getGcc       makeGcc         mpfr-3.1.2    scotch_6.0.3
boost_1_55_0      download     gmp-5.1.2    makeGperftools  platforms
It seems that the paths are not set correctly. Any idea about that?
mahmoodn is offline   Reply With Quote

Old   October 5, 2020, 22:45
New Member
Join Date: Sep 2019
Posts: 6
Rep Power: 6
zhaobo is on a distinguished road
So, have you solved it yet? I come up with the same problem.
zhaobo is offline   Reply With Quote

Old   October 6, 2020, 08:52
Senior Member
Mark Olesen
Join Date: Mar 2009
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Originally Posted by zhaobo View Post
So, have you solved it yet? I come up with the same problem.
Even if you compile CGAL in headers-only mode, it still seems to require gmp and mprf development headers. One of the first things you can do would be to disable CGAL. Edit the etc/ file to indicate 'none'. Refresh the environment and continue to build. Leaving out CGAL will only remove the foamy mesher, which not many people use anyhow.

However, I would suggest using a new version of OpenFOAM. Since you are using CentOS-7, you could use the copr build of OpenFOAM-v1912 or OpenFOAM-v2006:

This should save you a considerable amount of time.
olesen is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 05:40
[] OpenFOAM 3.01 on Centos 5.11 - MPI Issue vmgbritt OpenFOAM Installation 4 September 15, 2016 14:42
[] Paraview install failing (With OpenFOAM 3.0.0 and CentOS 7) davidrobinson50 OpenFOAM Installation 1 June 2, 2016 17:54
how to add OpenFoam in module environment smpark OpenFOAM 4 May 12, 2011 14:00
OpenFOAM 1.5.x package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 7 July 30, 2009 03:14

All times are GMT -4. The time now is 21:02.