LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2009, 02:10 AM   #1
naishi
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Rep: Reputation: 0
Smile how to install gcc-4.4.0 in Fedora 10


hello friend,
(1)when I download gcc-4.4.0.tar.gz, and gunzip and untar it and put it in /home/naishi/gcc-4.4.0/gcc-4.4.0
(2)type in: ../gcc-4.4.0/configure --prefix= /home/naishi/gcc-4.4.0/gcc-4.4.0

then the error message is as followings:
---------------------------------------------------------------
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

So, what is the problem here?

(3) how to install it then?

Hope any expert to help tell me hwo to install fix the problem and fix it?
Thanks!
 
Old 05-02-2009, 02:32 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Have you tried yum to install or to update the package that you already could have?
 
Old 05-02-2009, 02:56 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,225

Rep: Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521
why do you need gcc-4.4.0 ?

gcc-4.3.2-7.i386.rpm is the current in the fedora repos

the error tells you. install the testing / newer "MP 4.1+ and MPFR 2.3.2+." ( BUT DO NOT install in /usr)
it MUST not be in the system path otherwise the installed gcc4.3.2 will be F???ed up
then add that path to configure
or by adding to the configure line " --with-gmp=/some/place/that /gmp/is
 
Old 05-02-2009, 04:16 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,744

Rep: Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319
GMP 4.1+ and MPFR 2.3.2+ are not supposed
to be installed at all !

Just unpack 'gmp' and 'mpfr' into gcc-4.4.0/
then the few files needed will be picked up, see LFS.

The gcc people recommends the LFS method for building gcc.
See chapters 5.5.1 , 6.14.1 :
http://www.linuxfromscratch.org/lfs/view/6.4/
http://www.linuxfromscratch.org/lfs/...gcc-pass1.html
http://www.linuxfromscratch.org/lfs/...ter06/gcc.html
.....

Last edited by knudfl; 05-02-2009 at 04:18 AM.
 
Old 05-03-2009, 05:04 AM   #5
naishi
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Hello
After I download gmp-x.x.x.tar.gz and mpfr-x.x.x.tar.gz and put them in /home/naishi/gcc-4.4.0/; and configure gmp and install it first and then mpfr. Then configure gcc and make install it on root directory, but the error message is as follows:
--------------------
--------------------
libtool: compile: /home/naishi/gcc-4.4.0/gcc-4.4.0/host-i686-pc-linux-gnu/gcc/gcj -B/home/naishi/gcc-4.4.0/gcc-4.4.0/i686-pc-linux-gnu/libjava/ -B/home/naishi/gcc-4.4.0/gcc-4.4.0/host-i686-pc-linux-gnu/gcc/ -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../.././libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -fsource-filename=/home/naishi/gcc-4.4.0/gcc-4.4.0/i686-pc-linux-gnu/libjava/classpath/lib/classes -fjni -findirect-dispatch -fno-indirect-classes -c @javax-imageio.list -o javax-imageio.o >/dev/null 2>&1
make[3]: *** [javax-imageio.lo] Error 1
make[3]: Leaving directory `/home/naishi/gcc-4.4.0/gcc-4.4.0/i686-pc-linux-gnu/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/naishi/gcc-4.4.0/gcc-4.4.0/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/naishi/gcc-4.4.0/gcc-4.4.0'
make: *** [all] Error 2

How to fix this problem?
Thanks!
 
Old 05-03-2009, 05:28 AM   #6
naishi
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Original Poster
Rep: Reputation: 0
how to remove all the gmp and mpfr and gcc on my root directory

Hi because there is no space in the device, so how can I remove or uninstall the all the stuffs related with gcc in [root@naishi]
Thanks!
 
Old 05-03-2009, 05:53 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
First go into the gmp and the mpfr installation directories and do
Code:
# make uninstall
then just remove the directory gcc-4.4.0
Code:
# rm -r gcc-4.4.0
Anyway, it is not clear what do you mean for "gcc in [root@naishi]". What is [root@naishi]? You said you had the gcc installation dir in /home/naishi...
 
Old 05-03-2009, 02:25 PM   #8
naishi
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Smile how to re-boot Fedora 10

hello Colucix,
Thank you at first!
My home directory is /home/naishi; gcc-4.4.0 is installed in /home/naishi/gcc-4.4.0/gcc-4.4.0; and my gmp is put in: /home/naishi/gcc-4.4.0/gmp; my mpfr is put in: /home/naishi/gcc-4.4.0/mpfr; And the important thing is: when I do ./configure and make and make install for gmp,mpfr and gcc-4.4.0 all in the root directory, namely I type in: su; then password for the root user. That is my meaning.
The most serious thing is that I even could not boot the Fedora system, this should be solved at first, right? Then I can do: $make uninstall etc. in order to free the space of the disk. Right?
So, please help give me a hand, thanks indeed!
 
Old 05-03-2009, 02:37 PM   #9
naishi
LQ Newbie
 
Registered: Apr 2009
Posts: 15

Original Poster
Rep: Reputation: 0
one more question

Hi,
Because gmp and mpfr are very big files, and my linux Fedora 10 has already taken about 70% of the space of that partition, so when I install gmp and mpfr, the space is not enough to install these two files, but gcc-4.4.0 needs these two(gmp and mpfr); how can I fix this problem. Does this mean I need to do the partition again to distribute a bigger partition that can be big enough to install gcc-4.4.0 and gmp and mpfr and the other software. Please give me an idea how to solve this problem
and how big space needs to be given to install gcc-4.4.0 etc.?
Thanks very much!
 
Old 05-03-2009, 04:50 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,225

Rep: Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521Reputation: 2521
why do you need to install gcc 4.4 when gcc 4.3 is installed already?
just for fun ??
installing a second compiler (gcc44) is not the easiest to learn with .
 
Old 05-03-2009, 04:59 PM   #11
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Well. It would be useful to see the current partition scheme of this machine. Please, can you post the output of
Code:
df -k
But you tell that the system does not boot right? I think you have to boot with a live CD like Knoppix and try to manually remove some file to free space and let Fedora boot again. Then you have to uninstall gmp and mpfr using make uninstall from their installation directories.

After that you can start the compilation again, but this time choose a different path for the installation, that is run ./configure choosing a prefix different from the default one and pointing to a partition where you have enough free space:
Code:
./configure --prefix=/path/to/some/dir
you can even install them under /home/naishi or /home/naishi/gcc-4.4.0, if you have enough space in the /home partition. Then just update the PATH to include the directory containing the newly installed executables and update the library cache using
Code:
ldconfig /path/to/the/lib/directory
Anyway, I will suggest to stick with the current version of gcc, unless you have a valid reason to install the newest version. If you really want to compile gcc from source, follow the good advice from knudfl in post #4 above. Good luck!
 
Old 05-04-2009, 01:06 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 16,744

Rep: Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319Reputation: 3319
And by the way, the only thing you need for daily work,
is the 'gmp' runtime library, it is 254 KB ! ! !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 7 doesn't install with devel tools or gcc? comcastuser Fedora - Installation 5 08-17-2007 12:36 PM
How Do I Install GCC to Fedora 5 choclairs1982 Linux - General 4 04-03-2007 04:54 AM
Failed to install gcc-2.95.3 in Fedora 3 RedAlert Fedora 1 01-07-2007 06:49 PM
How to install gcc 3.3.3 on fedora core 1 ravi_yaddula Linux - Software 2 10-10-2006 10:40 AM
Install GCC 4 on fedora 4 abhijeetudas Linux - Software 2 01-31-2006 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration