Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [21]

By Root 1952 0
directory and type ./configure, followed by any of the options mentioned previously. For example:

% cd squid-2.5.STABLE4

% ./configure --enable-icmp --enable-htcp

./configure's job is to probe your operating system and find out which things are available, and which are not. One of the first things it does is make sure your C compiler is working. If ./configure detects a problem with your C compiler, the script exits with this error message:

configure: error: installation or configuration problem: C compiler

cannot create executables.

Most likely, you'll never see that message. If you do, it means either your system doesn't have a C compiler at all or that the compiler isn't installed correctly. Look at the config.log file for hints as to the exact problem. If your system has more than one C compiler, you can tell ./configure which to use by setting the CC environment variable before running ./configure:

% setenv CC /usr/local/bin/gcc

% ./configure ...

After ./configure checks out the compiler, it looks for a long list of header files, libraries, and functions. Normally you won't have to worry about this part. In some cases, ./configure pauses to get your attention about something that may be a problem (such as not enough file descriptors). It may also stop if you specify incompatible or unreasonable command-line options. If something does go wrong, check the config.log output. ./configure's final task is to create Makefiles and other files based on the things it learned about your system. At this point, you're ready to begin compiling.

make

Once ./configure has done its job, you can simply type make to begin compiling the source code:

% make

Normally, this part goes smoothly. You'll see a lot of lines that look like this:[2]

source='cbdata.c' object='cbdata.o' libtool=no depfile='.deps/cbdata.Po'

tmpdepfile='.deps/cbdata.TPo' depmode=gcc /bin/sh ../cfgaux/depcomp gcc -DHAVE_

CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I. -I../

include -I. -I. -I../include -I../include -g -O2 -Wall -c 'test -f cbdata.c ||

echo './''cbdata.c

source='client_db.c' object='client_db.o' libtool=no depfile='.deps/client_db.Po'

tmpdepfile='.deps/client_db.TPo' depmode=gcc /bin/sh ../cfgaux/depcomp gcc -DHAVE_

CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I. -I../

include -I. -I. -I../include -I../include -g -O2 -Wall -c 'test -f client_db.c ||

echo './''client_db.c

source='client_side.c' object='client_side.o' libtool=no depfile='.deps/client_side.Po'

tmpdepfile='.deps/client_side.TPo' depmode=gcc /bin/sh ../cfgaux/depcomp gcc -

DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I. -I../

include -I. -I. -I../include -I../include -g -O2 -Wall -c 'test -f client_side.c ||

echo './''client_side.c

source='comm.c' object='comm.o' libtool=no depfile='.deps/comm.Po' tmpdepfile='.

deps/comm.TPo' depmode=gcc /bin/sh ../cfgaux/depcomp gcc -DHAVE_CONFIG_H -DDEFAULT_

CONFIG_FILE=\"/usr/local/squid/etc/squid.conf\" -I. -I. -I../include -I. -I. -I../

include -I../include -g -O2 -Wall -c 'test -f comm.c || echo './''comm.c

You may see some compiler warnings. In most cases, it is safe to ignore these. If you see a lot of them or something that looks really serious, report it to the developers as described in Section 16.5.

If the compilation gets all the way to the end without any errors, you can move to the next section, which describes how to install the programs you just built.

To verify that compilation was successful, you can run make again. You should see this output:[3]

% make

Making all in lib...

Making all in scripts...

Making all in src...

Making all in fs...

Making all in repl...

'squid' is up to date.

'client' is up to date.

'unlinkd' is up to date.

'cachemgr.cgi' is up to date.

Making all in icons...

Making all in errors...

Making all in auth_modules...

The compilation step may fail for a number of reasons, including:

Source code bugs

Usually the Squid source code is thoroughly debugged. However, you may encounter some

Return Main Page Previous Page Next Page

®Online Book Reader