CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

install gcc

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2010, 14:46
Default install gcc
  #1
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
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.
Ahmed Khattab is offline   Reply With Quote

Old   March 28, 2010, 17:28
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Old   March 29, 2010, 05:17
Default this is not the problem
  #3
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
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
Ahmed Khattab is offline   Reply With Quote

Old   March 29, 2010, 18:17
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Old   March 30, 2010, 11:18
Default is the gcc was installed
  #5
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
thank you very much when i followed your advice it wrote that
gmp is already built
mpfr is already built
gcc is already built
Ahmed Khattab is offline   Reply With Quote

Old   March 30, 2010, 11:31
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 14:43
install gcc Ahmed Khattab OpenFOAM 1 March 16, 2010 18:15
Question on specify gcc compiler for OpenFOAM 15 peterlai OpenFOAM Installation 2 October 2, 2008 07:20
Gcc conflict install inddzen OpenFOAM Installation 2 December 11, 2007 16:00
Gerris software installation mer Main CFD Forum 2 November 12, 2005 08:50


All times are GMT -4. The time now is 18:44.