Missing bsd lib and header checks for Ubuntu 14.04

Jelmer Vernooij jelmer at samba.org
Tue Jun 17 09:18:44 MDT 2014


On Tue, Jun 17, 2014 at 05:14:30PM +0200, Michael Adam wrote:
> On 2014-06-17 at 16:02 +0200, Jelmer Vernooij wrote:
> > On Tue, Jun 17, 2014 at 06:35:02AM -0700, Julien Kerihuel wrote:
> > > Hi,
> > > 
> > > While installing latest samba master on Ubuntu 14.04, I ended up with
> > > undefined references to rep_strlcpy at linkage time in heimdal hcrypto
> > > library (rand-egd.c).
> > > 
> > > I got it solved after I installed libbsd-dev package.
> > > 
> > > I suppose it should have been detected at configure time given that
> > > strlcpy and strlcat are only provided by libbsd-dev package on Ubuntu. I
> > > am unsure what the proper solution shall be but I would assume adding
> > > checks on bsd lib and headers in samba/lib/replace/wscript shall fix the
> > > issue:
> > > 
> > > conf.CHECK_LIB('bsd')
> > > conf.CHECK_HEADERS('bsd/string.h')
> > 
> > Note that libreplace is already doing these checks. Can you check why these
> > checks weren't working as they should?
> 
> It does not seem to be the case:
> 
> $ git grep bsd lib/replace/ | grep CHECK
> lib/replace/wscript:        conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
It is - the line above is checking for strlcpy in -lbsd. libreplace will
provide strlcpy itself if it did not find it in libbsd. It would be interesting
to know why in Julian's case, libreplace did not provide strlcpy even if libbsd was
not available.

Cheers,

Jelmer


More information about the samba-technical mailing list