[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion 1.8.x on Solaris 10 x86

From: Philip Martin <philip_at_codematters.co.uk>
Date: Wed, 02 Aug 2017 11:23:31 +0100

Ian Mordey <ian.mordey_at_wandisco.com> writes:

> Undefined first referenced
> symbol in file
> __sync_add_and_fetch

Modern compilers usually provide fast "atomics" and most code will try
to use compiler atomics if possible. Subversion itself relies on APR
for atomics so what matters is how you configured and built APR. I am
surprised Subversion 1.8 and 1.9 are different. Do they use the same
APR? Is APR built the same way using the same compiler?

Looking at include/arch/unix/apr_arch_atomic.h in the APR build it
appears that there are three possible atomic implementations on Solaris:
1) generic, 2) builtin, 3) solaris.

From the error message your build appears to use 2) builtin, so I expect
you to have USE_ATOMICS_GENERIC unset and HAVE_ATOMIC_BUILTINS set. If
you look at include/arch/unix/apr_private.h in your APR build you should
be able to confirm that. APR's configure script controls both symbols.

Your compiler is not providing the functions required for 2) builtin to
work. You can force the APR build to use 1) generic with the configure
option --disable-nonportable-atomics. It might be better to get APR to
use 3) solaris by unsetting HAVE_ATOMIC_BUILTINS after configure and
before building.

It would be good to understand which atomics you are using, why APR
chooses the wrong ones, how we can fix APR to choose the right ones
automatically, and why 1.8 and 1.9 are different.

-- 
Philip
Received on 2017-08-02 12:23:47 CEST

This is an archived mail posted to the Subversion Dev mailing list.