aspose file tools*
The moose likes Linux / UNIX and the fly likes Configuring newly installed gcc 3.4.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Configuring newly installed gcc 3.4.3" Watch "Configuring newly installed gcc 3.4.3" New topic
Author

Configuring newly installed gcc 3.4.3

Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
Hi,

I am looking to install an application that requires I have make, and that is when I learned that my version of RH 9 -- BLAG does not come with gcc. So, I downloaded gcc and then put it in a directory, /gcc-bin . Then, I added /gcc-bin/gcc-3.4.3/ to my $PATH variable.

Now, when I type whereis gcc, my system doesn't know. So, I am wondering what do I need to do to get gcc running?

Mucho thanks,

Mike
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

I don't know what you downloaded, exactly, but what you want to do is delete it all, get a gcc RPM and install the RPM using rpm -i . There's a lot of setup that goes into installing and configuring gcc properly, and just copying something to /gcc-bin (?) isn't going to do it.

There ought to be a gcc RPM on your OS CDs. If you don't have them, you can get one here:

http://www.rpmfind.net/linux/RPM/redhat/9/i386/gcc-3.2.2-5.i386.html


[Jess in Action][AskingGoodQuestions]
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
Okay, I got it, and I ran the RPM. I had to build directories off from my/usr/src namely, /usr/src/redhat/SOURCES . Now I have the bzip2 version of gzip sitting on named directory. I suppose that I can fire that up now?
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
I unzipped and untarred the source code, and now have :

gcc-3.2.2-20030225 gcc-3.2.2-20030225.tar.bz2 gcc32-sparc32-hack.patch

in my /usr/src/redhat/SOURCES/

I would appreciate further guiding, since I didn't seem to get much past this place on my own previously.

-Mike
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
Sorry if I appear to be acting helpless, but I haven't found any good documentation for this -- not that I can understand -- definetely not the instructions packaged in the gcc manuals.

I don't find any reference to bootstrap in my main gcc directory, nor am I able to run install-sh -- as when I do I get the message: "no install file specified"

Poking around so far, I haven't found anything else that looks like it will get the job done.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

No, you're more or less back to the same spot. Sounds like you downloaded the source RPMs, which means you would have to build gcc. It's a long, complex process and things can go wrong. Better to use a pre-built one.

On the page I linked to above, click not on the link that says "Source RPM", but on the big title on top of the page to get the binary RPM -- i.e., the prebuilt gcc -- and install that, instead. In other words, get the file

ftp://fr2.rpmfind.net/linux/redhat/9/en/os/i386/RedHat/RPMS/gcc-3.2.2-5.i386.rpm

and install that. If everything works, you get /usr/bin/gcc, and Bob's your uncle.
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
When I rpm -i that gcc package file, I get error: Failed Dependencies: glibc-devel >=2.2.09-12 is needed by gcc-3.2.2-5.

Any suggestions for how to get that glibc-devel ?
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
Okay--I gotta admit that last question of mine was pretty babyish.

I found glibc-2.3.2-27.9.7.src.rpm, and rpm -i 'd it. It gave me a warning message about having NO KEY, but otherwise was silent (I am guessing that no news is good news, and that it installed.)

So, I tried to rpm the gcc-3.2.2-5.i386.rpm, you suggested to me, and am getting the same error message: Failed dependencies: glibc-devel >= 2.2.90-12 is needed by gcc-3.2.2-5.

I will log out and log back in, probably solve all of my problems and prove my "I was acting babyish" thesis. But, I wanted to write down all the info before I wiped it out.

What is the difference between i386 and i586 components. The i386 is made for pre-pentium, and i586 for pentium ? What is the benefit of going with i386, or does it matter. Also, can I intermix the two? Meaning, could I have the gcc i386 running with the glibc devel i586 ? (not what I tried to do here)

Just curious...
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
I'm still having no luck with this.

I found a copy of gcc on some source code cd's, and tried to install them. This is the results:
Mike Parker
Greenhorn

Joined: Nov 21, 2004
Posts: 18
Check this out, I install glibc 3.2.x -- and it says that it works 100%.

Then, I try to install gcc-2.2.2-5.i386.rpm and am told that it can't because glic-devel >=2.9 is needed. --- I just installed version 3.2 !

[root@localhost mike]# rpm -ivh glibc-2.3.2-27.9.7.src.rpm
warning: glibc-2.3.2-27.9.7.src.rpm: V3 DSA signature: NOKEY, key ID db42a60e
1:glibc ########################################### [100%]
[root@localhost mike]# rpm -ivh gcc-3.2.2-5.i386.rpm
warning: gcc-3.2.2-5.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
glibc-devel >= 2.2.90-12 is needed by gcc-3.2.2-5
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

Bear with me, I know about stuff in a general way, but I've never bothered to sort them all out. It goes something like this, though:

gcc 2 and gcc 3 had some major differences. Not eveybody thought that gcc 3 (at least initially) was an imprevement. Red Hat backported some stuff, but for quite some time - including up through RH9 - stuck with their own edition of gcc 2.96. Not all app developers liked that idea, so a few dropped all support for gcc 2. But surely my uncle's name is Bjorn Stronginthearm?

RH9 AND Fedora Core 1 are both past end-of-life now, so if you can, I'd recommend migrating to FC3.

Even if you can't, however, you may find that installing packages with dependencies is made much easier if you use YUM. YUM has been retrofiited all the way back to about RH 7.2. I was using it quite happily on RH9 before I upgraded last week. I believe that everything will get pulled in automagically with a simple "yum install gcc" command.

To be able to build both gcc3 and gcc 2.96 projects, I believe you'll need the "gcc-compat" packages.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Configuring newly installed gcc 3.4.3
 
Similar Threads
ubuntu or fedora gcc compiler
problem in integrating Apache with Tomcat
Calling C Function without declaring prototype
Eclipse 3.4.3 Start Problem...ClassNotFoundException:org.eclipse.core.runtime.adaptor.EclipseStarter
vmware on RedHat 8.0