[squid-users] problems compiling Squid 3.2.3 on 32bit

From: schumacher <schumacher_at_ipd.net>
Date: Mon, 12 Nov 2012 12:47:34 +0100

Hi,

I have some problems compiling Squid-3.2.3 on Centos 5.5 or older Fedora
boxes (all 32bit).
Squid 3.1.x worked just fine on the very same servers.
Compiling on Centos 6.0 (64bit) works fine too.

This didn't work out:
export CFLAGS="${CFLAGS} -march=i486"

http://www.linuxquestions.org/questions/linux-software-2/glibc-make-error-undefined-reference-to-%60__sync_fetch_and_add_4-a-571961/

Here are the error messages when compiling Squid:

libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:31: undefined
reference to `__sync_add_and_fetch_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o):/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47:
more undefined references to `__sync_fetch_and_add_4' follow
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:31: undefined
reference to `__sync_add_and_fetch_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:38: undefined
reference to `__sync_bool_compare_and_swap_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:38: undefined
reference to `__sync_bool_compare_and_swap_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:38: undefined
reference to `__sync_bool_compare_and_swap_4'
libIpcIo.a(IpcIoFile.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:32: undefined
reference to `__sync_sub_and_fetch_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(Queue.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:38:
undefined reference to `__sync_bool_compare_and_swap_4'
ipc/.libs/libipc.a(Queue.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/Queue.cc:256: undefined reference
to `__sync_bool_compare_and_swap_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator--(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:36:
undefined reference to `__sync_fetch_and_sub_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator--(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:36:
undefined reference to `__sync_fetch_and_sub_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:32:
undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator++(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:35:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:32:
undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(StoreMap.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(StoreMap.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:32:
undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(StoreMap.o): In function `Ipc::Atomic::WordT<unsigned
char>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_1'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_1'
ipc/.libs/libipc.a(StoreMap.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(Pages.o): In function `Ipc::Atomic::WordT<int>::get()
const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(PagePool.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(PagePool.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:32:
undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(PagePool.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::operator-=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:32:
undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<unsigned int>::fetchAndAnd(unsigned int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:41:
undefined reference to `__sync_fetch_and_and_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::swap_if(int, int)':
/home/zsoft/proxy/squid-3.2.3/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>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<unsigned int>::swap_if(unsigned int, unsigned int)':
/home/zsoft/proxy/squid-3.2.3/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)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/mem/PageStack.cc:89: undefined
reference to `__sync_bool_compare_and_swap_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::operator+=(int)':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(PageStack.o): In function
`Ipc::Atomic::WordT<int>::get() const':
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/zsoft/proxy/squid-3.2.3/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
collect2: ld returned 1 exit status
libtool: link: rm -f ".libs/squidS.o"
make[3]: *** [squid] Error 1
make[3]: Leaving directory `/home/zsoft/proxy/squid-3.2.3/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zsoft/proxy/squid-3.2.3/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/zsoft/proxy/squid-3.2.3/src'
make: *** [all-recursive] Error 1

Regards,...
Received on Mon Nov 12 2012 - 11:47:43 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 12 2012 - 12:00:04 MST