LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compiling, Making, Finding??? (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-making-finding-107986/)

Raggit 10-24-2003 09:13 AM

Compiling, Making, Finding???
 
Hello again guys & gals

Ok it took me a while to figure out how to compile something but I believe
I have finally done it. "Note the believe" I was trying to install GAIM for Linux
so what i did was extract it to a folder of its own on my home directory then
went into the terminal and put in the directory that GAIM was in then typed
out the command ./configure. Everything seemed to run off fine i saw alot of
yes' and ok's and then it said to type Make , which i did.

Now that you are up to speed on what i had going on maybe you can
explain a few things for me. :Pengy: Briefly go over installing programs
:Pengy: After each configure/compile or whatever the command is do I have
to run this make command? :Pengy: Once I assume the program has finished
doing its thing how do I run it, how do i find the directory it was installed too
and lastly how do i change the directory to where i can decide where to install it.
:Pengy: Do i have to reboot in order to use a newly installed program


Thanks, I hope I didn't wear out the questions on my first post.
Also if you feel as if i didn't do my homework, please guide me to the correct place
in the manual that will tell me all this information...




:newbie:

hw-tph 10-24-2003 09:56 AM

First off - always read the README and INSTALL files for the programs you download as source before you start installing it.

The configure script checks that you have all the required libraries and programs installed to compile the program. It doesn't actually compile the program - it creates a Makefile when done, with all the settings it figured out. Developers do this so you don't have to edit the Makefile manually which is tedious and often downright difficult.

make invokes the compiler and linker. make reads its instructions from the Makefile that was created by the configure script. Compiling can take a long time. Expect half a day if you're compiling Mozilla from source. ;)

When the compiling and linking is done there is often a target in the Makefile called installed. Read the INSTALL file - always! If this is the case you should become root (use the su command and enter the root password when prompted), then type make install. This copies the program files and associated libraries to the correct locations. Type exit to exit root mode.

When you install programs from source the files usually end up in the /usr/local directory tree, which is intended for "home-built" programs (meaning - programs not provided by your distribution). You will probably find the executable itself in /usr/local/bin, the libraries in /usr/local/líb, and so on.
You can usually change this behaviour during configuration. Instead of running just ./configure you could use ./configure --prefix=/usr or set the PREFIX environment variable, but I strongly advise you don't. You could overwrite files needed by your distribution if you do this.

And no, you dont' have to reboot in order to run a newly installed program.

Håkan

Raggit 10-24-2003 10:08 AM

Great, that was pretty filled with info. Thanks for the time you spent typing that out.
If any of you other guys have a different slant please feel free to fill in any blanks..That is to say if there are any blanks.


All times are GMT -5. The time now is 06:11 PM.