LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 02-16-2003, 02:04 PM   #1
xlnlif
LQ Newbie
 
Registered: Feb 2003
Posts: 3

Rep: Reputation: 0
Question Help w/installing/config GCC


I have unpacked GCC under /root/usr/local/bin/gcc-3.2.1 (I don't know if that's correct) but I don't know how to edit env variable to add GCC so I can use "./configure" on Apache among other things.

This is the error I receive:
[root@localhost bin]# cd gcc-3.2.1/
[root@localhost gcc-3.2.1]# ./configure
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /usr/local/bin/gcc-3.2.1 using "mt-frag"
./configure: gcc-3.2.1: command not found
*** The command 'gcc-3.2.1 -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

I guess I need to set the Env Variable - can you help me with this?

Any guidance is much appreciated. If I need to move my GCC files to a proper directory please guide me there.

Also, I unpacked Apache under "/home/username/httpd-2.0.44 and I don't think that is right either. Any guidance here is appreciated very much too.

Thanks!

Newbie

Last edited by xlnlif; 02-16-2003 at 02:28 PM.
 
Old 02-16-2003, 08:45 PM   #2
yngwin
Member
 
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
I don't know if it works in your distro, but you could try env-update. And do you have a working compiler in the first place? That is, are the development packages installed?

Downloaded source code is usually placed in /usr/local/src/ but you may put it elsewhere.
 
Old 02-16-2003, 09:31 PM   #3
xlnlif
LQ Newbie
 
Registered: Feb 2003
Posts: 3

Original Poster
Rep: Reputation: 0
I don't believe I have a working compiler so I downloaded gcc. I assumed I didn't have one when I tried to install Apache and got the error in my first post. I did find another instance of gcc-3.2.1 under /usr/local/compiler/gcc-3.2.1 so I don't have a clue what I am doing I guess and could use some help to get this gcc-3.2.1 off the ground and get a working compiler going.

Thanks for replying. I do appreciate it.
 
Old 02-16-2003, 11:38 PM   #4
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
What distribution are you using? Did you install all of the glibc,gcc devel packages?

Let us know what you're using so that we can help you out a little easier.

PS-... you can put those sources anywhere you want, but really /usr/local/bin is kindof a wierd place ( bin/ directories usually only store binaries I usually put them in /usr/src/sources, /home/milo/sources, or somewhere in /mnt, but that's just my preferences.
 
Old 02-17-2003, 01:34 AM   #5
xlnlif
LQ Newbie
 
Registered: Feb 2003
Posts: 3

Original Poster
Rep: Reputation: 0
The distro I am using is RH 7.3. That's great advice for the SRC. I will move GCC there.

I hope having the distro information helps. As far as the dev packages. All I have is from the GCC org site that I downloaded which was the gcc-3.2.1.tar.gz and I opened that up and let it do its unpacking. That's really all I did so far aside from moving the package to the /usr/local/bin/gcc-3.2.1 directory. I don't understand why I have a /usr/local/Compiler/gcc-3.2.1 directory though since I never put one there - unless the unpacking created it for me.

Anyway - I hope the helps a bit. Thanks!!

Last edited by xlnlif; 02-17-2003 at 01:36 AM.
 
Old 02-17-2003, 07:43 PM   #6
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
I'm not too familiar with redhat, so you might want to get some more help with the redhat-specific stuff. But here's the overview:

You need a compiler to compile a compiler Whan you download the .tar.gz file, you are downloading the source code that will compile and give you the gcc executable. Since you can't do this, you need to install gcc from redhat rpm's.

The first thing you should do is "gcc -v" to see if you already have it installed. You might just need to install 'glibc-devel.rpm' or something like that.

Search around on this site... I'm sure it has been explained how to do this with redhat in much more detail than I can provide.

I think there's also a rpm command which will list all of the packages currently installed.

If you know that you have a compiler, you can set the environment variable CC with:

export CC='gcc'

Sorry I can't help more. Good luck with it all.
 
Old 02-18-2003, 05:22 AM   #7
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
You don't want to build gcc from the source. Trust me, esp on Redhat, you do not want to do this.

Instead, use the redhat packaging tools to find the development tools packages, and install them. When you can run gcc -v, you've got it set up. All distros ship with gcc as a package, but it's not always installed by default.
 
  


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
gcc-config not changing gcc MadnessASAP Linux - Software 0 07-23-2005 10:51 PM
Installing GCC Quiber Linux - Distributions 3 01-17-2005 04:29 AM
installing gcc help aaronruss Linux - Newbie 5 06-05-2004 02:29 AM
GTK+ 2.0 / pkg-config / gcc radiohead_rocks Programming 18 01-26-2004 05:46 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 06:28 AM


All times are GMT -5. The time now is 07:07 AM.

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