CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] cmake: command not found (https://www.cfd-online.com/Forums/openfoam-installation/203702-cmake-command-not-found.html)

ali_kerem July 4, 2018 11:05

cmake: command not found
 
Hello Everyone,

I'm trying to install OpenFoam-5.0 and ThirdParty-5.0 on Centos 7.5 x86_64.
I'm trying to follow this guide -> https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL

2.2 CentOS 7.4 (1708), after step 8 when I try to do step 9 it gives error about cmake;

./makeCGAL: line 274: cmake: command not found


when I try to do step 8 again it gives this output;

$ ./makeCmake
---------------
Already built: cmake-3.9.0


how to break this paradox?

fertinaz July 4, 2018 17:20

Did you refresh your bash environment by
Code:

wmRefresh

ali_kerem July 5, 2018 02:15

that does not change anything

fertinaz July 5, 2018 04:28

Try appending cmake/bin folder to your $PATH manually then. But this is weird.

olesen July 5, 2018 08:59

Quote:

Originally Posted by ali_kerem (Post 698178)
Hello Everyone,

I'm trying to install OpenFoam-5.0 and ThirdParty-5.0 on Centos 7.5 x86_64.
I'm trying to follow this guide -> https://openfoamwiki.net/index.php/I...CentOS_SL_RHEL

2.2 CentOS 7.4 (1708), after step 8 when I try to do step 9 it gives error about cmake;

./makeCGAL: line 274: cmake: command not found


when I try to do step 8 again it gives this output;

$ ./makeCmake
---------------
Already built: cmake-3.9.0


how to break this paradox?




See what "makeCGAL -help" tells you, perhaps it has a -cmake option too. In the 1712, 1806 versions (maybe earlier too) this will also examine the platforms/ directories when trying to resolve a particular cmake version.


/mark

ali_kerem July 5, 2018 10:43

Quote:

Originally Posted by fertinaz (Post 698219)
Try appending cmake/bin folder to your $PATH manually then. But this is weird.

after changing .bash_profile and trying again, it acts like CGAL installed I think but there is no makeCGAL step or anything in the guide or should i follow Centos 6.9 guide?


Code:

== 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 ...
-- Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIR)
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 "/home/aero/OpenFOAM/ThirdParty-5.0/build/linux64Gcc/CGAL-4.10/CMakeFiles/CMakeOutput.log".
+ exit 1

CMakeOutput.log doesn't have anything includes error



Quote:

Originally Posted by olesen (Post 698276)
See what "makeCGAL -help" tells you, perhaps it has a -cmake option too. In the 1712, 1806 versions (maybe earlier too) this will also examine the platforms/ directories when trying to resolve a particular cmake version.


/mark

makeCGAL -help does not help because it doesn't exist and I think makeCGAL step is missing in Centos 7.4 guide

wyldckat August 17, 2018 17:02

Greetings to all!


I'm late to this, but the problem with CMake is that OpenFOAM 5.0 had a bug in the file "etc/config.sh/paraview", which was reported here: https://bugs.openfoam.org/view.php?id=2648
This is also why I wrote the instructions at openfoamwiki to use 5.x instead of 5.0 ;)
If this is still a problem, then download this file https://github.com/OpenFOAM/OpenFOAM...ig.sh/paraview and replace the one at ... bah, here is the commands that do this for you:
Code:

mv $WM_PROJECT_DIR/etc/config.sh/paraview $WM_PROJECT_DIR/etc/config.sh/paraview.50
wget https://raw.githubusercontent.com/OpenFOAM/OpenFOAM-5.x/master/etc/config.sh/paraview -O $WM_PROJECT_DIR/etc/config.sh/paraview

wmRefresh

With this cmake is ready to be used.



As for the problem with CGAL, my guess is that it could be because the packages "mpfr-devel gmp-devel" were not installed or because the wrong CMake version was being used...


@ali_kerem: If you still have this issue and want to fix it, please let us know.


Best regards,
Bruno

vivek05 January 8, 2019 13:55

Hi

Quote:

