[squid-users] Different squid-3.5.2 compile error on OpenBSD 5.6

Alan Palmer alanpalmer72 at yahoo.com
Thu Feb 26 19:03:09 UTC 2015


While waiting with baited breath for --with-libressl support, I 
installed openssl-1.02 on openbsd-5.6 to
get squid to compile, but got this error in the final linking:

MemStore.o(.text+0x4fe0): In function 
`MemStore::copyFromShm(StoreEntry&, int, Ipc::StoreMapAnchor const&)':
: undefined reference to `__sync_fetch_and_add_8'
MemStore.o(.text+0x5197): more undefined references to 
`__sync_fetch_and_add_8' follow

Now this is a bit odd because, from the config.log:

configure:20105: inlining optimizations enabled: yes
configure:20124: checking for GNU atomic operations support
configure:20151: c++ -o conftest -O2 -pipe -I/usr/local/include 
-L/usr/local/lib
  conftest.cpp  >&5
configure:20151: $? = 0
configure:20151: ./conftest
configure:20151: $? = 0
configure:20156: result: yes

now configure only checks for __sync_fetch_and_add not 
__sync_fetch_and_add_8.

The issue, I believe, is libc++ hasnt been ported to openbsd so it uses 
libstdc++

the compiler in question:
[apalmer]:/data/src/squid-3.5.2# g++ -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.6/4.2.1/specs
Target: i386-unknown-openbsd5.6
Configured with: OpenBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719

soooooo, manually editing autoconf.h to:
#define HAVE_ATOMIC_OPS 0

Is there a more graceful way to deal with this?

Alan


More information about the squid-users mailing list