CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Building Paraview, Redhat (

PaulK May 6, 2009 20:00

Building Paraview, Redhat

I am fairly new to Linux and this is my first post on cfd-online.

I cannot build ParaView.

Some relevant information:
Red Hat Enterprise Linux Client release 5 (Tikanga)
QMake version 2.01a
Using Qt version 4.3.1 in /usr/local/Trolltech/Qt-4.3.1/lib

I have installed everything manually (not familiar with rpm or apt-get).

[applied@linux ThirdParty]# buildParaView3.3-cvs
Building ParaView3.3-cvs
MPI support : OFF
Python support : OFF
MESA support : OFF
Source : /home/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs
Target : /home/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
-- Check for working C compiler: /home/achuth/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc
-- Check for working C compiler: /home/achuth/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -- broken
CMake Error: The C compiler "/home/achuth/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/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp'
/home/achuth/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux64/bin/cmake -E cmake_progress_report /home/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
/home/achuth/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o -c /home/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp/testCCompiler.c
/home/achuth/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]: Leaving directory `/home/achuth/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFiles/CMakeTmp'
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
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.

Do I need to download MPFR or GMP in the ThirdParty directory?
[applied@linux ThirdParty]# ls
Allwmake cmake-2.4.6 malloc openmpi-1.2.6 ParMetis-3.1 README
AllwmakeLibccmio gcc-4.3.1 metis-5.0pre2 ParaView3.3-cvs ParMGridGen-1.0 zlib-1.2.3

This is my first foray with Linux.


PaulK May 8, 2009 17:38

>> error while loading shared libraries: cannot open
>> shared object file: No such file or directory

I understand that this error tells me that the linker cannot find the mpfr dynamic libraries.

[applied@linux ThirdParty]# locate

I have tried modifying my LD_LIBRARY_PATH variable in .bashrc and .bash_profile with no luck:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

What am I missing? It clearly has something to do with mpfr, but what else can I check? I can't get past building paraView.

Thanks in advance.

gwierink May 9, 2009 11:49

Hi Paul,

I read you have a x86_64 system. I had a similar problem on Fedora x86_64, because the installer is looking for some library in /usr/local/lib/. But since you have a 64 bit system it might be located in usr/local/lib64 (or the other way around). Copying the library file or making a symbolic link with

ln -s  /usr/local/lib/  /usr/local/lib64/
or some similar trick.
Hope this is of any help.



PaulK May 9, 2009 20:20

Thanks for your response, Gijsbert.

I tried your advice but it did not work. I created additional links to the other files as well.

Here are my library directories:

/usr/local/lib --
libgmp.a libmpfr.a

/usr/local/lib64 --

I still get the same error.


gwierink May 10, 2009 03:05

Hmm, ok. I read on some blog that it may be a problem that the libraries are in /usr/local/lib... and not in /usr/lib...:


linked '/usr/local/lib/' and '/usr/local/lib/' to the '/usr/lib' directory
Maybe that's an idea?

Cheers, Gijsbert

PaulK May 14, 2009 13:15

After linking libraries, I get a different error:
/home/achuth/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: wrong ELF class: ELFCLASS32

I see that it is related to a 32-bit / 64-bit library confusion.
[applied@linux ThirdParty]# locate
I also note that when I type echo $LD_LIBRARY_PATH, I get that it is an undefined variable. It is, however, defined when I echo $LD_LIBRARY_PATH as a regular user. Note that for the build paraview step, I need to log in as a super-user.

I am still confused by this. I have seen some similar issues online but can't get past this build process.

I can locate but cc1 cannot find it in the build process (this might help):

[applied@linux ThirdParty]$ ldd -v /home/achuth/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/libexec/gcc/x86_64-unknown-linux-gnu/4.3.1/cc1 => not found => /usr/lib64/ (0x0000003395000000) => /lib64/ (0x0000003382200000)

As seen above, I can locate What is going on?

Thanks in advance.

nirmalrishi October 12, 2009 13:01

builParaView3.3-cvs got following error

When I tried to run buildParaView3.3-cvs after rmoving platforms directory, i got the following messages.

[ 52%] [ 52%] Building CXX object Utilities/VTKClientServer/Graphics/CMakeFiles/vtkGraphicsCS.dir/vtkWindowedSincPolyDataFilterClientServer.o
Building CXX object Utilities/VTKClientServer/Graphics/CMakeFiles/vtkGraphicsCS.dir/vtkGraphicsCSInit.o
Linking CXX shared library ../../../bin/
[ 52%] Built target vtkGraphicsCS
make: *** [all] Error 2

please let me know, how can i avoid this and complete the installation?

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