Is libbsd worth the pain?

Jelmer Vernooij jelmer at samba.org
Fri Feb 3 05:47:09 MST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Günther,

On 02/03/2012 05:16 AM, Günter Kukkukk wrote:
>
>> The issue I have with libbsd is that we gain so little from using it -
>> we cannot depend on it strictly existing, so we must provide our own
>> replacement functions anyway, and we need extra code to optionally use
>> it.
>>
>> In any case, we have an issue:
>> $ make quicktest
>> WAF_MAKE=1 ./buildtools/bin/waf test --quick
>> ...
>> [3935/3962] symbol duplicate checking:
>> Waf: Leaving directory `/data/samba-2/bin'
>> Build failed:
>> default/source3/lib/netapi/examples/localgroup/localgroup_setinfo:
>> Symbol MD5Init linked in multiple libraries ['samba-util',
>> '/usr/lib64/libbsd.so.0.2.0']
>> make: *** [quicktest] Error 1
>>
>> Because libbsd also implements MD5Init (et al), we now have a symbol
>> conflict. (Other projects which implement MD5Init internally may not
>> have noticed this, as our symbol checking is a samba-only thing).
>>
>> A partial patch to fix the MD5 issue is attached, but the configure
>> check to find bsd/md5.h needs to be written, and the result all tested
>> to ensure that we never use the wrong md5.h.
>>
>> All this leads me to the question:
>>
>> That we can then have an empty libreplace is neat, but I wonder if it is
>> really worth it to avoid having a local copy of strlcat and strlcpy?
>>
>> Andrew Bartlett
>
> Why is such dependency stuff added when hundreds of other samba3/samba4
> merging problems still exist?
I don't really see what this has to do with Samba3/Samba4 merging.

This change helps simplify the {ldb,tdb,talloc,tevent} builds for
Debian/Ubuntu because it means not having to ship or somehow compile in
libreplace. It shouldn't really have an effect on the other code
(barring duplicate symbol issues like this).

Cheers,

Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPK9dNAAoJEACAbyvXKaRXQxIP/iusEPlTeFBs0tJMgKEOU9wT
ZgwSQcMJcnrt1gQ+STPCmWWMhyXXTYXgqv302GmOl1GKWUjcLaxfFKV90YDerH9k
OYNJewJD8wDZdgjP8/fpY+X46KlH6ALKUjRsQbgBh63twCAM0eKfgQOF7qCVgcbi
f/RQHo3mGxgk6LHfm1gawQX1jIGqDxBbFXoN+v/K14inxuUDWUMzYJyW5WJ/a+Fx
rNEipO3Uu9j8MKkiX3ekSuDmyeCdJX0TmqpD6NETkcl0Y+UpQ+lIKHbdSgUpPeIv
3kn10Kb4s9sifH3TYpC8G/4zV6Aq6uWut3JdvbWV9hB9IofH8tsvex0D2ayTQR6A
aYLIVC4USvwOhf+Vbp1KMR4zsh47lveyoTCg5UfekhUUCUVN9pHx09G3xB+V/Tiq
SReP0NH8VUQMf+lBsaXbnmB1P8eTILbFQAB47kIlvI3K/oW6UAcqN9nAphVj9pl9
BTPi2wIOatwNk/y1aKl0E/GMvpQDjMfkjFD4WqS2n8m8FXZlSJdybWix5Bzki6X/
a4LiiIcS9AFcbm17B1W9YSnDYW7jdl9hV9sjTdF0cZ2PDV/mfyf4rnSu3VNpQGbg
5o2b1g3IQkEfmdmRQMu3sY7XD07JuEOhHNeG+xB/Q5iYrmxRu/anSrRLUxwWmcRK
DHUk8nPwpg0jP0LqugHv
=qj/g
-----END PGP SIGNATURE-----



More information about the samba-technical mailing list