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] 3.0.x ParaView compiling error Fedora 24 (https://www.cfd-online.com/Forums/openfoam-installation/175841-3-0-x-paraview-compiling-error-fedora-24-a.html)

rsa August 6, 2016 03:56

3.0.x ParaView compiling error Fedora 24
 
Hi,

I am trying to install openfoam 3 in fedora 24 using the following link:

https://openfoamwiki.net/index.php/I...M-3.0.x/Fedora

but when I run the makeparaview4 command I get the following error:
-----------------------------------------------------------------------------------------------------
CMake Error at VTK/CMake/vtkCompilerExtras.cmake:47 (if):
if given arguments:

"gcc: error: ARGS: No such file or directory

gcc (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)
-----------------------------------------------------------------------------------------------------
it seems the current gcc comiler and cmake does not go together! can anyone help me with this?

rsa August 6, 2016 08:31

I found a solution and I m gonna post it just in case:

there are two files "vtkCompilerExtras.cmake" and "GenerateExportHeader.cmake" which you can find by "find THIRDPARTY_FOLDER -name xxx". open both of them and change the following lines:

string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"

by adding simply a "6" after "345" so that the line looks like the following:

string (REGEX MATCH "[3456]\\.[0-9]\\.[0-9]*"

wyldckat September 11, 2016 13:15

Quick answer: Many thanks for posting the solution you've found. I've copy-paste-adapted the instructions on the wiki based on your findings and this bug report: http://bugs.openfoam.org/view.php?id=2098

Instructions are now here: https://openfoamwiki.net/index.php/I...dora#Fedora_24

rahulksoni July 18, 2017 06:34

Thanks thanks thanks a lot

sandeep.pandey November 22, 2017 09:40

This continues in OpenFOAM 4.1 with Ubuntu 17.10 with default gcc version 7.x, therefore, I follow your instructions and just added: "7" after "3456" in both the files and surprisingly it works! Thanks :)

Tip to other users, you can check gcc version by: gcc --version

Lisandro Maders August 20, 2018 11:42

Hi,

samething for OpenFOAM v1606+ in Ubuntu 18.04.

Needs to replace 3-6 by 3-7 for gcc version greater than 6.*.

Thanks!

dduque November 12, 2018 05:14

Cool!


Just a note: no need to look for those files and line numbers, since ccmake clearly points those out. E.g. :



Code:

CMake Error at VTK/CMake/GenerateExportHeader.cmake:178 (if):

Just make sure you go to the source paraview dir, not the one you are building from.


Also, I had to go up to number 8 now. I guess the most elegant thing is to write "3-8", intead of "3456768".


( BTW I am trying to compile version 4.4 of paraview, since most recent ones won't run in my current system --- openGL issues.)

wyldckat November 12, 2018 17:02

Quote:

Originally Posted by dduque (Post 714931)
( BTW I am trying to compile version 4.4 of paraview, since most recent ones won't run in my current system --- openGL issues.)

Quick note: If you are compiling from source code, ParaView 5.4 still supports the old OpenGL rendering, as long as the correct settings are used. If you are trying to compile ParaView along with OpenFOAM 5 or 6, check the options available for makeParaView by running with the option "-help". I'm not certain, but I believe that OpenFOAM+ has a similar feature... but may be providing a more recent version of ParaView.

dduque November 13, 2018 04:23

Quote:

Originally Posted by wyldckat (Post 715003)
Quick note: If you are compiling from source code, ParaView 5.4 still supports the old OpenGL rendering, as long as the correct settings are used. If you are trying to compile ParaView along with OpenFOAM 5 or 6, check the options available for makeParaView by running with the option "-help". I'm not certain, but I believe that OpenFOAM+ has a similar feature... but may be providing a more recent version of ParaView.


Thanks! As a matter of fact, I did succeed in compiling ParaView v5.3. I know they took away legacy openGL about one year ago, I was conservative in choosing 5.3 since I was not sure which was the latest version. It's quite easy to choose the right setting with e.g. ccmake. Just go to the "VTK_RENDERING_BACKEND" option and change it. After some configuration steps, a Makefile is generated. The compilation is not too long if run in parallel ("make -j 4", or as much cores as you have available).


My paraview is independent of openfoam. I usually run "touch cc.openfoam; paraview cc.openfoam & ".


A note: the resulting paraview executable cannot be moved from its folder ! Just make an alias to it. In my case: "alias paraview='~/Downloads/paraview/bin/paraview' " (yup, that's where it ended).




Also, I am on manjaro linux -- this sort of procedure should work on any linux system, I think.


All times are GMT -4. The time now is 22:38.