CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Cc1plus error libmpfrso1not found (https://www.cfd-online.com/Forums/openfoam-installation/57214-cc1plus-error-libmpfrso1not-found.html)

musahossein September 3, 2008 22:51

Victor: Thanks for the correc
 
Victor:
Thanks for the correction. You must have a differnt Suse 10 build. Since the one I have, when I run the command:

buildParaview3.3-cvs, I get errors that require libmpfr and not gcc 4.3.1 The error is as follows:
__________________________________________________
musa@linux:~/OpenFOAM/ThirdParty> buildParaView3.3-cvs
Building ParaView3.3-cvs
MPI support : OFF
Python support : OFF
MESA support : OFF
Source : /home/musa/OpenFOAM/ThirdParty/ParaView3.3-cvs
Target : /home/musa/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/li
nuxGcc
-- Check for working C compiler: /home/musa/OpenFOAM/ThirdParty/gcc-4.3.1/platfo
rms/linux/bin/gcc
-- Check for working C compiler: /home/musa/OpenFOAM/ThirdParty/gcc-4.3.1/platfo
rms/linux/bin/gcc -- broken
CMake Error: The C compiler "/home/musa/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/
linux/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/cmTryCo
mpileExec.dir/build
gmake[1]: Entering directory `/home/musa/OpenFOAM/ThirdParty/ParaView3.3-cvs/pla tforms/linuxGcc/CMakeFiles/CMakeTmp'
/home/musa/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux/bin/cmake -E cmake_pr ogress_report /home/musa/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linuxGcc/ CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
/home/musa/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin/gcc -o CMakeFiles /cmTryCompileExec.dir/testCCompiler.o -c /home/musa/OpenFOAM/ThirdParty/ParaVi ew3.3-cvs/platforms/linuxGcc/CMakeFiles/CMakeTmp/testCCompiler.c
/home/musa/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux/bin/../libexec/gcc/i686 -pc-linux-gnu/4.3.1/cc1: error while loading shared libraries: libmpfr.so.1: can not open shared object file: No such file or directory
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
gmake[1]: Leaving directory `/home/musa/OpenFOAM/ThirdParty/ParaView3.3-cvs/plat forms/linuxGcc/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.
done
musa@linux:~/OpenFOAM/ThirdParty>
_____________________________________________

Please let me know what your thoughts are on this.
Thanks
Musa

torvic September 4, 2008 16:29

Hello Musa ! Hope you're do
 
Hello Musa !

Hope you're doing fine.

If you look carefully in the error message, you can see, that in order to compile paraview, your gcc must fit the requirments:

"-- Check for working C compiler"

after the test, the script found:

"-- broken ..."

"The C compiler .... is not able to compile a simple test program."

So, the "Cmake" sends the message: "It fails with the following output: "

Then you have more specific error messages, i.e, where to look a bit closer:

"...cc1: error while loading shared libraries: libmpfr.so.1: can not open shared object file: No such file or directory "

So, since the gcc is not ok, then Cmake have problems to work:

"CMake will not be able to correctly generate this project.
-- Configuring done "

***************
So, since OF-1.5 comes with gcc-4.3.1, this version of gcc requires gmp and mpfr. That's why you get the "libmpfr message", since it is gcc-related.

In the Gnu-gcc-website, under the prerequisites

http://gcc.gnu.org/install/prerequisites.html

it is stated (among others)

"
.
.
GNU Multiple Precision Library (GMP) version 4.1 (or later)
Necessary to build GCC. If you do not have it installed in your library search path, you will have to configure with the --with-gmp configure option. See also --with-gmp-lib and --with-gmp-include.

MPFR Library version 2.3.0 (or later)
Necessary to build GCC. It can be downloaded from http://www.mpfr.org/. The version of MPFR that is bundled with GMP 4.1.x contains numerous bugs. Although GCC may appear to function with the buggy versions of MPFR, there are a few bugs that will not be fixed when using this version. It is strongly recommended to upgrade to the recommended version of MPFR.
The --with-mpfr configure option should be used if your MPFR Library is not installed in your default library search path. See also --with-mpfr-lib and --with-mpfr-include.
..
"
#######
In my case, I have SLED 10 SP1, and also got the same error message as yours at the beginning.
What I did, was to install from scratch, gmp, mpfr, and gcc-4.3.1.
Then installed QT-4.3.5.
Once I did that I could compile Paraview.

this is what I did, but there could be other ways.

Hope this helps

best http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

V

musahossein September 8, 2008 21:15

Victor: many thanks for your
 
Victor:
many thanks for your response to my message. i sincerely appreciate the time you took to explain the error messages. I installed Suse 11.0 on my computer with all the C/C++ and other development files. I was able to install Openfoam 1.5 and including the kitware visualisation package. As a test, I ran the damBreak problem and it ran fine.

I must say OpenFoam 1.5 and suse 11.0 are much more robust than their predecessors. Almost loads like a windows based software (sorry - I was weaned on MS Windows) - w/o hiccups.

Musa

torvic September 9, 2008 15:34

Hi Musa ! You're welcome..
 
Hi Musa !

You're welcome..

Good to hear you already have OF-1.5. !!

enjoy it

best http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
and a nice day

V

waynezw0618 October 4, 2008 15:27

Hi does anyone know how to
 
Hi

does anyone know how to build mpfr for OF1.5?
just:

1) ./configure --prefix=$HOME/OpenFOAM-1.5/Thirdparties/mpfr-2.3.2

