Need to compile ANSI-C code, is there a compiler on FC8 for it?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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) ?
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.