gcc 4.2 Installation Help

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

gcc 4.2 Installation Help

Post by priyank_bolia » Tue Nov 29, 2005 1:37 pm

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.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Tue Nov 29, 2005 3:04 pm

Get it from your distribution instead...
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Tue Nov 29, 2005 3:26 pm

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
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Nov 30, 2005 5:56 am

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.

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Wed Nov 30, 2005 7:52 am

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
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Wed Nov 30, 2005 8:24 am

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).
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Nov 30, 2005 12:56 pm

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

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Nov 30, 2005 1:30 pm

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)

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Wed Nov 30, 2005 1:50 pm

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
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Nov 30, 2005 2:23 pm

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.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Wed Nov 30, 2005 4:06 pm

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:
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Nov 30, 2005 4:09 pm

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.

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Wed Nov 30, 2005 4:19 pm

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.
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

chris
I live to help wx-kind
I live to help wx-kind
Posts: 150
Joined: Fri Oct 08, 2004 2:05 pm
Location: Europe

Post by chris » Wed Nov 30, 2005 5:52 pm

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
this->signature=NULL;

leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio » Wed Nov 30, 2005 10:50 pm

Can I advertise gentoo, now that this thing has started? :lol:
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/

Post Reply