CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

OpenFOAM 15 and CentOS 52 installation issues

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2008, 07:46
Default I had to install OpenFOAM 1.5
  #1
New Member
 
Rainer Emrich
Join Date: Mar 2009
Posts: 4
Rep Power: 17
remrich is on a distinguished road
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
remrich is offline   Reply With Quote

Old   November 6, 2008, 08:16
Default We developed the wmake build s
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
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
henry is offline   Reply With Quote

Old   November 6, 2008, 08:24
Default Hi Rainer, I think we've al
  #3
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
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.
olesen is offline   Reply With Quote

Old   November 6, 2008, 08:39
Default Hi Mark, yes I used the bui
  #4
New Member
 
Rainer Emrich
Join Date: Mar 2009
Posts: 4
Rep Power: 17
remrich is on a distinguished road
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 is offline   Reply With Quote

Old   November 6, 2008, 08:50
Default Henry, I don't have the tim
  #5
New Member
 
Rainer Emrich
Join Date: Mar 2009
Posts: 4
Rep Power: 17
remrich is on a distinguished road
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.
remrich is offline   Reply With Quote

Old   November 6, 2008, 10:14
Default If you find a way to avoid the
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
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
henry is offline   Reply With Quote

Old   November 6, 2008, 13:25
Default There is a fix in the 1.5.x ve
  #7
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
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.
mattijs is offline   Reply With Quote

Old   November 11, 2008, 04:04
Default Two changes are solving the is
  #8
New Member
 
Rainer Emrich
Join Date: Mar 2009
Posts: 4
Rep Power: 17
remrich is on a distinguished road
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
remrich is offline   Reply With Quote

Old   March 18, 2009, 10:29
Default
  #9
New Member
 
Sebastian
Join Date: Mar 2009
Posts: 2
Rep Power: 0
sgehrkeTUBS is on a distinguished road
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 is offline   Reply With Quote

Old   March 20, 2009, 01:48
Default
  #10
New Member
 
Sebastian
Join Date: Mar 2009
Posts: 2
Rep Power: 0
sgehrkeTUBS is on a distinguished road
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
sgehrkeTUBS is offline   Reply With Quote

Reply


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
FOAM installation compiler issues gareth__it_power OpenFOAM Installation 7 February 9, 2009 14:12
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 09:38
OpenFOAM installation Mark Main CFD Forum 2 March 29, 2008 07:45
OpenFOAM and Paraview install issues spridal86 OpenFOAM Installation 7 February 13, 2008 13:15
Installation OpenFoam on SuSe 101 mephisto OpenFOAM Installation 1 November 8, 2006 02:15


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