CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   Cc1plus error libmpfrso1not found (

johndeas July 29, 2008 05:48

Hello, I am installing Open

I am installing OpenFOAM 1.5 on an Ubuntu machine (8.04).

foamInstallationTest gave me the following message, where everything seems ok:

However, when I try to recompile icoFoam as a test, I get the following error:

Making dependency list for source file icoFoam.C
SOURCE=icoFoam.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/OF/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/OF/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/opt/OF/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/icoFoam.o
/opt/OF/ThirdParty/gcc-4.3.1/platforms/linux/bin/../libexec/gcc/i686-pc-linux-gn u/4.3.1/cc1plus: error while loading shared libraries: cannot open shared object file: No such file or directory
make: *** [Make/linuxGccDPOpt/icoFoam.o] Error 1

It happens that, regardless of the context, any time I launch /opt/OF/ThirdParty/gcc-4.3.1/platforms/linux/bin/../libexec/gcc/i686-pc-linux-gn u/4.3.1/cc1plus even without arguments, I get the same errors.

So, if anybody as an idea on this, or has successfully installed Ubuntu on Ubuntu 8.04, I would be pleased to hear from you.

eugene July 29, 2008 05:55

You need to install mpfr.
You need to install mpfr.

johndeas July 29, 2008 08:26

Which I will do, thank you.
Which I will do, thank you.

I found it strange as I thought OpenFOAM was quite self-contained, and it is not written in the README to install it.

eugene July 29, 2008 08:52

The problem is that linux is i
The problem is that linux is inherently not self-contained.

The issue you are having is with gcc-4.3.1 not OpenFOAM-1.5. Unfortunately, if you use gcc-4.2.1 (which doesn't use mpfr) then the paraview/Qt stack has problems.

I am trying to build an entirely self-contained stack. It is proving difficult. Components on my list so far:

and a few other bits and bobs.

As you can see, quite a list. If I succeed (i.e. I don't throw up my hands in despair along the way), I will post the build script and some instructions. If anyone else manages it earlier, please let me know.

torvic July 29, 2008 13:45

hello hope you're doing gr

hope you're doing great.

For if it could be of aid, I installed some of the packages above for 64 bits, on SLED 10 sp1

first gmp with these flags in the configure:
CC="cc" CFLAGS="-m64 -O2 -fomit-frame-pointer -mtune=k8 -march=k8" ABI=64
and installed it.

then mpfr, forcing the path of gmp-build directory, with the same flags in the configure as for gmp:
-with-gmp-build=/home/foam15/OpenFOAM/extra/gmp-4.2.2 CC="cc" CFLAGS="-m64 -O2 -fomit-frame-pointer -mtune=k8 -march=k8"
and installed it.

then gcc-4.3.1, but this time without making a subdirectory for the obj, just a separate one in the same path, and build from it. In my case i have a directory "gnu-cc" in which i extract the .tar.gz. make a "gcc-build" directory and from it i execute the configure, which in in my case was:

../gcc-4.3.1/configure --prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --exec-prefix=$HOME/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --enable-languages=c,c++ --enable-shared --disable-multilib --with-gmp=/usr/local --with-mpfr=/usr/local

and installed it.

once installed qt-4.3.5 i put it in the PATH and LD_LIBRARY_PATH, in the .bashrc

then ran buildParaview-cvs.



kjmaki August 13, 2008 11:27

Dear FOAMers, I am having d
Dear FOAMers,

I am having difficulty compiling gcc 4.3.1 on my redhat linux machine. I have built and installed gmp and mpfr as per the instructions by Victor, but the gmake bootstrap fails with gcc. The configure command that I am using is:

../gcc-4.3.1/configure --prefix=/k/kjmaki/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64
--exec-prefix=/k/kjmaki/OpenFOAM/ThirdParty/gcc-4.3.1/platforms/linux64 --enable-languages=c,c++
--enable-shared --disable-multilib --with-gmp=/k/kjmaki/OpenFOAM/ThirdParty/gmp-4.2.3

And the failure on the gmake bootstrap reads:

checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

Where a snippet of the config.log reads:

conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:3636: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif

Does anyone have any advice?


fra76 August 15, 2008 03:34

Hi Kevin, I had the same erro
Hi Kevin,
I had the same error on a Suse machine. I gave up and used OF 4.2.2 for compiling OpenFOAM 1.5 from sources, as I could not even use the precompiled version (neither gcc 4.31 nor OF).
I only had to modify a couple of lines of code. You should easily come up with them when the compilation fails!


kjmaki August 15, 2008 08:42

Hello Francesco, Thanks for
Hello Francesco,

Thanks for your reply. I was able to build gcc-4.3.1, by installing gmp and mpfr. It was necessary for me to update my LD_LIBRARY_PATH to find those libraries.

With that done, I have build 1.5 from source and life is getting better :-), on to ParaView.....


hjasak August 19, 2008 05:52

Hi Kevin, If this is of int
Hi Kevin,

If this is of interest, I've got paraview-2.4.4 working with OpenFOAM-1.5. Presumably, this fixes your post-processing problem on a Mac, right.

Please let me know if you want details,


musahossein August 28, 2008 22:35

I am having problems installin
I am having problems installing paraview 3.3 in OpenFOam 1.5. It looks for Also mpfr is required. However I dont see a mpfr for Suse 10.0 (32 bit machine)on line. Does anyone have suggestions or willing to share a build they may have created themselves for installing Paraview?

Alternately, can anyone tell me if upgrading to Suse 11 will make the uphill battle of finding missing files go away?


markusrehm August 29, 2008 02:31

Hello Mussaddeque, on Suse
Hello Mussaddeque,

on Suse 11 everything worked fine for me. Only paraFoam is a little unstable, but with foamToVTK no problem. With the reader of Takuya ( et works nicely. So I had to rebuild only paraview taking Niklas' post into account.

On SLES 10 SP2 it was a bit more complicated but following Victors suggestions from above it is running. I built GMP, MPFR, GCC, Qt-3.5, paraview.
Thank's Victor!

Regards Markus

musahossein August 29, 2008 08:35

what is foamToVTK?
what is foamToVTK?

torvic August 29, 2008 11:17

Hello Markus, Musaddeque and a
Hello Markus, Musaddeque and all the OF community

there's a thread in which Mark Olesen states the need to have MPFR and GMP, since they are required for the last version of the gnu-c compiler, gcc-4.3.1. check out the gnu-c website.
So, in SUSE 10 I think they are not included.

Since OpenSUSE 11 has QT 4.4, I think you have to install Qt-4.3.5 in order to have a working PAraview.

@Markus: Nice to hear you have paraview working. You're welcome..

best and enjoy your weekend


musahossein August 29, 2008 12:45

Does anyone know if Suse 11 ha
Does anyone know if Suse 11 has MPFR and GMP? I have Suse 10.0. I dont want to have to install Suse 11 unless I absoulutely have to.

eugene August 29, 2008 13:45

please note, only gcc 4.3.1 ne
please note, only gcc 4.3.1 needs mpfr. However, OpenFOAM-1.5 compiles just fine using the gcc shipped with the previous version of OpenFOAM. (4.2.2 I think?)

musahossein August 29, 2008 15:33

But the problem lies in trying
But the problem lies in trying to install Paraview 3.3 on suse 10. It requries libmpfr which in turn requires mpfr and gmp. Please refer to post by victor:

Please correct me if I am wrong.

markusrehm August 30, 2008 12:20

Hi Victor, just one thing I
Hi Victor,

just one thing I contradict: I work with Suse 11 and the standard Qt-4.4 coming with it. As mentioned before I compiled it with Takuya's reader and applied the change mentioned by Niklas to make Qt-4.4 work. So OpenSuse 11 makes things a lot easier, I think.

Regards Markus

torvic September 1, 2008 15:21

Hello @Markus: you're righ

@Markus: you're right.

@Musa:I installed gcc-4.3.5, in order to compile Paraview under SLED 10. Didn't consider the hint of Eugene



musahossein September 2, 2008 22:22

Arright gentlemen, now I am ev
Arright gentlemen, now I am even more confused. gcc-4.3.5? I went to the GNU-C site and the latest download is 4.3.2. Does anyone have the link where I can download gcc-4.3.5 from?

This is refernce to Victor's post at the following link:

torvic September 3, 2008 18:28

Dear Musa My sincere apolog
Dear Musa

My sincere apologies.
I did want to mean gcc-4.3.1.

I mixed QT version with that of gcc while writing the post.



All times are GMT -4. The time now is 23:57.