ccan dependencies seems to break external projects

Jelmer Vernooij jelmer at samba.org
Sun Feb 12 05:52:23 MST 2012


On Sat, Feb 11, 2012 at 02:49:20PM -0800, Matthieu Patou wrote:
> I'm trying to compile openchange as described here : http://tracker.openchange.org/projects/openchange/wiki/HowTo_Install_OpenChange_From_Source
> 
> I'm using the latest git tree instead of alpha17, after a couple of
> tweak in the script that setup the prerequisits I have a samba4 with
> using system talloc/tdb/tevent and ldb.
> 
> Then I try to build openchange and got:
> 
> 
> /usr/local/src/openchange$ make
> Linking sample application bin/libmapixx-test
> g++ -I.  -O3 -Wall -g3 -fstrict-aliasing -Wp,-D_FORTIFY_SOURCE=2
> -DHAVE_IMMEDIATE_STRUCTURES=1 -D_GNU_SOURCE=1
> -Wl,-rpath,/usr/local/samba/lib -I/usr/local/samba/include
>    -I/usr/local/samba/include   -I/usr/local/samba/include
> -I/usr/local/samba/include     -o bin/libmapixx-test
> libmapi++/tests/test.cpp libmapipp.so.0.11 libmapi.so.0
> .11 -Wl,-rpath,/usr/local/samba/lib -L/usr/local/samba/lib -ldcerpc
> -ldcerpc-binding -lndr -lsamba-hostconfig -lsamba-util -ltevent
> -ltalloc   -Wl,-rpath,/usr/local/samb
> a/lib -L/usr/local/samba/lib -lldb -ltalloc
> -Wl,-rpath,/usr/local/samba/lib -L/usr/local/samba/lib -ltalloc
> -lpthread
> /usr/local/samba/lib/libsmbconf.so.0: undefined reference to
> `hash_any at SAMBA_4.0.0ALPHA18_GIT_0B3A262'
> 
> 
> The hash_any symbol comes from the ccan library and is included in
> libsmbconf.so via source3/util/
> 
> I suspect there is a symbols collision when you build samba 4 with
> system libs as ldb has its own version of ccan but obviously with a
> different version although it seems that ldb didn't directly need
> ccan (no ccan in the output of ldd libldb.so), the following command
> ls /usr/local/systemsamba/lib/ldb/libccan.so.0* output this:
> 
> /usr/local/systemsamba/lib/ldb/libccan.so.0
> /usr/local/systemsamba/lib/ldb/libccan.so.0.1-init-1161-g661d41f
> 
> There is no way to have a system ccan and it seems that there is no
> easy way to use the one built for ldb as the "system" ccan.
> 
> I don't know what can be done, the cheapest is to have a
> source3/util not to depend on ccan if --disable-tdb2 was specified
> on the command line.
Does ccan really have to be a separate library? Its goal seems to be
the same as the 'samba-util' library.

If I understand correctly ccan isn't really meant as a shared library
with utility functions but rather as a collection of C files that you
can pick a few useful ones from.

Would it perhaps be possible to just include the relevant files from
ccan in libsamba-util?

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120212/e7525873/attachment.pgp>


More information about the samba-technical mailing list