What is the objective of Configure, Make, Make Install?
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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What is the objective of Configure, Make, Make Install?
I installed the gcc and other softwares wlth .tar extension. We have to do a step by step procedure while installing the sofware which have .tar extension.
1) First, we have to unzip the file and give ./configure
2) Second, we have to give make
3) Third, we logon to root and give make install.
My question is, why we are doing the above steps sequentially and what is actually happend at the each and every steps(configure,make,make install). What is the objective of Configure, Make, Make Install? I request u to give elloborate explanation, because i m new to Linux. Waiting for ur valuable reply.
./configure is optional but sometimes used to make a make file. Then make is used to build any modules then make install install the modules.
most people just run the commands like this running make and make install on the same line.
The configure script is, as the name suggests, used to configure the built software. You can pass options to it to specify where the software should be installed, what features it is built with and so on. The exact options available are different depending on the software. make usually builds the software (which usually means compiling the source code) and make install installs it, i.e. copies the executables, shared libraries, documentation, etc to the right places. There's more to it than I've described here, but this is about as much as I know.
Originally Posted by rkarthi2k5
We have to do a step by step procedure while installing the sofware which have .tar extension.
This is somewhat pedantic, but please be aware that tar files don't necessarily need to contain software - they're just used to collect files together. So yes, putting source code for software is one use for them, but not the only one.
What your are describing is called "compiling". Compiling is turning source code, a set of instructions written and understood by humans into a language that is understood by computers. The instructions are written in a computer language and the most common one is called "C".
If you have the source code you can turn it into a program that can be understood and executed by your computer even if you have no knowledge of programming (writing instructions in a computer language).
You usually do this by executing three commands at your terminal:
This allows the computer to see what kind of set up you have on your computer and to be sure you have all the necessary tools to do the job.
This does the real work - the translation from the source code to the machine code which the computer will use to actually do what the program is intended for.
3 make install
This simply takes the machine code and puts it in the correct place so that the computer knows where to find all the various parts necessary to do the job.
In most distros you don't really need to ever compile anything. You can usually get pre-compiled programs for your distro without having to go through all these steps. Some programs are only available in source code and if you want to use them then you will have to go through these steps.
Compiling is done not just in Gnu/Linux and you can use Gnu/Linux without ever having to do it yourself. Just about every program that you use on any computer has been compiled. Usually it's not done by the end user but it is done.
I hope that's simple and clear enough.
the linked page is a great read. Thanks a lot! I bookmarked it.
There are somethings that are not totally clear to me.
I understand it this way: configure is a shell script (and NOT an executable), that can be interpreted by bash for example). Because not everyone has the current working directory in their search path you have to write ./configure to make sure you execute the script in the current dir.
In contrast make IS an executable and by typing make you execute it. When make starts it first looks in the CURRENT DIRECTORY for a file called Makefile and then buils the app according to it. ...make install installs the app.
Do I understand all this correctly? What was not totally clear to me was what 'configure' and 'make' really are (script, app, interpreted by what?)
Can anyone please confirm or correct my way of understanding the process?
I believe there are some recommendations for using the make stuff. You should run ./configure and make as a normal user in a subdirectory you have access to. Then if you want your program to be run by other users, switch to the root user before running make install. That will put the compiled stuff into system wide directories accessible to anyone. Otherwise it will put it into your home directory, like /home/<you>/bin.