CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   OpenFOAM 15 and CentOS 52 installation issues (https://www.cfd-online.com/Forums/openfoam-bugs/62387-openfoam-15-centos-52-installation-issues.html)

remrich November 6, 2008 07:46

I had to install OpenFOAM 1.5
 
I had to install OpenFOAM 1.5 on CentOS 5.2. x86_64.

I like to share my experiences and address some issues.

1.) First of all the supplied gcc-4.3.1 doesn't work because it's dependency to a shared libmpfr.
Please build gcc against static versions of gmp and mpfr. So I had to built my own gcc-4.3.1.

2.) Building Qt 4.3.5 from sources was easy. I decided to install into the gcc-4.3.1 directory so you don't need an additional PATH and LD_LIBRARY_PATH entry. Configure options are ./configure -prefix $WM_COMPILER_DIR -prefix-install

3.) Building Paraview and PVFoamReader.
Here the nightmare began.
To cut a long story short, the root cause of my problems is the way the cmake build system is configured.
The libraries and executables are linked with /usr/lib64 in the rpath. This is anoying and completly wrong! This prevents LD_LIBRARY_PATH to have any effect, because the system library path is searched first! So don't ever do this!
Because I don't know anything about the cmake build system I had to edit the build.make, link.txt and relink.txt scripts by hand after cmake execution.
Afterwards executing make and "make install" gave me a working Paraview.
For the PVFoamReader it's the same. Here i took a manual linking step for the two executables.

So now I have a working OpenFOAM 1.5 installation.
Dear Developers, please change the cmake build according to my suggestions. This will make building OpenFOAM from source easy on nearly every Linux distribution!

If someone prefer to have Qt installed seperatly from the gcc installation that's also easy. You only have to add a PATH and LD_LIBRARY_PATH entry pointing to the installations bin and lib path.

Best regards
Rainer

henry November 6, 2008 08:16

We developed the wmake build s
 
We developed the wmake build system for OpenFOAM. cmake is the build system developed for VTK and ParaView by KitWare and we do not have any control over how it operates. To compensate for some of it's limitations we pass the files it generates through a script but this is not very satisfactory. Have you contacted KitWare about the problems you are having with cmake?

H

olesen November 6, 2008 08:24

Hi Rainer, I think we've al
 
Hi Rainer,

I think we've all had our pain with cmake.
Did you use the supplied bin/buildParaView3.3-cvs script? I think it manages to deal with some of the hard links problems.

remrich November 6, 2008 08:39

Hi Mark, yes I used the bui
 
Hi Mark,

yes I used the buildParaView3.3-cvs script.
But that doesn't solve the Problem as you may check with "chrpath -l".

remrich November 6, 2008 08:50

Henry, I don't have the tim
 
Henry,

I don't have the time to investigate further at the moment. I had a short look into the cmake manual. I think there are some options to control the behavior for the RPATH settings.
But I don't know if it's possible to give these as command line options.

henry November 6, 2008 10:14

If you find a way to avoid the
 
If you find a way to avoid the way cmake annoyingly hard-codes paths please let us know, we have been agonizing over this for some years now.

Thanks

H

mattijs November 6, 2008 13:25

There is a fix in the 1.5.x ve
 
There is a fix in the 1.5.x version of the buildParaView3.3-cvs script which sets the VTK_USE_RPATH to off. This will have the executables not use rpath.

Our problem with cmake is that it generates files with absolute paths which as a result would not work anywhere else. The main reason for the build script is to make all these paths relative.

remrich November 11, 2008 04:04

Two changes are solving the is
 
Two changes are solving the issues for me.

In OpenFOAM-1.5/bin/tools/buildParaViewFunctions
I added two options to the cmake command line:

-DCMAKE_SKIP_RPATH:BOOL=YES \
-DVTK_USE_RPATH:BOOL=OFF \

Mattijs, I need both.

In the Allwmake script for the PV3FoamReader
I added the -DCMAKE_SKIP_RPATH:BOOL=YES option to the cmake command line

cmake -DCMAKE_SKIP_RPATH:BOOL=YES ../..

That's all.

For my QT installation I added some lines to the OpenFOAM1.5/etc/settings.sh script to add QT/bin and Qt/lib to PATH and LD_LIBRARY_PATH

So now every thing works fine.

Rainer

sgehrkeTUBS March 18, 2009 10:29

Hi Rainer!

I was very happy when I found your posting about installing OpenFOAM on CentOS. I use RHEL 5, this should make no difference.

My questions:
I suppose you are much more used to Linux than I am, thus some of your steps arenīt clear to me.

Building my own gcc 4.3.1 is no problem, I installed it in $HOME/OpenFOAM/ThirdParty/gcc-4.3.1, before doing this I installed the actual binutils and though used their linker ld.

Qt was easy as well. Why did you choose 4.3.5? Normally 4.3.1 is used...

What you describe as nightmare are the next steps I donīt understand. Is it sufficient to add the lines in the build-scripts you posted the 11th of Nov? Is this an alternative to your first post (6th of Nov) or the same or something additional? I donīt understand what build.make, link.txt and relink.txt you modified. Is this necessary?

Thanks a lot!

Best regards

Sebastian Gehrke

http://www.tu-braunschweig.de/ivb

sgehrkeTUBS March 20, 2009 01:48

Try http://www.cfd-online.com/Forums/ope...5-linux64.html !

This works fine without building gcc. I think the combination of the settings described by Rainer and of the way described in the link is the best for CentOS/RHEL. Rainers way works also but is a little bit more work.

The setting "-DVTK_USE_RPATH:BOOL=OFF" didnīt work, instead use "addCMakeVariable "VTK_USE_RPATH:BOOL=OFF"" in the building-script for ParaView.

Thanks cfd-online!

Sebastian

www.tu-braunschweig.de/ivb


All times are GMT -4. The time now is 16:11.