CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Problem installing ParaView3.3-cvs (

peterhuang May 28, 2009 20:54

Problem installing ParaView3.3-cvs
Hi all!

I'm trying to install OpenFoam-1.5 on my 64-bit RHEL5 machine and I've followed the README.html up to step 6.

When I try the 3 commands in Step 6, blockMesh and icoFoam runs ok but paraFoam returned an error like "paraview: command not found." So I figure I should proceed to step 7 and install paraview3.3 and PV3FoamReader.

When I ran "buildParaView3.3-cvs" I received an error saying that my gcc is "broken" and "is not able to compile a simple test program." What gives? Please see screen capture below:

================================================== ===
[peter@cfddeepthought ThirdParty]$ buildParaView3.3-cvs
Building ParaView3.3-cvs
MPI support : OFF
Python support : OFF
MESA support : OFF
Source : /home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs
Target : /home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
-- Check for working C compiler: /home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc
-- Check for working C compiler: /home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -- broken
CMake Error: The C compiler "/home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc" is not able to compile a simple test program.
It fails with the following output:
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp'
/home/peter/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux64/bin/cmake -E cmake_progress_report /home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
/home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o -c /home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp/testCCompiler.c
/home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1: error while loading shared libraries: cannot open shared object file: No such file or directory
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
gmake[1]: Leaving directory `/home/peter/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2

CMake will not be able to correctly generate this project.
-- Configuring done
make: *** No targets specified and no makefile found. Stop.
================================================== ==========

I tried installing gcc-4.3.1 from source but I had to change the gcc path in /etc/ in order for the system to recognise it (otherwise it'll keep calling the gcc in /ThirdParty). I then tried buildParaView3.3-cvs but it failed to find multiple files and crashed af 12%. I've also read up on alternative installation method using ccmake but I have no idea how to get it work.

Can someone please point out how I can tackle the problem? Thanks in advance!


henrik May 28, 2009 21:25

Hi Peter,


/home/peter/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1: error while loading shared libraries: cannot open shared object file: No such file or directory
Your problem has nothing to do with paraview! The gcc that comes with OF 1.5 (4.3.1) does cooperate with your operating system. There are several ways around this problem.

1) Use the system compiler. However, I don't think the one in RHEL5 is sufficient;
2) Upgrade the system;
4) Compile gcc 4.2.x;
3) Compile gcc 4.3.x and statically link mpfr & gmp. I never tried myself and it doesn't sound easy.

It's your choice.


peterhuang May 29, 2009 02:42

Thank you henrik!

I've recompiled gcc, gmp and mpfr. I finally managed to build paraview with the help of ccmake, but I'm now getting this error when I run paraFoam:

================================================== =======
[peter@cfddeepthought cavity]$ paraFoam
paraview: symbol lookup error: paraview: undefined symbol: _ZN5QFont16staticMetaObjectE
================================================== =======

Does anyone know what's causing this and how to get around it? Thanks again! :p


henrik May 29, 2009 09:42

Dear Peter,

can you please post how you recompiled gcc including gmp and mpfr. This might be interesting to others.

My feeling is that your new problem is related to Qt. Please check that you have an appropriate version. You might have to compile the right one.


peterhuang June 1, 2009 22:01

Hi Herik,

Sorry about the late reply, I was away for a few days.

I still have the same problem as of this morning. I've double-checked my Qt and I've got version 4.3.1 on my machine:

[peter@cfddeepthought cavity]$ qmake --version
QMake version 2.01a
Using Qt version 4.3.1 in /usr/local/Trolltech/Qt-4.3.1/lib

This Qt version should be fine for my machine running RHEL 5 I hope?

As for recompiling gcc etc, I have a little confession to make: I am a windows user and I've only started playing with Linux about a month ago, so I am still very inexperienced and fuzzy about technical terms used in the Linux platform. When I say "compile," I was drawing an equal sign to the term "install" in windows machines.

All that I've done is to download GMP, MPFR and GCC from source provider and run "./configure", "make" and "make install" for each package. Everytime a program complains about missing library or "command unknown" I just add a path into the environmental variables such as $PATH or $LD_LIBRARY_PATH. There was a lot of trial and error involved and I cannot write down exactly what I've done. Sorry to disappoint you......:(


henrik June 1, 2009 23:28

Dear Peter,

@Qt: 4.3.1 is fine according to the README

@paraFoam: I am running out of ideas here. Since you recompiled the compiler, it might be worth a try to recompile everything from scratch.


@compile Linux: "./configure", "make" and "make install" is exactly what the community refers to as "compile & install from source" - Welcome to the Linux expirience.


peterhuang June 2, 2009 00:47

Thank you Henrik! I will keep poking around for a solution :)

peterhuang June 10, 2009 03:43

Hi Henrik,

Just to let you know that my OpenFOAM-1.5 is finally working!

I did as you suggested: I removed OpenFOAM completely and compiled from scratch. This time the installation went really smoothly thanks to all those packages I installed earlier (Qt-4.3.1, GCC, MPFR and GMP) and it finished without any error! Now I can finally do the tutorials :D

Thanks for your help, I really appreciate that!


All times are GMT -4. The time now is 12:56.