3.5 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]

[2] The make output used to be much prettier, but such is the price we pay for advanced compiling tools such as automake.

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]

[3] If make recompiles the source every time you run it, and there are no errors, your system clock may be set wrong.

% 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 bugs or problems that prevent Squid from compiling. You're more likely to find these sorts of bugs in the newer development versions. Report these to the developers.

Compiler installation problems

An improperly installed C compiler probably won't be able to compile Squid or any other moderately sized software package. Usually, compilers come pre-installed with the operating system, so you don't have to worry about that. However, if you attempt to upgrade your compiler after installing the operating system, you might make a mistake. Never copy a compiler installation from one machine to another, unless you are absolutely sure about what you are doing. I feel it is always better to install the compiler on each machine separately.

Always make sure that your compiler's header files are synchronized with the library files. The header files normally reside in /usr/include, while libraries are found in /usr/lib. Linux's popular RPM system makes it possible to upgrade one, but not the other. If the libraries are based on different header files, Squid may not compile.

If you want to upgrade the compiler on one of the open-source BSD variants, be sure to run make world from the /usr/src directory, rather than from the /usr/src/lib or /usr/src/include directories.

Here are some common compilation problems and error messages:

Solaris: make[1]: *** [libmiscutil.a] Error 255

This means that ./configure didn't find the ar program. Make sure /usr/ccs/bin is listed in your PATH environment variable. If you don't have the Sun compiler installed, you'll need the GNU binutils (http://www.gnu.org/directory/binutils.html).

Linux: storage size of 'rl' isn't known

This happens when the header and library files don't match, as described earlier. Be sure to upgrade both packages at the same time.

Digital Unix: Don't know how to make EXTRA_libmiscutil_a_SOURCES. Stop.

Digital Unix's make program isn't tolerant of the Makefile produced by the automake package. For example, lib/Makefile.in contains these lines:

noinst_LIBRARIES = \

        @LIBDLMALLOC@ \

        libmiscutil.a \

        libntlmauth.a \


After substitution, when lib/Makefile is created, it looks like this:

noinst_LIBRARIES = \


        libmiscutil.a \

        libntlmauth.a \


As shown above, the last line contains an (invisible) TAB character, which confuses make. You can get past this problem by installing and using GNU make, or by manually editing lib/Makefile (and any others exhibiting this problem) to make it look like this:

noinst_LIBRARIES = \


        libmiscutil.a \


If you have problems compiling Squid, check the FAQ first. You may also want to search the Squid web site (use the search box on the home page). Finally, if you're still stuck, send email to the squid-users@squid-cache.org list.

    Appendix A. Config File Reference