Re: [squid-users] Compile error Squid 3.2.1

From: Jeff Gerard <mysubscriptions_at_shaw.ca>
Date: Tue, 28 Aug 2012 08:24:03 -0600 (MDT)

Thanks for the suggestions. Unfortunately this goes beyond my understanding of compiling as I have no idea as to how to tell if I have multiple libc libraries installed, and if I do, how to account for it using CXXFLAGS.

----- Original Message -----
From: "Amos Jeffries" <squid3_at_treenet.co.nz>
To: squid-users_at_squid-cache.org
Sent: Tuesday, 28 August, 2012 4:50:44 AM
Subject: Re: [squid-users] Compile error Squid 3.2.1

On 28/08/2012 6:25 a.m., Jeff Gerard wrote:
> I am looking for help in determining why my compile will not work.
>
> I have been running into the following errors during compile:
>
> /root/work/squid-3.2.1/src/ipc/../../src/ipc/AtomicWord.h:47: undefined reference to `__sync_fetch_and_add_4'
> ipc/.libs/libipc.a(PageStack.o):/root/work/squid-3.2.1/src/ipc/../../src/ipc/AtomicWord.h:47: more undefined references to `__sync_fetch_and_add_4' follow
> ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT<unsigned int>::swap_if(unsigned int, unsigned int)':
> /root/work/squid-3.2.1/src/ipc/../../src/ipc/AtomicWord.h:38: undefined reference to `__sync_bool_compare_and_swap_4'
> ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT<int>::swap_if(int, int)':
> /root/work/squid-3.2.1/src/ipc/mem/PageStack.cc:88: undefined reference to `__sync_bool_compare_and_swap_4'
> ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT<int>::operator+=(int)':
> /root/work/squid-3.2.1/src/ipc/../../src/ipc/AtomicWord.h:31: undefined reference to `__sync_add_and_fetch_4'

For some reason your system header files are defining those __sync
symbols but the libc which is being linked against does not contain them.

Please check your system for multiple libc libraries and ensure only one
version is installed (latest by version is best) or that CXXFLAGS is
passed arguments to identify the latest one explicitly.

> collect2: ld returned 1 exit status
> libtool: link: rm -f ".libs/squidS.o"
> make[3]: *** [squid] Error 1
> make[3]: Leaving directory `/root/work/squid-3.2.1/src'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/root/work/squid-3.2.1/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/root/work/squid-3.2.1/src'
> make: *** [all-recursive] Error 1
>
> I am running this on Fedora Core 6 (have been running 3.1.20 with no issue) and gcc version is 4.1.2

3.1 series contains no SMP support or atomic operations.

AMos
Received on Tue Aug 28 2012 - 14:24:11 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 29 2012 - 12:00:08 MDT