[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: Ian Mordey <ian.mordey_at_wandisco.com>
Date: Wed, 02 Aug 2017 12:25:33 +0000

On Wed, Aug 2, 2017 at 11:23 AM Philip Martin <philip_at_codematters.co.uk>
wrote:

> 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?
>

Yup. APR 1.6.2 was configured with:
./configure CC=suncc CXX=sunCC \
    CFLAGS="-I/opt/WANdisco/include" \
    CXXFLAGS="-I/opt/WANdisco/include" \
    LDFLAGS="-R/opt/WANdisco/lib -L/opt/WANdisco/lib" \
    --prefix=/opt/WANdisco \
    --enable-shared --enable-static

>
> 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.
>

I first added --disable-nonportable-atomics to the configure and rebuilt
APR. SVN fails in the same way.

I tried running unsetting HAVE_ATOMIC_BUILTINS after configure but before
running make and still get the same error..

Finally I tried downgrading APR and APU to 1.5.x versions. Still the same
issue.

>
> 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.
>

With configure from above I get:
#define HAVE_ATOMIC_BUILTINS 1
/* #undef USE_ATOMICS_GENERIC */

With --disable-nonportable-atomics I get:
#define HAVE_ATOMIC_BUILTINS 1
#define USE_ATOMICS_GENERIC 1

> --
> Philip
>

Thanks
Ian

-- 
*IAN MORDEY* HEAD OF INFRASTRUCTURE
*wandisco.com* <http://www.wandisco.com/>
-- 
World Leader in Active Data Replication™
*Find out more wandisco.com <http://wandisco.com/>*
THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY AND MAY BE 
PRIVILEGED
If this message was misdirected, WANdisco, Inc. and its subsidiaries, 
("WANdisco") does not waive any confidentiality or privilege. If you are 
not the intended recipient, please notify us immediately and destroy the 
message without disclosing its contents to anyone. Any distribution, use or 
copying of this email or the information it contains by other than an 
intended recipient is unauthorized. The views and opinions expressed in 
this email message are the author's own and may not reflect the views and 
opinions of WANdisco, unless the author is authorized by WANdisco to 
express such views or opinions on its behalf. All email sent to or from 
this address is subject to electronic storage and review by WANdisco. 
Although WANdisco operates anti-virus programs, it does not accept 
responsibility for any damage whatsoever caused by viruses being passed.
Received on 2017-08-02 14:26:04 CEST

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