Samba4 build help.

Jeremy Allison jra at samba.org
Sat May 22 00:38:48 MDT 2010


On Sat, May 22, 2010 at 04:29:00PM +1000, Andrew Bartlett wrote:
> On Fri, 2010-05-21 at 22:17 -0700, Jeremy Allison wrote:
> > I want to commit my ntlmssp patch to source4.
> > Unfortunately when I add it the build fails.
> > (Patch is attached).
> > 
> > I'm adding a call to the ndr_push_VERSION()
> > in source4/auth/ntlmssp/ntlmssp_server.c,
> > but I get the build failure :
> > 
> > $ make
> > WAF_MAKE=1 ../buildtools/bin/waf build
> > Waf: Entering directory `/home/jeremy/src/samba/git/master/source4/bin'
> > [1912/1941] Linking default/source4/lib/ldb/ldbadd
> > default/source4/auth/gensec/libgensec-samba4.so: undefined reference to `ndr_push_VERSION'
> > collect2: ld returned 1 exit status
> > Waf: Leaving directory `/home/jeremy/src/samba/git/master/source4/bin'
> > Build failed:  -> task failed (err #1): 
> > 	{task: cc_link ldbutil_15.o,cmdline_15.o,ldbadd_16.o -> ldbadd}
> > make: *** [all] Error 1
> > 
> > This is the first time I need to add a dependency
> > to the WAF build - can someone explain how this
> > needs to be done ?
> 
> The function you are looking for is in
> [bin/default/]librpc/gen_ndr/ndr_ntlmssp.c
> 
> In source4/librpc/wscript_build you can find:
> 
> bld.SAMBA_SUBSYSTEM('NDR_NTLMSSP',
> source='../../librpc/ndr/ndr_ntlmssp.c ../../librpc/gen_ndr/ndr_ntlmssp.c',
> 	public_deps='LIBNDR NDR_STANDARD'
> 	)
> 
> That means that you need to modify the deps of NTLMSSP to include
> NDR_NTLMSSP.  See source4/auth/ntlmssp/wscript_build and extend 'deps'
> to be: deps='MSRPC_PARSE CREDENTIALS NDR_NTLMSSP',
> 
> That should do it.
> 
> Normally the wscript_build file for a subsystem is next to the C files
> for that subsystem.  Currently there is an exception for the shared IDL.
> I'll see about correcting that next week, as kai's waf build should use
> the same files.
> 
> I hope this helps,

Thanks - that helps a lot ! I'd found bin/default/librpc/gen_ndr/ndr_ntlmssp.c
and already surmised I needed to change the 'deps' line in source4/auth/ntlmssp/wscript_build,
but didn't know what to add :-).

Thanks for the help. I'll probably do this tomorrow, too tired
right now.

Cheers,

	Jeremy.


More information about the samba-technical mailing list