»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 09-17-2003, 10:37 AM   #1 (permalink)
Registered User
 
athlonxpguy's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 89
athlonxpguy is on a distinguished road
Send a message via ICQ to athlonxpguy

Can anyone recommend where I can get help on learning to compile programs for Linux? Like when you download the source tarball and then need to compile it.

Thanks

__________________
Asus A7V133
512mb PC-133
SB Live Value
LG 12x8x32 CD-RW
Liteon 16x DVD
GF2 MX400 32mb
W2K Pro
athlonxpguy is offline   Reply With Quote
Old 09-17-2003, 10:52 AM   #2 (permalink)
Registered User
 
Agent_Embryo's Avatar
 
Join Date: Oct 2001
Location: Sweden
Posts: 1,260
Agent_Embryo is on a distinguished road
Send a message via ICQ to Agent_Embryo
Usually you just

* download the tarball to a suitable directory,
* do: "tar zxvf filename.tgz" (if it's gzipped)
* go into the directory where the source was extracted
* type "./configure" this runs a script that configures the source for your system
* once finished type "make"
* and then when that's finished you can do "make install"

This is a quick and dirty method. I'm sure there are better ways but this has worked for me. Good Luck.
Agent_Embryo is offline   Reply With Quote
Old 09-17-2003, 11:20 AM   #3 (permalink)
Registered User
 
athlonxpguy's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 89
athlonxpguy is on a distinguished road
Send a message via ICQ to athlonxpguy
Thanks for the reply. Does the configure script usually come with the source? Also, with Mandrake (the one I am currently using), what developer packages would or should I normally install?

I am no programmer, so please be patient
__________________
Asus A7V133
512mb PC-133
SB Live Value
LG 12x8x32 CD-RW
Liteon 16x DVD
GF2 MX400 32mb
W2K Pro
athlonxpguy is offline   Reply With Quote
Old 09-17-2003, 01:08 PM   #4 (permalink)
Registered User
 
Agent_Embryo's Avatar
 
Join Date: Oct 2001
Location: Sweden
Posts: 1,260
Agent_Embryo is on a distinguished road
Send a message via ICQ to Agent_Embryo
Yes, the configure script is usually in the directory of the unpacked tarball.

If you installed the default developer packages you should be fine. I'm not a programmer eighter...
Agent_Embryo is offline   Reply With Quote
Old 09-17-2003, 01:51 PM   #5 (permalink)
Registered User
 
nukes's Avatar
 
Join Date: Oct 2002
Location: Scotland, UK
Posts: 2,946
nukes is on a distinguished road
Send a message via AIM to nukes Send a message via Yahoo to nukes
The developer packages are required if you need to build stuff from source. If you're just installing RPMs and don't program, you don't need them (for the most part)
They contain stuff like headers and docs about the libraries and programs. I would normally install the dev packages for all libraries that I install, because I am a coder and it saves headaches when configure can't find a file it needs while building from a tarball.
Quote:
Originally posted by Agent_Embryo
Usually you just

* download the tarball to a suitable directory,
* do: "tar zxvf filename.tgz" (if it's gzipped)
* go into the directory where the source was extracted
* type "./configure" this runs a script that configures the source for your system
* once finished type "make"
* and then when that's finished you can do "make install"

This is a quick and dirty method. I'm sure there are better ways but this has worked for me. Good Luck.
While this does work, I feel I should point a bit out about some points that you've missed.
to do "make install" you need to be root.
The configure script also takes command line arguments, so you select what features of the software you want to build. Do "./configure --help" for more info. The most used option is the --prefix= one. This says where to install the program to. Normally this defaults to /usr/local which is ok for some things, but others you need to set prefix to either /usr or even / depending on the program or library. Especially if you're upgrading an older one as /usr/local isn't always in everyones path, and the guidelines are a bit fuzzy as to why its there.
__________________
_____
NuKeS
nukes is offline   Reply With Quote
Old 09-17-2003, 01:52 PM   #6 (permalink)
Registered User
 
athlonxpguy's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 89
athlonxpguy is on a distinguished road
Send a message via ICQ to athlonxpguy
Good stuff. I have noticed that some tarballs do not have configure scripts, just a makefile. What is done with those?
__________________
Asus A7V133
512mb PC-133
SB Live Value
LG 12x8x32 CD-RW
Liteon 16x DVD
GF2 MX400 32mb
W2K Pro
athlonxpguy is offline   Reply With Quote
Old 09-18-2003, 01:27 PM   #7 (permalink)
Registered User
 
nukes's Avatar
 
Join Date: Oct 2002
Location: Scotland, UK
Posts: 2,946
nukes is on a distinguished road
Send a message via AIM to nukes Send a message via Yahoo to nukes
just "make"
Some will have a README/INSTALL file so have a look there, its always a good place to start
You can view it with:
"less README"
or "less INSTALL"
press Q to exit the pager.
__________________
_____
NuKeS
nukes is offline   Reply With Quote
Old 09-18-2003, 02:58 PM   #8 (permalink)
Registered User
 
athlonxpguy's Avatar
 
Join Date: Sep 2003
Location: UK
Posts: 89
athlonxpguy is on a distinguished road
Send a message via ICQ to athlonxpguy
I just compiled my first program...whoohoo
Also used URPMI, that is so cool! Another neat program is CheckInstall. I have got the hang of this now, thanks again all.
__________________
Asus A7V133
512mb PC-133
SB Live Value
LG 12x8x32 CD-RW
Liteon 16x DVD
GF2 MX400 32mb
W2K Pro
athlonxpguy is offline   Reply With Quote
Old 09-18-2003, 06:46 PM   #9 (permalink)
Registered User
 
Lemon[H]ead's Avatar
 
Join Date: Dec 1969
Location: Heriot-Watt Uni
Posts: 1,370
Lemon[H]ead is on a distinguished road
Send a message via AIM to Lemon[H]ead
a lot of the time after you extract the program, the details on how to compile/install are in the file INSTALL or README. After downloading and extracting, you often just have to do less INSTALL or less README to see the installation instructions.
Lemon[H]ead 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 On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 12:54 AM.