CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM-1.6-ext Installation gcc (http://www.cfd-online.com/Forums/openfoam-installation/82925-openfoam-1-6-ext-installation-gcc.html)

abminternet December 9, 2010 05: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 libmpc.so.2 library. I tried adding its location to LD_LIBRARY_PATH, but still fails. Any suggestions on how to deal with this problem???

Thanks

linnemann December 9, 2010 07:25

Hello

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

Code:

GMP_VERSION=gmp-5.0.1
MPFR_VERSION=mpfr-3.0.0
MPC_VERSION=mpc-0.8.2

LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$MPC_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$MPFR_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=$WM_THIRD_PARTY_DIR/packages/$GMP_VERSION/platforms/$WM_OPTIONS/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH


abminternet December 10, 2010 11: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
nux64GccDPOpt/info
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
nux64GccDPOpt/man
Verarbeite Paket: gcc-debuginfo-4.5.1-linux64GccDPOpt
Provides: libgomp.so.1.0.0.debug()(64bit) libmudflap.so.0.0.0.debug()(64bit) libmudflapth.so.0.0.0.debug()(64bit) libssp.so.0.0.0.debug()(64bit) libstdc++.so.6.0.14.debug()(64bit)
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:
/opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.1/platforms/linux64GccDPOpt/lib64/libgcc_s.so
/opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.1/platforms/linux64GccDPOpt/lib64/libgcc_s.so.1
/opt/software/openfoam/extend/OpenFOAM-1.6-ext/ThirdParty/packages/gcc-4.5.1/platforms/linux64GccDPOpt/lib64/libgomp.a
....
.....

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 15:02

Hi,

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,
Kalle

linnemann December 13, 2010 03: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 settings.sh file and and change the lines at line # 116 (I think) where it exports the gcc options.

Code:

Gcc)
        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.

Best

kalle December 14, 2010 02: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!

Regards,
Kalle

abminternet December 14, 2010 04:42

mine too :D

kalle December 15, 2010 16:07

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

claco February 11, 2011 15: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 00:40.