I noticed there are a few people having trouble compiling SG 1.2.0 on
Redhat even after following the instructions but not much in the way of
answeres. After hitting the same snag as everyone else per:

checking for db_version in -ldb... no

The Berkley DB library is required for squidGuard
  to compile. Get it from http://www.sleepycat.com
  use --with-db=DIR or --with-db-lib=DIR to specify
  its location. (default is /usr/local/BerkeleyDB)

A hint to the problem can be seen in the config.log file for which I had:

configure:2432: gcc -o conftest -g -O2 -I/usr/local/BerkeleyDB.3.2/include
-I/usr/local/BerkeleyDB.3.2/incl
ude -L/usr/local/BerkeleyDB.3.2/lib conftest.c -ldb >&5
/usr/local/BerkeleyDB.3.2/lib/libdb.a(mut_pthread.o)(.text+0xb5): In
function `__db_pthread_mutex_init':
: undefined reference to `pthread_condattr_setpshared'
/usr/local/BerkeleyDB.3.2/lib/libdb.a(mut_pthread.o)(.text+0xd3): In
function `__db_pthread_mutex_init':
: undefined reference to `pthread_mutexattr_init'
/usr/local/BerkeleyDB.3.2/lib/libdb.a(mut_pthread.o)(.text+0xed): In
function `__db_pthread_mutex_init':
: undefined reference to `pthread_mutexattr_setpshared'
/usr/local/BerkeleyDB.3.2/lib/libdb.a(mut_pthread.o)(.text+0x124): In
function `__db_pthread_mutex_init':
: undefined reference to `pthread_mutexattr_destroy'
/usr/local/BerkeleyDB.3.2/lib/libdb.a(mut_pthread.o)(.text+0x1e9): In
function `__db_pthread_mutex_lock':
: undefined reference to `pthread_mutex_trylock'
: undefined reference to `pthread_mutex_trylock'


The problem is that the pthread library needs to be included so if you set
LIBS="-lpthread" it should work fine... well it did for me anyway.

I use:
CC="gcc" CFLAGS="-O3" LIBS="-lpthread" ./configure <plus options>

HTH people.

Cheers
Peter Arnold

Reply via email to