snprintf on SunOS

Mihai-Radu, Orza orzamihai at
Thu Jun 7 07:07:27 MDT 2012

I tried both removing the lib/ccan/failtest directory and applying the patch you provided. Both approaches now lead to the following error:

[ 553/3617] Compiling lib/tdb2/tools/tdb2tool.c
../lib/tdb2/tools/tdb2torture.c:7:17: err.h: No such file or directory
Waf: Leaving directory `/tmp/samba4-build-5.10-orza/samba-4.0.0beta1/bin'
Build failed:  -> task failed (err #1):
      {task: cc tdb2torture.c -> tdb2torture_4.o}


 From: Andrew Bartlett <abartlet at>
To: "Mihai-Radu, Orza" <orzamihai at> 
Cc: "samba-technical at" <samba-technical at> 
Sent: Thursday, June 7, 2012 2:24 PM
Subject: Re: snprintf on SunOS
On Thu, 2012-06-07 at 14:34 +1000, Andrew Bartlett wrote:
> On Wed, 2012-06-06 at 03:13 -0700, Mihai-Radu, Orza wrote:
> > Hello Andrew,
> > 
> > Thank you for the patch. I managed to go past the asn1 linkage problem, so it helped.
> > 
> > But now I get the following build error:
> > [ 522/3534] Compiling lib/ccan/failtest/failtest.c
> > ../lib/ccan/failtest/failtest.c:8:17: err.h: No such file or directory
> > Waf: Leaving directory `/tmp/samba-4.0.0beta1/bin'
> > Build failed:  -> task failed (err #1):
> >         {task: cc failtest.c -> failtest_1.o}
> > 
> > The err.h C header does not come with SunOS so I guess the compiler should use the replacement functions defined in source4\heimdal_build\replace.c. Is there some config param I'm missing?
> > 
> > Thanks again and regards,
> > Mihai
> In the short term, it seems you should be able to
> rm -rf lib/ccan/failtest
> as this code is unused.  You may have noticed I've mailed the ccan
> maintainer to understand what we are going to use the code for, and how
> to best handle this in the future. 

Otherwise, try this patch.  failtest is a key part of our tests for
tdb2, but an unrelated error means it's not being used right now.  This
patch makes it only build in developer mode (which hopefully you are not

Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 

More information about the samba-technical mailing list