Re: [squid-users] error during make

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Wed, 08 Aug 2007 22:12:47 -0600

On Thu, 2007-08-09 at 09:48 +0700, zen wrote:
> > awk '/checking.for.mallopt/,/result:/' config.log
> >
> here the result:
> configure:42213: checking for mallopt
> configure:42270: gcc -o conftest -Wall -g -O2 -g -pthread conftest.c
> -lpthread -lm >&5
> /var/tmp//ccQv9b17.o(.text+0x14): In function `main':
> /data/source/squid-3.0.PRE6/conftest.c:222: undefined reference to
> `mallopt'
...
> configure:42301: result: no

Hm... Something does not add up here. ./configure found no mallopt and
should have undefined the HAVE_MALLOPT #define in include/autoconf.h
Do you have the following lines in that file (search for HAVE_MALLOPT)?

> /* Define to 1 if you have the `mallopt' function. */
> /* #undef HAVE_MALLOPT */

If yes, then Squid cannot be using mallopt in MemPool.cc because the
usage is guarded:

> #if HAVE_MALLOPT && M_MMAP_MAX
> mallopt(M_MMAP_MAX, MEM_MAX_MMAP_CHUNKS);
> #endif

So if HAVE_MALLOPT is undefined, then GCC would not even try to compile
the mallopt() call above!

Please let me know the output of

        fgrep -2 MALLOPT include/autoconf.h

and the output of

        cd lib/
        # this is the compilation command from your original email except I told GCC
        # to stop at the preprocessing step and save the results into MemPool.E
        g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -Werror -Wall -Wpointer-arith -Wwrite-strings -Wcomments -D_REENTRANT -g -O2 -MT MemPool.o -MD -MP -MF ".deps/MemPool.Tpo" -E -o MemPool.E MemPool.cc
        fgrep -3 mallopt MemPool.E

and
        g++ --version

Thank you,

Alex.
Received on Wed Aug 08 2007 - 22:13:12 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT