Question:
What does compiling mean?
Leo
2012-07-13 11:20:53 UTC
Whilst installing a number of programms to my Linux squeeze system after the initial instilation so tutorials suggest that it may be necassary to compile it. What does that mean and how do I go about doing it?

I am trying to install and start yousing squid. I have installed it and am trying to configure it for use but am a little stuck. Is configuring the correct way to go?

Thanks for any hope. I know there are sort of 2 questions. Any answere to either question will be massively apreciated.
Three answers:
?
2012-07-13 11:31:56 UTC
Is this your first Linux? It sounds like you are running Debian 'Squeeze' (not Linux squeeze).



If you are trying to build your own kernel and you are adding stuff to the kernel not normally in Debian Squeeze, then yes you probably will need to compile a new kernel. But I doubt you are getting that into Linux right away (I could be wrong, but that's a HUGE step).



Now if you are using apt-get then and it says you might want to compile it, then that may happen. Then you will more than likely need to obtain the source code for the package. Then if the developer is nice they included a configuration file and a makefile. Usually you follow these steps after you have navigated to the directory in the terminal



./config

make

sudo make install



That is the way that probably 90% of Linux source code packages are compiled today.



As for Squid, I don't use it and am not familiar with it.



By the way, compiling is the action of taking human readable code (C/C++, Fortran, etc) and transforming it into bytecode or machine code depending on your target.
Nick T
2012-07-13 11:32:54 UTC
(SIMPLIFICATION)

Compiling is the process of converting the source code (human readable) into something the computer can execute (binary).

With Linux systems its not uncommon to get the source code and then compile it for your specific configuration. Usually there will be a Make file, ANT file or shell script that will build the whole thing for you ( I think its bootstrap.sh on squid?). It should be detailed in the documentation.



Squid will certainly require some configuration, the manuals are pretty good.
ratter_of_the_shire
2012-07-13 18:09:36 UTC
It means converting the human readable source code in machine executable binaries.



To do it you'll need a toolchain



$sudo apt-get install build-essential



then you'll need to install the dependencies (as listing in the install or compile documentation on the squid website, or in the README or INSTALL file included with the source tarbell. (.tar.gz) Usually if involves a lot of "apt-get install"s. Make sure to install the -dev packages too, or you'll run into compile error when the compiler tries to link to non-existent headers.



download the squid source



make a build folder

$mkdir squid-building



make it your current directory

$cd squid-building



extract the tarbell

$tar -xvf ../squid-.tar.gz

if the tarbel is not in the parent directory

$tar //squid-.tar.gz.



for autotools compiling is then done by

$./configure

$make

and if it builds successfully

$sudo make install



other build system may use slightly different procedures, read the INSTALL and README file after you extract the tarbell to be sure.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...