Search squid archive

Re: Compile error Squid 3.2.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Interesting development...
Although my gcc version is supposed to be 4.1.2, when I found libstdc++.a, it was symlink'd from a 4.1.2 dir to a 4.1.1 dir.

Anyway, I tried recompiling again using "CXXFLAGS=-L/usr/lib/gcc/i386-redhat-linux/411" and although the error is formatted different than before, it seems to be the same issue. Maybe there's more info in the error now that might help?


libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::get() const':
IpcIoFile.cc:(.text._ZNK3Ipc6Atomic5WordTIiE3getEv[Ipc::Atomic::WordT<int>::get() const]+0x15): undefined reference to `__sync_fetch_and_add_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::operator+=(int)':
IpcIoFile.cc:(.text._ZN3Ipc6Atomic5WordTIiEpLEi[Ipc::Atomic::WordT<int>::operator+=(int)]+0x14): undefined reference to `__sync_add_and_fetch_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::swap_if(int, int)':
IpcIoFile.cc:(.text._ZN3Ipc6Atomic5WordTIiE7swap_ifEii[Ipc::Atomic::WordT<int>::swap_if(int, int)]+0x1b): undefined reference to `__sync_bool_compare_and_swap_4'
libIpcIo.a(IpcIoFile.o): In function `Ipc::Atomic::WordT<int>::operator-=(int)':
IpcIoFile.cc:(.text._ZN3Ipc6Atomic5WordTIiEmIEi[Ipc::Atomic::WordT<int>::operator-=(int)]+0x14): undefined reference to `__sync_sub_and_fetch_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function `Ipc::Atomic::WordT<int>::operator++(int)':
ReadWriteLock.cc:(.text._ZN3Ipc6Atomic5WordTIiEppEi[Ipc::Atomic::WordT<int>::operator++(int)]+0x21): undefined reference to `__sync_fetch_and_add_4'
ipc/.libs/libipc.a(ReadWriteLock.o): In function `Ipc::Atomic::WordT<int>::operator--(int)':
ReadWriteLock.cc:(.text._ZN3Ipc6Atomic5WordTIiEmmEi[Ipc::Atomic::WordT<int>::operator--(int)]+0x21): undefined reference to `__sync_fetch_and_sub_4'
ipc/.libs/libipc.a(StoreMap.o): In function `Ipc::Atomic::WordT<unsigned char>::get() const':
StoreMap.cc:(.text._ZNK3Ipc6Atomic5WordTIhE3getEv[Ipc::Atomic::WordT<unsigned char>::get() const]+0x21): undefined reference to `__sync_fetch_and_add_1'
ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT<unsigned int>::swap_if(unsigned int, unsigned int)':
PageStack.cc:(.text._ZN3Ipc6Atomic5WordTIjE7swap_ifEjj[Ipc::Atomic::WordT<unsigned int>::swap_if(unsigned int, unsigned int)]+0x27): undefined reference to `__sync_bool_compare_and_swap_4'
ipc/.libs/libipc.a(PageStack.o): In function `Ipc::Atomic::WordT<unsigned int>::fetchAndAnd(unsigned int)':
PageStack.cc:(.text._ZN3Ipc6Atomic5WordTIjE11fetchAndAndEj[Ipc::Atomic::WordT<unsigned int>::fetchAndAnd(unsigned int)]+0x20): undefined reference to `__sync_fetch_and_and_4'
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



----- Original Message -----
From: "Amos Jeffries" <squid3@xxxxxxxxxxxxx>
To: "Jeff Gerard" <mysubscriptions@xxxxxxx>
Cc: squid-users@xxxxxxxxxxxxxxx
Sent: Tuesday, 28 August, 2012 11:47:38 PM
Subject: Re:  Compile error Squid 3.2.1

On 29/08/2012 2:24 a.m., Jeff Gerard wrote:
> 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.

You should be able to locate it/them with the command line "locate 
libstdc++.a".

Add '-L' followed by the directory path where the library .a file is 
found to the CXXFLAGS variable.

For example it is probably:
  ./configure CXXFLAGS=" -L/usr/lib"

Amos

> ----- Original Message -----
> From: "Amos Jeffries" <squid3@xxxxxxxxxxxxx>
> To: squid-users@xxxxxxxxxxxxxxx
> Sent: Tuesday, 28 August, 2012 4:50:44 AM
> Subject: Re:  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


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux