Is libbsd worth the pain?

Günter Kukkukk linux at kukkukk.com
Thu Feb 2 21:16:30 MST 2012


On Friday 03 February 2012 04:28:45 Andrew Bartlett wrote:
> Jelmer,
> 
> Regarding the recently introduced dependency on libbsd, I am wondering
> if optionally depending on another unix portability lib is really worth
> the pain.
> 

for which good reasons has this dependency been added at all?
To me it only adds samba build complexity.

Is it just "a nice to have .."?

Opensuse does not use it at all atm - and the standard repos do
_not_ support an installation - so then the _working_ samba libreplace
functionality would still be needed.

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

Cheers, Günter


More information about the samba-technical mailing list