Originally Posted by wyldckat (Post 703032)
Greetings to all!
[CODE]mv $WM_PROJECT_DIR/etc/config.sh/paraview $WM_PROJECT_DIR/etc/config.sh/paraview.50
wget https://raw.githubusercontent.com/OpenFOAM/OpenFOAM-5.x/master/etc/config.sh/paraview -O $WM_PROJECT_DIR/etc/config.sh/paraview

I am also facing same kind of error despite following the above steps.

when making ./makeCGAL
PHP Code:

removing old build directory
    
/home/vvmk/OpenFOAM/ThirdParty-5.0/build/linux64Gcc48/CGAL-4.10
----
Configuring CGAL-4.10 with boost 105500
    Source         
: /home/vvmk/OpenFOAM/ThirdParty-5.0/CGAL-4.10
    Build          
: /home/vvmk/OpenFOAM/ThirdParty-5.0/build/linux64Gcc48/CGAL-4.10
    Target         
: /home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/CGAL-4.10
    ThirdParty     
boost
    ThirdParty     
gmp/mpfr
----
cmake -DCMAKE_INSTALL_PREFIX=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/CGAL-4.10 -DCMAKE_BUILD_TYPE=Release -DWITH_CGAL_Qt5=OFF -DBoost_INCLUDE_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/include -DBoost_LIBRARY_DIRS=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/lib -DBoost_THREAD_LIBRARY=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/lib/libboost_thread.so -DBoost_THREAD_LIBRARY_RELEASE=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/lib/libboost_thread.so -DBoost_SYSTEM_LIBRARY=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/lib/libboost_system.so -DBoost_SYSTEM_LIBRARY_RELEASE=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc48/boost_1_55_0/lib/libboost_system.so -DBoost_VERSION=105500 -DGMP_INCLUDE_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/gmp-5.1.2/include -DGMP_LIBRARIES_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/gmp-5.1.2/lib64 -DGMP_LIBRARIES=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/gmp-5.1.2/lib64/libgmp.so -DGMPXX_INCLUDE_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/gmp-5.1.2/include -DGMPXX_LIBRARIES=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/gmp-5.1.2/lib64/libgmpxx.so -DMPFR_INCLUDE_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/mpfr-3.1.2/include -DMPFR_LIBRARIES_DIR=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/mpfr-3.1.2/lib64 -DMPFR_LIBRARIES=/home/vvmk/OpenFOAM/ThirdParty-5.0/platforms/linux64/mpfr-3.1.2/lib64/libmpfr.so /home/vvmk/OpenFOAM/ThirdParty-5.0/CGAL-4.10
./makeCGALline 274cmakecommand not found
+ exit 

could you clarify this?

wyldckat January 8, 2019 17:56

Quote:

Originally Posted by vivek05 (Post 721303)
could you clarify this?

Quick questions:
  1. Which installation instructions are you following?
  2. Which Linux Distribution are you using?

vivek05 January 8, 2019 20:27

Thanks Bruno for reply

I am trying to install OpenFOAM-5.0 in my hpc account.
I am using Red Hat Enterprise Linux

----
Sorry for the typo

*hpc account

wyldckat January 9, 2019 18:26

Quick question: Which version of Redhat Enterprise Linux? If you don't know how to find out, run the following command:
Code:

uname -a

vivek05 January 10, 2019 04:28

Quote:

Originally Posted by wyldckat (Post 721468)
Quick question: Which version of Redhat Enterprise Linux? If you don't know how to find out, run the following command:
Code:

uname -a

Thanks Bruno!!

Finally installed OpenFoam 5.0
Error was due to Cmake compilation
After compiling Cmake , I executed ./makeCGAL it's done without any error
[emoji3] [emoji4]

Monrah September 3, 2019 16:27

Quote:

Originally Posted by vivek05 (Post 721509)
Thanks Bruno!!

Finally installed OpenFoam 5.0
Error was due to Cmake compilation
After compiling Cmake , I executed ./makeCGAL it's done without any error
[emoji3] [emoji4]




How did you compile cmake?
I've used ./makeCmake command to build the cmake3.9.0. After the it is showing that cmake is build, if I use commands like make, then it says that cmake-3.9.0 is already built.
But when I use ./makeCGAL then it says that cmake command not found.
What should I do to compile cmake successfully? And I am installing openfoam5.0 on my lab cluster.

Any help regarding this?


All times are GMT -4. The time now is 20:31.