2) make

3) make install

is there any other settings? i do not have "root",i am just a user of school`s cluster.

is there any other packages needed to be installed on AS4 to just run the applications,but NOT paraView?


thanks

yours wayne

hani October 4, 2008 17:39

Hi Wayne, You don't need to
 
Hi Wayne,

You don't need to be root to install mpfr. Do the following steps:

cd $WM_THIRD_PARTY_DIR
wget http://www.mpfr.org/mpfr-2.3.2/mpfr-2.3.2.tar.gz
gunzip mpfr-2.3.2.tar.gz
tar xf mpfr-2.3.2.tar
mv mpfr-2.3.2 mpfr-2.3.2_Src
mkdir mpfr-2.3.2
cd mpfr-2.3.2_Src
./configure --prefix=$WM_THIRD_PARTY_DIR/mpfr-2.3.2 > & log_configure
(the prefix option makes it possible to do this without being root, but it means that you will have to specify the path to the mpfr installation later on - I'll show you.)
make > & log_make
make check > & log_make_check
make install > & log_make_install

If everything goes alright you should now see in the log_configure file that the gmp version is 4.1 or later (otherwise I guess that you will have to get that also). In log_make_check you should see that all tests have passed. You find some info on your installation in log_make_install.

To use the new mpfr library with the distributed gcc-4.3.1, modify the following in the OpenFOAM-1.5/etc/settings.csh file (or similar in the settings.sh file):
case Gcc:
setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.1/platforms/$WM_ARCH$WM_COMPILER_ARCH
#mpfr specific:
if ($?LD_LIBRARY_PATH) then
setenv LD_LIBRARY_PATH ${WM_THIRD_PARTY_DIR}/mpfr-2.3.2/lib:${LD_LIBRARY_PATH}
else
setenv LD_LIBRARY_PATH ${WM_THIRD_PARTY_DIR}/mpfr-2.3.2/lib
endif
breaksw

Håkan

ngj October 5, 2008 12:54

Hi all Thanks for all the u
 
Hi all

Thanks for all the useful comments above. I have successfully applied them and have compiled OF-1.5 on a cluster which does not support gcc-4.3.1.

In the attached document, I have tried to compile all the necessary steps into one documents which in details goes through the installation process.



Best regards

Niels

ngj October 5, 2008 12:58

The file was to large. Find it
 
The file was to large. Find it here:

http://www.student.dtu.dk/~ngja/OF_u...eOnCluster.pdf

/ Niels

waynezw0618 October 6, 2008 03:21

Hi Hakan thanks! but i can
 
Hi Hakan

thanks!
but i can not build correctly with error message:
warning: Clock skew detected. your build may be incomplete.

how can i resolve it ?

thanks

yours
wayne

hani October 6, 2008 05:13

Hi Wayne, This is not an er
 
Hi Wayne,

This is not an error message, but a warning.

It sais that there is a problem with your clock. I don't think this will cause any trouble unless you are compiling the same thing several times simultaneously (or some other strange behaviour). As long as you get the binaries and they work as they should, you should be fine.

Håkan.

waynezw0618 October 6, 2008 11:07

Hi Hakan. i am sorry for i
 
Hi Hakan.

i am sorry for i am not successful.when i build applications such as MRFSimpleFoam,it is error
as following:
shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
when i do whereis libmpfr
report is /usr/lib/libmpfr.aonly one without libmpfr.so
the attachment is the log_make and log_make_install for building of mpfr and gmp

here is mpfr


here is gmp


waynezw0618 October 6, 2008 11:10

i am sorry. i dont attach them
 
i am sorry. i dont attach them corrctly

here is of mpfr

http://www.cfd-online.com/OpenFOAM_D...s/mime_zip.gif mpfr.zip

here is of gmp
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif gmp.rar

by the way,would you mind give me some advices ont the topic of computeTorqueMRF problem( http://www.cfd-online.com/cgi-bin/Op...how.cgi?1/9426)

best regards

thanks!

your wayne

ep4 October 14, 2008 01:55

Hello, I have an error when
 
Hello,

I have an error when i use wmake or tried to install ParaFoam: shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory.

When trying to install the mpfr library to have the file libmpfr.so.1, it returns (after command ./configure) that it can't find libmpfr.so.1 ... I'm a little bit lost....

I only found libmpfr.a.

I haven't found yet a solution on the forum. Does somoene have an idea to help me?

ep4

villet October 14, 2008 04:06

Pattyn Eric: You have proba
 
Pattyn Eric:

You have probably sourced /OpenFOAM-1.5/etc/bashrc file before trying to install the mpfr-library. That makes the new c++ compiler active and the compilation fails. The new gcc 4.3.x compiler requires the mpfr library to work.

So you should use the system compiler to compile mpfr (i.e. without sourcing the OpenFOAM bashrc file). If, possible, a better solution is to use your system's package manager to obtain the mpfr library.

ep4 October 16, 2008 03:05

Exactly, i have sourced the ba
 
Exactly, i have sourced the bashrc file and then tryed to install mpfr library.

When you say that i should use the sytem compiler, what does it mean exactly? I have suppress the line in my bashrc file, then make ./configure but i still have the same error.
I don't know either what's the system's package manager.

Could you maybe give me some more details, i'm not really a king for those things...

Thank you

eric

villet October 16, 2008 06:41

Sorry, I wasn't clear enough.
 
Sorry, I wasn't clear enough. The system compiler is located in "/usr/bin/gcc". After sourcing the OpenFOAM bashrc file, the command "gcc" points to the newer c++ compiler provided in the OpenFOAM distribution.

I suggest you have removed the OpenFOAM bashrc source line from your .bashrc in your home directory. Then you should open a new terminal, because the OpenFOAM settings will stay in memory. Just make sure that "which gcc" command points to the system compiler "/usr/bin/gcc".

By package manager I mean a program in which you can manage the installed programs and libraries in your Linux system. In Debian based distributions it's called Synaptic etc. You should find the mpfr-library there. If not then you need to install the library manually like you have tried. I hope this helps.

ep4 October 16, 2008 08:50

Thank you very much for the ti
 
Thank you very much for the time you are taking for me.
I have successfully installed the mpfr library.
Nevertheless, i still have the same error when compiling paraview (see the end of this message).
The files of mpfr library have been installed in the usr/local/lib/ directory. Maybe i should copy them somewhere else. I have tried some possible locations without success.

Maybe you could help me again?

Thank you

eric



ep4@wobwslx2:~/OpenFOAM/ThirdParty$ buildParaView3.3-cvs
Building ParaView3.3-cvs
MPI support : OFF
Python support : OFF
MESA support : OFF
Source : /ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs
Target : /ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc
-- Check for working C compiler: /ric_home/ep4/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc
-- Check for working C compiler: /ric_home/ep4/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -- broken
CMake Error: The C compiler "/ric_home/ep4/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 `/net/ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMak eFiles/CMakeTmp'
/ric_home/ep4/OpenFOAM/ThirdParty/cmake-2.4.6/platforms/linux64/bin/cmake -E cmake_progress_report /ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFile s/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
/ric_home/ep4/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o -c /ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMakeFile s/CMakeTmp/testCCompiler.c
/net/ric_home/ep4/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]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Fehler 1
gmake[1]: Leaving directory `/net/ric_home/ep4/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Gcc/CMak eFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Fehler 2


CMake will not be able to correctly generate this project.
-- Configuring done
make: *** Keine Targets angegeben und keine »make«-Steuerdatei gefunden. Schluss.
done

villet October 17, 2008 04:11

This may be again a system rel
 
This may be again a system related problem. Now you are using the system compiler and it lacks some components which are needed in the compilation process.

You need at least "g++" package installed (if "which g++" finds nothing). If the same problem prevails, choose development option (installs development packages) in the package manager. Which linux distribution are you using and is it a desktop or a server?

ep4 October 17, 2008 05:12

Hi, the which gcc gives:
 
Hi,

the which gcc gives:

/ric_home/ep4/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64/bin/gcc
or
/usr/bin/gcc if i don't write the additional line in my .bashrc file.

My linux distribution, ... :

ep4@wobwslx2:/net/ric_home/ep4$ uname -a
Linux wobwslx2 2.6.9-42.0.8.ELsmp #1 SMP Tue Jan 23 12:49:51 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

Is there a command to install development packages ? To install mpfr i haven't use the package manager.

Thank you

eric

villet October 17, 2008 07:49

It looks like you are a user o
 
It looks like you are a user on a linux cluster and not a system administrator. The kernel version is similar to what I have in our Rocks linux cluster. At least in my case everything is a "bit" outdated... I get these outputs:

"ld --version" version ~2.15
"gcc --version" version < 3.x.x

The system linker (ld command in binutils package) didn't work with new c++ compiler provided in OpenFOAM. It may be the problem in your case, too. Check the install log file under ThirdParty in Paraview directory. There may be more info what's actually wrong.

I have used the following compilation procedure to get everything updated (installed in ThirdParty):

Binutils 2.18 -> gmp 4.2.2 -> mpfr 2.3.1 -> (gcc 4.3.1) -> QT 4.3.1

Basically I have used the guide (http://openfoamwiki.net/index.php/Ho...mpile_OpenFOAM).


All times are GMT -4. The time now is 10:47.