How to add an external library dependency into

nagendra ps nagendra.shiv at
Sat Oct 22 15:36:48 UTC 2016

I think the new dep is getting left out somewhere in build_direct_deps
in buildtools/wafsamba/
Still no luck in doing it the right away.

On Fri, Oct 21, 2016 at 8:12 PM, nagendra ps <nagendra.shiv at> wrote:
> Hi All,
> Greetings.
> I am using samba-4.5 and am trying to link an external library (say
> into .
> Here is what I am doing :
> The location of the library is taken care by the -L option by the
> global LDFLAGS passed to waf.
> I then modified samba-4.5/source3/wscript_build file under section :
> bld.SAMBA3_LIBRARY('smbd_base) . Under 'deps', added my external
> library 'externlib' .
> Adding to the deps section did not suffice. It failed during configure
> stage saying "Unknown dependency Mylib in smbd_base."
> So I tried adding a target_type under 'def configure' section . I
> tried both "conf.SET_TARGET_TYPE('MyLib', 'SYSLIB')" and
> "conf.SET_TARGET_TYPE('MyLib', 'EMPTY').
> Adding either one of the above targets makes the "Unknown dependency"
> issue go away.
> But, the MyLib itself is not getting added to the dependency list. At
> the linking stage, it fails. i.e I dont find -lMyLib among the list of
> deps seen in the 'runner' output.
> The MyLib dependency I added is getting left out somewhere along the build.
> I tried running waf with -vvv. Didnt get any clues from the additional logs.
> Is there anything I am missing. Please let me know.
> It used to be a bit easier when we used the Makefiles and configure
> scripts in samba-3 based.
> I am still getting used to the wscript and waf way of doing things now :-)
> Thanks,
> Nagendra

More information about the samba-technical mailing list