LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-11-2003, 05:48 AM   #1
Nukem
Member
 
Registered: May 2003
Location: Canada, TO.
Distribution: Slackware: in progress, Mandrake 9.2, Libranet, Vector
Posts: 373

Rep: Reputation: 30
Question Where to download C compiler


Whenever I'm trying to install a new program, I get the error message saying C compiler not found. Where can I download this C compiler. Is it the same thing as C++ compiler?? because I saw C++ compiler and it's not free.
So how can I get this C compiler that I need???
 
Old 12-11-2003, 05:54 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
It's on your installation CD's and it's called gcc (well, actually g++ for the C++ compiler).
You will also need to install a bunch of other development packages in order to get a sane build environment so you can compile applications.

Håkan
 
Old 12-11-2003, 12:50 PM   #3
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
You can download gcc from http://gcc.gnu.org/
I never had to install it myself but I'll see if I can help with any problems.
 
Old 12-12-2003, 03:32 PM   #4
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
When I tried compiling mplayer, it said my gcc 2.9.6 wasn't supported. What version should I have? And how do you upgrade/downgrade the compiler? Is there anything else I should know that anyone can think of off the top of their heads? Thank you so much.
 
Old 12-12-2003, 03:43 PM   #5
WindowsBurner
Member
 
Registered: Nov 2003
Location: In chaos
Distribution: OpenSuse
Posts: 293

Rep: Reputation: 30
Well I have gcc 3.2.2 and it compiled fine.Just download the newest gcc from http://.gcc.gnu.org and follow the instructions for compiling and installing it.
Then you should be able to compile Mplayer

Hope i was helpfull XDDDD
 
Old 12-12-2003, 04:02 PM   #6
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
2.96 was a development release that RedHat was incredibly stupid to include in their stable release just because they wanted to be cutting edge. It has a ton of flaws and won't even compile the Linux kernel (which would be kinda handy in a Linux distribution, don'cha think?).

Anyway, downgrade to 2.95 or upgrade to 3.2 or 3.3. All these work just fine. Check you distribution's update directory, I believe there are 3.2 updates for RedHat (if that's what you use). Plus, it's possible that another - good - version is installed parallell with the 2.96 version. Do an ls -l /usr/bin | grep gcc to see what gcc-related binaries you have. In some distributions /usr/bin/gcc is a symlink to the real executable. If so, remove that symlink and create a new one pointing to the gcc version you wish to use.

Håkan
 
Old 12-13-2003, 12:24 AM   #7
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
First, I ran the command ls -l usr/bin | grep gcc and the result was: no such file or directory.

Okay, I downloaded gcc 3.2.2 to my usr/local/src file. I had to tar as root. That worked fine. Then I cd to the new directory and when I tried to configure I got this error:

Configuring for a i586-pc-linux-gnuoldld host.
Created "Makefile" in /usr/local/src/gcc-3.2.2 using "mt-frag"
./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.

How do I set the environment variable CC to a working compiler and what does this mean? Does it have anything to do with the gcc version I currently have: 2.9.6?

Thanks hw-tph or anybody who helps!!!
 
Old 12-13-2003, 01:52 AM   #8
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Do a "which gcc" to find it

If it's not found then do a "locate gcc | grep /bin/gcc".

To set it:
export CC=/pathtoyourgcc/gcc


BTW, the command you should have ran above is "ls -l /usr/bin | grep gcc", vs "ls -l usr/bin | grep gcc".

Last edited by DaHammer; 12-13-2003 at 01:54 AM.
 
Old 12-13-2003, 02:51 AM   #9
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
ran which gcc, following reply:

which: no gcc in (/usr//bin:/bin:/usr/bin::/usr/local/bin:/usr/X11R6/bin:/usr/ga mes:/usr/lib/jre-1.4.2_01/bin:/home/sean/bin)

ran locate, this response:

[sean@localhost sean]$ locate gcc | grep /bin/gcc
bash: locate: command not found

I tried the correct list command with the correct / in front of usr and nothing happened, it just returned me to the command line.

I'll try searching for it by looking in all the directories, until then, if you have any more suggestions, they'd be appreciated. Thanks again for everybody's help.
 
Old 12-13-2003, 03:02 AM   #10
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
I am a newbie, so pardon me if this is a stupid question, but I found the following file under my /lib directory:

libgcc_s-3.3.1.so.1

is that significant? Would it help? I can't find what the .so file extension means?

I'm really trying!!!!
 
Old 12-13-2003, 11:01 PM   #11
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
I believe that lib is from gcc-3.3.1, but I'm not sure. At any rate, something is likely haywire with your compiler, if you even have one installed. You never said which distro you have, but my advice would be for you to use your distro's app management system to uninstall/reinstall the compiler and any dependancies it needs.
 
Old 12-14-2003, 12:05 AM   #12
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
DeHammer, thanks for all your help. I have mandrake 9.2 but I'm thinking of switching over to Vector, an offshoot of Slackware. Both seem to me to be ideal for being able to compile your own programs, which is something I'd really like to do. I tried looking for the install for the gcc on the mandrake package install menu, but it is not listed. Which is very weird. I'm really beginning to believe it's a Mandrake thing; either that, or I installed Mandrake wrong, without all the development files. I don't think I did that though; I think I did it right. Anyway, I want something I think is more pure and more in tune with compiling, so I'm either going to go slack or vector. I think this mandrake thing is a deadend; even when I tried to install mplayer from their package list, it didn't work; said I was missing some lib file. I just don't care to pursue that route. It's just too inefficient. I noticed your a slack user, if you have any advice, feel free to offer it. Thanks.
 
Old 12-14-2003, 12:31 AM   #13
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Well, I'm a biased Slackware user. I started out with Mandrake 3 or so years ago, then went to Redhat, then decided to try Slack. I was impressed right out of the gate with Slackware and probably won't ever use anything else as a main OS again. It does challenge you as a user to learn more about Linux than say Mandrake or Redhat though. Alot of the things that are almost automatic in Mandrake aren't in Slackware. You'll be forced to setup your own X configuration taylored to your hardware and such as that. But you'll learn a great deal doing it. So it really just depends on you and your needs. If you want something you can just install that will work without much involvement from you, then you should probably stick with a distro like Mandrake. On the other end of the spectrum, if your geniunely interested in learning the inner workings of Linux, then Slackware is a great way to do that. There are more hard core versions of Linux, like say Linux From Scratch, though.
 
Old 12-14-2003, 01:12 AM   #14
cseanburns
Member
 
Registered: Nov 2003
Distribution: Fedora, Debian, Ubuntu, FreeBSD
Posts: 129

Rep: Reputation: 23
De Hammer, how's your LFS going? I'm really curious about that too. I've
been reading a little here and there. Sounds fascinating.
 
Old 12-14-2003, 07:34 PM   #15
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
I did the lastest version of LFS shortly after it was released, went well, didn't have any trouble that I recall. Also did the BLFS to the point of getting KDE up and running, but haven't really had time to mess with it much sense.
 
  


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 12:35 PM
where can i download a free f95 compiler ztdep Programming 1 07-20-2005 07:50 PM
where to download free c++ compiler for redhat linux 9.0 henrylam Programming 2 05-16-2004 05:54 AM
where to download a c++ compiler for redhat linux 9 henrylam Linux - Software 1 05-16-2004 04:37 AM
Where can i download C compiler from waheedrafiq Linux - Software 2 01-03-2004 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 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
Open Source Consulting | Domain Registration