How to add an external library dependency into libsmbd-base-samba4.so

Jeremy Allison jra at samba.org
Thu Oct 27 20:42:26 UTC 2016


On Sat, Oct 22, 2016 at 09:06:48PM +0530, nagendra ps wrote:
> I think the new dep is getting left out somewhere in build_direct_deps
> in buildtools/wafsamba/samba_deps.py.
> Still no luck in doing it the right away.

Hmmm. I just took a look at Justin from Netgear's patch
to add an external Intel AES library to Samba. He uses:

+       conf.ADD_LDFLAGS('-lMyLib')

in the wscript_configure file.

Does that help ?

> On Fri, Oct 21, 2016 at 8:12 PM, nagendra ps <nagendra.shiv at gmail.com> wrote:
> > Hi All,
> >
> > Greetings.
> >
> > I am using samba-4.5 and am trying to link an external library (say
> > MyLib.so) into libsmbd-base-samba4.so .
> >
> > 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