LinuxQuestions.org
Register a domain and help support LQ
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 07-30-2009, 03:07 AM   #1
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Rep: Reputation: 15
Need to compile ANSI-C code, is there a compiler on FC8 for it?


Hi!

Someone I know has a program seemingly written in ANSI-C, which he wants to compile and link to another program's binaries.
He asked me whether I have a compiler, and I have a vague feeling that there should be a default compiler that comes with Fedora 8.

So, which compiler would be best to use?
How do I get hold of it on my computer?
Do I just take the source files and run a few commands on it. (I vaguely recall something like, "make" with a few flags or something) ?

Any info would be welcome.

Thanks

;-)
 
Old 07-30-2009, 03:19 AM   #2
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
It's probably not installed right now - you should run `sudo yum install gcc`, which will give you the C compiler gcc (as well as several others). If the files you get from your acquaintance include files called 'configure' and 'Makefile', the make three commands are `./configure` (performed wherever those files are), `make`, and `make install`. If you've just got a couple source files, you may need to just run gcc directly on them. If you're not sure, change to the directory where you have those files, run `ls -l`, post the output of that here, and we can definitely clear it up for you.
 
Old 07-30-2009, 03:31 AM   #3
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
Hi!

Thanks for the quick reply. I tried doing `yum install gcc` as the root, because it said that my normal user was not part of the sudoers, or something like that. Then it said "Another app is currently holding the yum lock; waiting for it to exit..." From another terminal I killed the process. Is this normal? Should I just leave it, and not kill the process?
 
Old 07-30-2009, 03:48 AM   #4
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
My bad on the sudo part - you can easily find an explanation of how to do this, but in short, you can enable sudo by running visudo as root and uncommenting (removing the % from) a line that will be labeled as providing this and then running `usermod -G wheel <yournormalusername>`. Don't use the NOPASSWD version of the line (for security reasons) and make sure that G's a capital G.

As for yum, it should tell you the name of that process. If it was just PackageKit, it's okay to kill it. By default, Fedora has a process running that will check updates for you periodically. If you've got a many-pointed star in your notification area that talks about updates when you click on it, that's what I'm talking about.

One more thing - why Fedora 8? It's not receiving updates anymore, so unless it's impossible, you should upgrade to F11 before you get comfortable.
 
Old 08-26-2009, 07:33 AM   #5
Azazwa
Member
 
Registered: Mar 2009
Distribution: Fedora 8, Ubuntu 9.10, SuSE 10, Fedora 14
Posts: 98

Original Poster
Rep: Reputation: 15
Hi!

I'm a chemistry student and for my project last semester I built a small cluster. Fedora 8 was necessary because of the chemical software we're running on it. I would have upgraded it if it was my own PC. Sorry for the long silence, I'm working in the lab this semester and I have less time to hang around computers. I'll follow your advice and keep you updated when the time allows it.

Thanks!
 
  


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
kernel source code for 2.6.25.11-60.fc8 shariqkhan1 Fedora 1 11-21-2008 02:06 AM
How does linux handle ansi code correctly? twirl Programming 1 09-30-2005 08:03 AM
xcuse me: no ANSI code on linux? minike Slackware 2 08-15-2005 09:17 AM
Libpcap Compile / Configure: ANSI Ioctl not found Ackmeco Programming 0 06-08-2004 10:29 PM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 04:31 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration