CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   install gcc (https://www.cfd-online.com/Forums/openfoam-installation/74257-install-gcc.html)

Ahmed Khattab March 28, 2010 14:46

install gcc
 
i try to install gcc-4.3.3 it asked me to specifythe path of gmp.h and mpfr.h
how can i do this in one command.
thanks.

wyldckat March 28, 2010 17:28

Greetings ahmed,

My guess is that happened to you, after managing to get makeGcc to work properly :)

OK, by my estimate, the problem you're having now is due to 3 missing files in mpfr that comes with the Third Party General package. See this post #13, where I've already made available a patch for creating the missing 3 files. Instructions on how to apply it are on that same post :)

After that, try again the makeGcc command.

Best regards,
Bruno

PS: you could have continued to use your previous thread ;)

Ahmed Khattab March 29, 2010 05:17

this is not the problem
 
first thank you for your interest
i have already downloaded the whole compressed file and extract it it works good until the installation of mpfr-4.2.1. but when i try to install gcc-4.3.3 it ask me to specify the place pf gmo.h and mpfr.h so i type:
$ /home/ahmed/OpenFOAM/ThirdPArty-1.6/gcc-4.3.3/configure --with-gmp-include=/home/ahmed --with-mpfr-include=/home/ahmed/OpenFOAM/ThirdParty-1.6/mpfr-4.2.1

it say correct version of mpg ------ yes
correct version of mpfr-------no
i tried /usr/local directory
i tried /home/ahmed directory
i tried --with-mpfr
i tried --with mpfr-build

wyldckat March 29, 2010 18:17

Greetings Ahmed,

OK, you can make your life easier if you run:
Code:

. $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc
cd $WM_THIRD_PARTY_DIR
./makeGcc gcc-4.3.3 2>&1 | tee make.log

These three lines will: setup the OpenFOAM environment; go to the ThirdParty folder; and build gcc-4.3.3, while showing the output on screen, as well as putting what you see on screen into the file make.log.


Now, IF you still want to do everything by hand, then to simplify your efforts, type the following two lines:
Code:

ln -s $WM_THIRD_PARTY_DIR/gmp-4.2.4 $WM_THIRD_PARTY_DIR/gcc-4.3.3/gmp
ln -s $WM_THIRD_PARTY_DIR/mpfr-2.4.1 $WM_THIRD_PARTY_DIR/gcc-4.3.3/mpfr

Then compile gcc using:
Code:

cd $WM_THIRD_PARTY_DIR/gcc-4.3.3
mkdir build
cd build
../configure --enable-languages=c,c++ --with-pkgversion='OpenFOAM' --enable-__cxa_atexit --enable-libstdcxx-allocator=new --with-system-zlib --prefix=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH

For those variables that start with a '$' you'll need to setup OpenFOAM's environment, by running that first line at the top, the one with bashrc.


Best regards,
Bruno

Ahmed Khattab March 30, 2010 11:18

is the gcc was installed
 
thank you very much when i followed your advice it wrote that
gmp is already built
mpfr is already built
gcc is already built

wyldckat March 30, 2010 11:31

Greetings Ahmed,

If it wrote that in only a few seconds, that's because you've unpacked the binary packages of the ThirdParty (namely ThirdParty-1.6.linux*Gcc.gtgz).

To force the rebuilding of gmp+mpfr+gcc, you'll have to remove the contents inside the "platforms" folders that exist inside each folder. You can do that by running:
Code:

rm -rfi $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH
rm -rfi $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH
rm -rfi $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH

Then try again to build gcc et al. It should take about 20 to 60 minutes to complete the whole task, depending on the machine you have.

Best regards,
Bruno


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