Is libbsd worth the pain?
abartlet at samba.org
Thu Feb 2 20:28:45 MST 2012
Regarding the recently introduced dependency on libbsd, I am wondering
if optionally depending on another unix portability lib is really worth
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
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'
Symbol MD5Init linked in multiple libraries ['samba-util',
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 http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 693 bytes
Desc: not available
More information about the samba-technical