CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Building Paraview, Redhat (http://www.cfd-online.com/Forums/openfoam-installation/64308-building-paraview-redhat.html)

PaulK May 6, 2009 20:00

Building Paraview, Redhat
 
Hi,

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)
x86_64
QMake version 2.01a
Using Qt version 4.3.1 in /usr/local/Trolltech/Qt-4.3.1/lib
mpfr-2.4.1
gmp-4.3.0

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

Error:
[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: libmpfr.so.1: 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.
done

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.

Thanks,
Paul

PaulK May 8, 2009 17:38

>> error while loading shared libraries: libmpfr.so.1: 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 libmpfr.so.1
/home/achuth/mpfr-2.4.1/.libs/libmpfr.so.1
/home/achuth/mpfr-2.4.1/.libs/libmpfr.so.1.2.0
/usr/local/lib/libmpfr.so.1
/usr/local/lib/libmpfr.so.1.2.0

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.
Paul

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
Code:

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

Regards,

Gijsbert

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 libmpfr.so files as well.

Here are my library directories:

/usr/local/lib --
libgmp.a libgmp.so libgmp.so.3.5.0 libmpfr.la libmpfr.so.1
libgmp.la libgmp.so.3 libmpfr.a libmpfr.so libmpfr.so.1.2.0

/usr/local/lib64 --
libmpfr.so libmpfr.so.1 libmpfr.so.1.2.0

I still get the same error.

Paul

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...:

Quote:

linked '/usr/local/lib/libmpfr.so.1' and '/usr/local/lib/libgmp.so.3' 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: libmpfr.so.1: wrong ELF class: ELFCLASS32
-

I see that it is related to a 32-bit / 64-bit library confusion.
-
[applied@linux ThirdParty]# locate libmpfr.so.1
/home/achuth/mpfr-2.4.1/.libs/libmpfr.so.1
/home/achuth/mpfr-2.4.1/.libs/libmpfr.so.1.2.0
/usr/lib/libmpfr.so.1
/usr/lib64/libmpfr.so.1
/usr/local/lib/libmpfr.so.1
/usr/local/lib/libmpfr.so.1.2.0
/usr/local/lib64/libmpfr.so.1
/usr/local/lib64/libmpfr.so.1.2.0
-
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 libmpfr.so.1 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
libmpfr.so.1 => not found
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x0000003395000000)
libc.so.6 => /lib64/libc.so.6 (0x0000003382200000)
...

As seen above, I can locate libmpfr.so.1. What is going on?

Thanks in advance.

nirmalrishi October 12, 2009 13:01

builParaView3.3-cvs got following error
 
Hi,

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/libvtkGraphicsCS.so
[ 52%] Built target vtkGraphicsCS
make: *** [all] Error 2
done



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


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