CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Installation (
-   -   OpenFOAM-1.6-ext Installation gcc (

abminternet December 9, 2010 06:57

OpenFOAM-1.6-ext Installation gcc
Hi, is anybody else having problems installing gcc compiler? both versions provided in the AllMake.stage1 script fail for me. After checking the configure.log file, it seems that it doesn't find the library. I tried adding its location to LD_LIBRARY_PATH, but still fails. Any suggestions on how to deal with this problem???


linnemann December 9, 2010 08:25


try adding this to the bottom of the OF bashrc its what works for me




abminternet December 10, 2010 12:33

gcc still not compiling
thanks for your reply, this time it seems i got further, but still gcc doesnt get compiled :S what version did you install?

I get the following error messages:

Error: File not found: /opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/gcc-4.5.1-root/opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.1/platforms/li
Error: File not found: /opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/gcc-4.5.1-root/opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.1/platforms/li
Verarbeite Paket: gcc-debuginfo-4.5.1-linux64GccDPOpt
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Prüfe auf nicht gepackte Datei(en): /usr/lib/rpm/check-files /opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/BUILD/gcc-4.5.1-root
Error: Installed (but not packed) files found:

I don't know if it is important, but for every package of stage 1 I get something like:
Error: Call from stat for /opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/rpmBuild/Python-2.7 not possible: File or folder not found

(this is an example for the python installation), but at the end it says installing and they get installed in the packages folder, except for gcc :S

Any ideas???
(PS I had to translate a few things because my computer is in german, so the words may not be displayed exactly like that in an english computer)

kalle December 12, 2010 16:02


I am experiencing exactly the same problem. Linnemanns suggestion also got me further (thanks!), though I had put mpfr, gmp, and mpc in LD_LIBRARY_PATH manually first. It seemed like putting them in bashrc worked. But then it seems the rpm cannot be built, because 'info' and 'man' files do not exist. This is in CentOS 5.5 at my home computer.

The problem with failing 'stat' is also present. At work I saw the same stat-error (but there I used system gcc 4.5.1 (also CentOS 5.5)) but there everything worked smooth.

Acutally I first installed 1.6-ext at my home computer using system gcc, 4.1.x, which seemed to work. But then foamInstallationtest fails because of too old gcc... I would prefer to install gcc as user, and not mess with systems's version, but cannot get through this point.

Anyone have any idea?

Best regards,

linnemann December 13, 2010 04:20

Yes this can be quite a pain because gcc-4.5.1 does not get into a rpm.

Fortunately it is still compiled and usable.

So here is the solution.

go to OpenFOAM-1.6-ext/ThirdParty/rpmBuild/Build

there you will have a folder called gcc-*version*-root

go into this folder until you reach the "packages" folder in this folder you will find a folder called gcc-*version* copy this folder to OpenFOAM-1.6-ext/ThirdParty/packages where the other successfully installed rpm lies.

Ok where not quite done yet.

again go to the OF file and and change the lines at line # 116 (I think) where it exports the gcc options.


        export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/packages/gcc-4.4.5/platforms/$WM_OPTIONS
        _foamAddLib $WM_THIRD_PARTY_DIR/packages/mpfr-2.4.1/platforms/$WM_OPTIONS/lib
        _foamAddLib $WM_THIRD_PARTY_DIR/packages/gmp-4.2.4/platforms/$WM_OPTIONS/lib
        #_foamAddLib $WM_THIRD_PARTY_DIR/packages/mpc-0.8.3/platforms/$WM_OPTIONS/lib

As you can see I am using gcc-4.4.5 but 4.5.1 works just as well just uncomment the last line above to include mpc as well and change 4.4.5 to 4.5.1.

Then exit all and source the OF bashrc file again and then you hopefully should be able to complete the compilation of OF.

Note I am using CentOS 5.5 x86_64 and I do not install python/qt/paraview.


kalle December 14, 2010 03:31

Thanks for your help Linnemann!

Yes, gcc compiled, so it should just be to put the files in the right place - didn't think it was that easy :-) I will try at home!


abminternet December 14, 2010 05:42

mine too :D

kalle December 15, 2010 17:07

Worked like a charm, including python, qt, and paraview. Thanks a lot!

claco February 11, 2011 16:49

Dear All,

can You kindly tell me where I can get Openfoam 1.6-ext and the other required files?
Moreover, can You kindly tell me (briefly) How can i successfully install the package on my Ubuntu 10.04 LTS platform?

Thank You in advance.

Claudio Comis

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