Alex Rousskov wrote:
Just go ahead and cut-and-paste those commands into your shell, starting
from the top Squid source directory. The last command may produce some
output. You do not need to cut-and-paste comments (lines starting with
'#').
The first command places you into Squid's lib directory. The second
precompiles MemPool.cc into MemPool.E using g++. The third searches for
mallopt in that precompiled file.
core# 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
/usr/lib/crt1.o(.text+0x85): In function `_start':
: undefined reference to `main'
/var/tmp//ccu9mk8h.o(.text+0x32): In function
`memPoolIterateDone(MemPoolIterator**)':
../include/SquidNew.h:50: undefined reference to `xassert'
/var/tmp//ccu9mk8h.o(.text+0x6d): In function
`memPoolIterateNext(MemPoolIterator*)':
../include/splay.h:265: undefined reference to `xassert'
/var/tmp//ccu9mk8h.o(.text+0x1fe): In function `MemPools::GetInstance()':
../include/SquidNew.h:45: undefined reference to `xmalloc'
/var/tmp//ccu9mk8h.o(.text+0x35f): In function
`MemImplementingAllocator::flushMeters()':
/data/source/squid-3.0.PRE6/lib/MemPool.cc:477: undefined reference to
`squid_curtime'
/var/tmp//ccu9mk8h.o(.text+0x408):/data/source/squid-3.0.PRE6/lib/MemPool.cc:471:
undefined reference to `squid_curtime'
/var/tmp//ccu9mk8h.o(.text+0x4b7): In function `MemPools::flushMeters()':
/data/source/squid-3.0.PRE6/lib/MemPool.cc:517: undefined reference to
`squid_curtime'
/var/tmp//ccu9mk8h.o(.text+0x4f6):/data/source/squid-3.0.PRE6/lib/MemPool.cc:518:
undefined reference to `squid_curtime'
/var/tmp//ccu9mk8h.o(.text+0x5b5):/data/source/squid-3.0.PRE6/lib/MemPool.cc:516:
undefined reference to `squid_curtime'
/var/tmp//ccu9mk8h.o(.text+0x61e): In function `MemMalloc::allocate()':
----snip---
>::insert(MemChunk*, int (*)(MemChunk* const&, MemChunk* const&))':
/data/source/squid-3.0.PRE6/lib/MemPool.cc:170: undefined reference to
`xfree'
/var/tmp//ccu9mk8h.o(.gnu.linkonce.t._ZN5SplayIP8MemChunkE6insertERKS1_PFiS4_S4_E+0x4d):
In function `Splay<MemChunk*>::insert(MemChunk* const&, int
(*)(MemChunk* const&, MemChunk* const&))':
/data/source/squid-3.0.PRE6/lib/MemPool.cc:147: undefined reference to
`xassert'
/var/tmp//ccu9mk8h.o(.gnu.linkonce.t._ZN9MemMallocD0Ev+0x11): In
function `MemMalloc::~MemMalloc()':
../include/splay.h:316: undefined reference to `xfree'
core# fgrep -3 mallopt
MemPool.E
fgrep: MemPool.E: No such file or directory
core#
and
g++ --version
core# g++ --version
g++ (GCC) 3.4.4 [FreeBSD] 20050518
Noted.
Thank you,
Alex.
TIA
Zen