Page 1 of 2

gcc 4.2 Installation Help

Posted: Tue Nov 29, 2005 1:37 pm
by priyank_bolia
How to install gcc 4.2. I have downloaded gcc-g++-4.0.2.tar.bz2 and uncompress it, now what to do. The installation help is so complex for a newbie in linux. Can some one help me to have new version of gcc install on my computer.

Posted: Tue Nov 29, 2005 3:04 pm
by leio
Get it from your distribution instead...

Posted: Tue Nov 29, 2005 3:26 pm
by Jorg
Hi piyank, what kind of linux are you using? You can always attempt to compile GCC with GCC using the normal ./configure & make & make install procedure, but indeed getting an RPM is better.

It depends on what linux distrib you are using how easy this is.

I think they do not hand out ready built RPM's on GCC itself. Maybe on one of the package sites.

- Jorgen

Posted: Wed Nov 30, 2005 5:56 am
by priyank_bolia
I don't have any distribution with latest gcc 4.2. I have gcc already installed, but I want to know how to install the latest gcc. I am using Fedora core 3 Red Hat.

Posted: Wed Nov 30, 2005 7:52 am
by Jorg
As far as I saw it;

- download the latest tar.gz
- unpack with tar -zxf {name}
- cd {dir}
- mkdir build-gcc
- cd build-gcc
- ../configure
- make
- su -
- cd {dir}/build-gcc
- make install

I think from this point on you have the newest version of gcc

Write protect this directory, because when you want to remove it again, you can simply use make uninstall as root. It is advisable when you do, that you also delete the old gcc package and reinstall that one.

With regards,
- Jorgen

Posted: Wed Nov 30, 2005 8:24 am
by leio
Looks like Fedora has gcc-4.0.2 available in rawhide.
E.g, I found it from
http://download.fedora.redhat.com/pub/f ... 6.i386.rpm
I suppose someone might know how to fetch something from the development repositories selectively in fedora.

And to be sure you have the versions straight, I'm gonna emphasize that it's 4.0.2, not 4.2 - not even 4.1 is out yet (but it will rather soon).

Posted: Wed Nov 30, 2005 12:56 pm
by priyank_bolia
Jorg wrote:As far as I saw it;

- download the latest tar.gz
- unpack with tar -zxf {name}
- cd {dir}
- mkdir build-gcc
- cd build-gcc
- ../configure
- make
- su -
- cd {dir}/build-gcc
- make install

I think from this point on you have the newest version of gcc

Write protect this directory, because when you want to remove it again, you can simply use make uninstall as root. It is advisable when you do, that you also delete the old gcc package and reinstall that one.

With regards,
- Jorgen
it didn't worked as when I uncompress it, i have two folders gcc and libstdc++-v3 and none of them has install.sh

Posted: Wed Nov 30, 2005 1:30 pm
by priyank_bolia
leio wrote:Looks like Fedora has gcc-4.0.2 available in rawhide.
E.g, I found it from
http://download.fedora.redhat.com/pub/f ... 6.i386.rpm
I suppose someone might know how to fetch something from the development repositories selectively in fedora.

And to be sure you have the versions straight, I'm gonna emphasize that it's 4.0.2, not 4.2 - not even 4.1 is out yet (but it will rather soon).
warning: gcc-c++-4.0.2-6.i386.rpm: V3 DSA signature: NOKEY, key ID 30c9ecf8
error: Failed dependencies:
gcc = 4.0.2-6 is needed by gcc-c++-4.0.2-6.i386
libc.so.6(GLIBC_2.4) is needed by gcc-c++-4.0.2-6.i386
libstdc++ = 4.0.2-6 is needed by gcc-c++-4.0.2-6.i386
libstdc++-devel = 4.0.2-6 is needed by gcc-c++-4.0.2-6.i386

which package is needed for libc.so.6(GLIBC_2.4)

Posted: Wed Nov 30, 2005 1:50 pm
by Jorg
priyank,

I think you are better off compiling. If you are really peristent in using packages, use Synaptic or Yum. They will auto-resolve dependencies so that the installed packages will also be updated if needed.

http://stanton-finley.net/fedora_core_4 ... notes.html

After doing this, you can use YUM to get GCC. If you choose the way of the compiler, you will avoid dependency hell because configure will figure out which libs you have, now they simply link against some version and demand you to have that lib (or newer)

- Jorgen

Posted: Wed Nov 30, 2005 2:23 pm
by priyank_bolia
I had used yum update and it does not update to the latest packages, my g++ -v shows version 3.4.4, whereas 4.0.2 is available. And its not about only gcc, I want to know how to get the latest updates of softwares on linux. Sorry, but I am a linux newbie so this simple task of installing softwares is also complex for me.

Posted: Wed Nov 30, 2005 4:06 pm
by leio
In that case just use your package manager to get you your updates... whatever it is, the distribution webpage certainly has information about it.

gcc-4.0.2 while being a newer release, is not considered that quickly into going into distributions by default. The packages of gcc-4.0.x that are around are usually testing packages, and not pushed out for regular users. So you might need to do extra work to get it.

gcc-4.0.x, while an important step forward, doesn't yet have big benefits over gcc-3.4. It has some major technology merged in, but the benefits of those are not being riped yet very well. In fact, people say that gcc-4.0.x produces bigger binaries than 3.4, while also compiling a little slower. Once the new Tree-SSA and other stuff gets used to its full benefit, this will change, and can probably already be seen a bit in the gcc-4.1 prereleases.
Distributions aren't jumping to a new major version of a core part of the building toolchain so quickly - they want to allow it to stabilize a bit, and I agree with it. Only adventorous people should mess with gcc4 at this point still. I expect about a month for this to be shoved down to regular users (with binary rpm's compiled with gcc4) and developers (for compiling stuff with gcc-4.x.x) :wink:

Posted: Wed Nov 30, 2005 4:09 pm
by priyank_bolia
leio wrote:In that case just use your package manager to get you your updates... whatever it is, the distribution webpage certainly has information about it.

gcc-4.0.2 while being a newer release, is not considered that quickly into going into distributions by default. The packages of gcc-4.0.x that are around are usually testing packages, and not pushed out for regular users. So you might need to do extra work to get it.

gcc-4.0.x, while an important step forward, doesn't yet have big benefits over gcc-3.4. It has some major technology merged in, but the benefits of those are not being riped yet very well. In fact, people say that gcc-4.0.x produces bigger binaries than 3.4, while also compiling a little slower. Once the new Tree-SSA and other stuff gets used to its full benefit, this will change, and can probably already be seen a bit in the gcc-4.1 prereleases.
Distributions aren't jumping to a new major version of a core part of the building toolchain so quickly - they want to allow it to stabilize a bit, and I agree with it. Only adventorous people should mess with gcc4 at this point still. I expect about a month for this to be shoved down to regular users (with binary rpm's compiled with gcc4) and developers (for compiling stuff with gcc-4.x.x) :wink:

As I had already stated that in the previous message that :
And its not about only gcc, I want to know how to get the latest updates of softwares on linux.

Posted: Wed Nov 30, 2005 4:19 pm
by leio
As I had already said:
leio wrote:In that case just use your package manager to get you your updates... whatever it is, the distribution webpage certainly has information about it.
All the various distributions differ from eachother mostly precisely from package management, otherwise they are mostly the same, following standards. (and there are semi-standards in package management too, but the tools used are often different). I'm sure google knows plenty much, and more, too.

I digged out http://fedora.redhat.com/docs/yum/ in 10 seconds for you.

Posted: Wed Nov 30, 2005 5:52 pm
by chris
If you are really that keen on being 'bleeding edge' with your software versions, you may want to try a different distribution like Debian Unstable.
Be warned, though. Debian Unstable might be, well, unstable.
Debian uses Apt as package manager, by the way. Upgrading consist of not more than a simple

Code: Select all

apt-get update && apt-get upgrade
There even exists a GUI version for Apt called Synaptic.

Chris

Posted: Wed Nov 30, 2005 10:50 pm
by leio
Can I advertise gentoo, now that this thing has started? :lol: