Re: [squid-users] Re: Compile Squid and make error

From: Gianluigi Ruggeri <gianluigi83_at_gmail.com>
Date: Wed, 4 Dec 2013 15:45:31 +0100

Hi,
I followed the squid wiki about CentoOS:

I runned these commands:

# You will need the usual build chain
yum install -y perl gcc autoconf automake make sudo wget

# and some extra packages
yum install libxml2-devel libcap-devel

# to bootstrap and build from bzr needs also the packages
yum install libtool-ltdl-devel

./configure command with these options:

  --prefix=/usr
  --includedir=/usr/include
  --datadir=/usr/share
  --bindir=/usr/sbin
  --libexecdir=/usr/lib/squid
  --localstatedir=/var
  --sysconfdir=/etc/squid

And during make command I obtain this:

libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get() const':
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o):/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/../src/ipc/AtomicWord.h:47: undefined
reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:31:
undefined reference to `__sync_add_and_fetch_4'
ipc/.libs/libipc.a(StoreMap.o): In function
`Ipc::Atomic::WordT<unsigned char>::get() const':
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_1'
ipc/.libs/libipc.a(Pages.o): In function `Ipc::Atomic::WordT<int>::get() const':
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/src/ipc/../../src/ipc/AtomicWord.h:47:
undefined reference to `__sync_fetch_and_add_4'
/home/Gianluigi/squid-3.2.12/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/Gianluigi/squid-3.2.12/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Gianluigi/squid-3.2.12/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/Gianluigi/squid-3.2.12/src'
make: *** [all-recursive] Error 1

2013/12/4 vikkymoorthy <vikkymoorthy_at_yahoo.com>:
> Hi Gianluigi,
>
> I'm new to linux environments and also trying to install squid & some
> filtering s/ws. I followed the instructions in
> http://wiki.squid-cache.org/SquidFaq/CompilingSquid and found no errors.
>
> If you don't have a compiler please install developer tools.
>
> # yum groupinstall 'Development Tools'
>
> Thanks,
> Vignesh K
>
>
>
>
> -----
> Regards,
> Vignesh Krishnamoorthy
> --
> View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Compile-Squid-and-make-error-tp4663662p4663664.html
> Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Wed Dec 04 2013 - 14:45:40 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 04 2013 - 12:00:04 MST