[patch] allow building samba-util as a single library
bradh at frogmouth.net
Thu Apr 14 04:45:06 MDT 2011
OpenChange has suffered from build problems on some hosts (apparently depending
on linker) for a little while. Typically the problem looks like
/usr/bin/ld: utils/openchange-tools.o: undefined reference to symbol
/usr/bin/ld: note: 'DEBUGLEVEL_CLASS@@SAMBA_4.0.0ALPHA15_GIT_15D6C70' is
defined in DSO /usr/local/samba/lib/samba/libsamba-util-common.so so try adding
it to the linker command line
/usr/local/samba/lib/samba/libsamba-util-common.so: could not read symbols:
collect2: ld returned 1 exit status
make: *** [bin/openchangepfadmin] Error 1
This shows up on Fedora 13 and 14, and Debian Sid.
I reported it as https://bugzilla.samba.org/show_bug.cgi?id=7985
The problem is that there symbols we use (debug in the example above, but it
hits other places in openchange for other symbols) that aren't linked into
libsamba-util, but only into the private libsamba-util-common.
The real fix for this is in the shared (samba3/samba4) resolution, but that has
been a while, and still appears at least a little contentious (e.g. recent
discussion on string handling).
Based on a suggestion by Andrew Bartlett (thanks), I've developed a patch that
un-shares the code in libsamba-util-common and puts it back into libsamba-util
for the case where its just a samba4 build (which is the case that matters to
I've tested the top level samba4 build (with and without --enable-s3build) and
a samba3 waf build. All compile. I've also checked that the samba4 build
(without --enable-s3build) builds ok with openchange on fedora14.
Please review and apply.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5590 bytes
Desc: not available
More information about the samba-technical