OpenLDAP: core dump with latest CLANG buildworld.
dimitry at andric.com
Fri May 4 21:10:18 UTC 2012
On 2012-05-04 10:40, Hartmann, O. wrote:> On all FreeBSD 10-CURRENt boxes, built with CLANG, there is no OpenLDAP
> anymore since yesterday's buildworld!
> OpenLDAP (slapd), the most recent build from the ports (recompiled
> everything in hope to fix the problem) coredumps immediately after it
> tries to start. Examination of the cause with slapd -d256 doesn't work.
Which version of openldap did you use? I built openldap24-server with
its default settings, and it starts up just fine.
> Recompiling everything prerequisit for OpenLDAP/SASL revealed that even
> now databases/db5 isn't compiling with CLANG anymore (which has before
> the last LLVM update).
> What happened? Why is CLANG (3.1?) now so picky about some __atomic_...
This is because bdb5 tries to redefine gcc's builtin atomic functions,
which are also supported by clang (this is a feature :). It is rather
dumb to use names starting with underscores for this, since they are
The same problem occurs if you compile with gcc 4.7 or higher, albeit
gcc apparently doesn't think this is serious enough to bail out:
./libtool --mode=compile /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c
libtool: compile: /usr/local/bin/gcc47 -c -I. -I./../src -D_THREAD_SAFE -O2 -pipe -fno-strict-aliasing ../src/mutex/mut_tas.c -fPIC -DPIC -o .libs/mut_tas.o
In file included from ./../src/dbinc/mutex_int.h:12:0,
./../src/dbinc/atomic.h:179:19: warning: conflicting types for built-in function '__atomic_compare_exchange' [enabled by default]
In any case, attached is a simple patch to fix the db5 port.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1222 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120504/77278812/clangports-databases-db5-1.bin
More information about the freebsd-current