Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Newbie
Reload this Page How do you compile a program
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Newbie If you're new to the wonderful world of Linux, start here!

Reply
 
Thread Tools Display Modes
Old 03-03-2004   #1 (permalink)
Linux Newbie
 
Join Date: Sep 2003
Location: Brisbane, Australia
Posts: 123
How do you compile a program

Okay, this is one of those questions that seem really bad and google would solve in an instant!

However im actually really stumped. The problem is such, i just downloaded xfree latest version, thrown it onto a cd and put the cd into my fedora computer.

Now its sitting in the computer, i have no idea what to do with it!

Ive learnt several things while reading what people have to say, and they often say linux software has to be compiled on the individual computer so that it its the most efficient it can be.

But what i havnt heard is, how do you compile it?

I hate to be a real pain, but i couldnt find the answer in google as a generic answer just bombarded with how to compile kernals and that just bewildered me.

Im running fedora... and i just want to know basically what i would have to do to compile software in a kind of step by step manner, im sure after i do it once with someone holding my hand i wont need to seem so stupid again =D (god and im taking an IT course...)

Thanks for your patientce and ignoring any spelling errors!
__________________
/skythra
Skythra is offline   Reply With Quote
Old 03-03-2004   #2 (permalink)
Linux Enthusiast
 
Opnosforatou's Avatar
 
Join Date: Dec 2003
Location: Vleuten, The Netherlands
Posts: 552
okies, first things first.

On the CD, are there tar.gz or RPM files ?

[Part 1: RPM's]

If they are RPM you can install those files with the command : rpm -Uvh or rpm -ivh

rpm -ivh installs the rpm.
rpm -Uvh Upgrade/Updates the allready installed RPM.
[used to go to new version of existing application; hence apache 1.3.28 to 1.3.29; as example]

Source rpms can be found back in /usr/src/redhat/SRPMS/<application name> where the full source code should be unpacked.
Building you own RPM's isn't easy, when you are new to this. Check here for an rpm howto.

If you downloaded binary RPM's you don't need to compile anything.
Just install them using RPM and they should work.


[Part 2: tar.gz or tgz files]

If you downloaded the source for X then create an directory, move the tar.gz or tgz file into it, the cd <directory>, and type : tar -zxvf <filename> to unpack it.

Use man tar for explemation on how to use tar.

To build the source:

type ./config or ./configure, type ls to see which one.
This configures the source files for your system.
After this is all done type: make
This wil build the source files into one or more executables.
type: make install to install the application.

This is roughly the basics.

[Disclaimer: PLEASE read the included README or INSTALL file on how to compile / install /etc source files. ]

[Disclaimer 2: Make sure you have the development tools installed during setup.... or install them ...]
__________________
---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.
Opnosforatou is offline   Reply With Quote
Old 03-03-2004   #3 (permalink)
Linux Newbie
 
Join Date: Sep 2003
Location: Brisbane, Australia
Posts: 123
okay i knew there was a reason i could use that "everything" option when installing packages... ^_~ i better install that developer package =D

Thanks thats basically the exactly response i wanted and i couldnt ask for a better one.

and they are the tar.gz ones you mentioned =D im going to pring this page and stick it to the table.. im slowly covering it with info i need as basics so when i forget something i just look down and see teh linuxforums.org responses =D

Thanks!
__________________
/skythra
Skythra is offline   Reply With Quote
Old 03-03-2004   #4 (permalink)
Linux Enthusiast
 
Opnosforatou's Avatar
 
Join Date: Dec 2003
Location: Vleuten, The Netherlands
Posts: 552
There is another howto here on the linux forum: http://www.linuxforums.org/tutorials/RPM-HOWTO/

Forgot about that one..... Ooops.
__________________
---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.
Opnosforatou is offline   Reply With Quote
Old 03-03-2004   #5 (permalink)
Linux Newbie
 
Join Date: Sep 2003
Location: Brisbane, Australia
Posts: 123
Oh i think ill quickly pass this problem:

after so long, for some reason i cant eject my cd rom. of course its an LG one and i havnt updated the firmware stuff, would that cause it?

It just says in fedora that its busy. I can read it (i assume) just not eject it.

strange.
__________________
/skythra
Skythra is offline   Reply With Quote
Old 03-03-2004   #6 (permalink)
Linux Enthusiast
 
Opnosforatou's Avatar
 
Join Date: Dec 2003
Location: Vleuten, The Netherlands
Posts: 552
umount /dev/cdrom

This will unmount the cd/dvd

To mount it : use the automounter or do it manualy by typing: mount -t iso9660 /dev/cdrom /mnt/cdrom

see man mount for the manual.


__________________
---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.
Opnosforatou is offline   Reply With Quote
Old 03-03-2004   #7 (permalink)
Linux Guru
 
fingal's Avatar
 
Join Date: Jul 2003
Location: Birmingham - UK
Posts: 1,533
Perhaps your cd drive is still mounted? You need to unmount it before it will spit out the disk.
__________________
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
fingal is offline   Reply With Quote
Old 03-03-2004   #8 (permalink)
Linux Guru
 
fingal's Avatar
 
Join Date: Jul 2003
Location: Birmingham - UK
Posts: 1,533
Sorry... a dual post!
__________________
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
fingal is offline   Reply With Quote
Old 03-03-2004   #9 (permalink)
Linux Enthusiast
 
Opnosforatou's Avatar
 
Join Date: Dec 2003
Location: Vleuten, The Netherlands
Posts: 552
No probs, those things happen

__________________
---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.
Opnosforatou is offline   Reply With Quote
Old 03-03-2004   #10 (permalink)
Linux Newbie
 
Join Date: Sep 2003
Location: Brisbane, Australia
Posts: 123
Quote:
Originally Posted by Opnosforatou
There is another howto here on the linux forum: http://www.linuxforums.org/tutorials/RPM-HOWTO/

Forgot about that one..... Ooops.
You know, i have never seen this before.

You know, i wish i had seen this before.

You know, im at a loss of words, and i cant begin to thank you enough =D

Thats a beautiful link!
__________________
/skythra
Skythra is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 01:23 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0