LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2003, 01:05 AM   #1
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Rep: Reputation: 15
C compiler


I'm sorry, but I can't seem to find and install a C compiler.

If RedHat 8.0 comes with one, where is it hidden?

I'm trying to install the Nvidia driver for my GF 3 Ti 200, but I'm required to "make" some files, and I need a C compiler for that.
I've been looking for days, and I've searched these forums, but apparently, I'm not looking in the right place, because I haven't found anything yet. (I found the Intel compiler, and almost installed it, but I couldn't get the license to work. ) If anyone can point me to a simple-to-install one (i.e. an .rpm or something), or a walkthrough that is intended for a Linux-newbie, it would be much appreciated.
 
Old 07-10-2003, 02:08 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
I understand that you have not used linux that much.
(So that's why I am replying to this post).
There is gcc which is the gnu c compiler.
Tell me what happens when you type the command make where the makefile is located?
 
Old 07-10-2003, 02:22 AM   #3
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
I apologize, but I do not completely understand what you are asking.

Okay, well, I ran the "configure" script for BINUTILS and got the following error message:

./configure: line 7: cc: command not found
*** The command 'cc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
 
Old 07-10-2003, 02:26 AM   #4
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
do
export CC=gcc
it should work now
 
Old 07-10-2003, 02:32 AM   #5
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
The command "export CC=gcc" didn't do anything.
 
Old 07-10-2003, 02:37 AM   #6
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
after the command do ./configure
or instead of following
export CC=gcc
you could also do
./configure --with CC=gcc(or something like this)
try
./configure --help
for the exact syntax
 
Old 07-10-2003, 02:46 AM   #7
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
The command:
./configure --with CC=gcc
caused the following error message:
configure: Unrecognized option: "--with"; use --help for usage.

And I couldn't find anything relating to what I'm trying to do when I did:
./configure --help
 
Old 07-10-2003, 02:50 AM   #8
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
edit your configure file and
look for location of CC
there
do
CC=gcc
and now run
./configure
or
you could also try
export CC=gcc
followed by
./configure

Last edited by rch; 07-10-2003 at 02:51 AM.
 
Old 07-10-2003, 02:56 AM   #9
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
Hm... Now I get:
./configure: line 7: gcc: command not found
*** The command 'gcc -o conftest -g conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
 
Old 07-10-2003, 02:59 AM   #10
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
First tell me what did you do?
Did you edited the configure file or
you exported CC
Next
do
whereis gcc
it should return something like
/usr/bin/gcc
instead of only gcc
try
/usr/bin/gcc(or whatever whereis gcc returns)
 
Old 07-10-2003, 03:02 AM   #11
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
I exported CC - editing the configure file didn't do anything that I could see( I still got the same error message).

And, oddly, when I tried:
whereis gcc
It came up with:
gcc:
and not /usr/bin/gcc or anything like that.
 
Old 07-10-2003, 03:05 AM   #12
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
try the command
gcc
or after
gc<press tab here>
does it show something
if not
try
rpm -q gcc
does it return something?
 
Old 07-10-2003, 03:07 AM   #13
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
[root@localhost root]# gcc
bash: gcc: command not found
[root@localhost root]# rpm -q gcc
package gcc is not installed


Well, I take that to be pretty self-explanatory.
Where can I get the rpm?
 
Old 07-10-2003, 03:13 AM   #14
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
you get gcc from the RedHat installation CDs
mount the CD (the first one)
mount /mnt/cdrom
cd /mnt/cdrom/Redhat/RPMS/
rpm -Uvh --nodeps gcc<press tab here>
or you can also get the same from the website
http://gcc.gnu.org/
or
directly from the site
http://rpmseek.com/rpm-pl/gcc-33.htm...s=GCC:PN:0:0:0
 
Old 07-10-2003, 03:27 AM   #15
Brian of Gep
Member
 
Registered: Jul 2003
Location: Arlington, Texas
Distribution: Red Hat 9, Fedora Core 2-test1
Posts: 55

Original Poster
Rep: Reputation: 15
Okay, thanks! I installed all of the gcc rpms,
but I'm still getting an error message:
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in /root using "mt-frag"
gcc: installation problem, cannot exec `as': No such file or directory
*** The command 'gcc -o conftest -O2 -W -Wall conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

And I'm not quite sure why it thinks I have an i686 - I'm running an Athlon XP 1700+. not a recent Pentium.
 
  


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
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
C++ IDE+Compiler?Java IDE+compiler? Boby Linux - Software 3 05-31-2005 02:12 PM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 05:31 AM
No compiler to compiler the compliler NewtonIX Linux - Newbie 13 11-03-2003 06:32 AM
compile a compiler without a compiler? lackluster Linux - General 18 01-02-2003 08:55 PM


All times are GMT -5. The time now is 04:39 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