I downloaded samba source 4.20.2 and built and installed it on ubuntu 22.04.4 server successfully.I am planning to modify a few sources for use within the company, build them, and then use them. I am trying to call a function in an external library file, for example libxxx.so , from source3/smbd/server.c. At this time, I tried modifying wscript or wscript_build and building, but it failed.
Modified sources and results are as belows.
- wscript file in samba_dev(source top directory) :...
def build(bld):'''build all targets''' bld.env.LIBPATH.extend(['/usr/local/samba/lib/yyy', '/samba_dev/bin/default/source3']) bld.env.LIB.extend(['xxx'])
...
- wscript_build file in samba_dev/source3...
bld.SAMBA3_BINARY('smbd/smbd', source='smbd/server.c smbd/smbd_cleanupd.c', deps=''' xxx CMDLINE_S3 smbd_base REG_FULL''', install_path='${SBINDIR}')
...
root@krb5:/samba_dev# ./configure --> success
root@krb5:/samba_dev# makePYTHONHASHSEED=1 WAF_MAKE=1 ./buildtools/bin/waf buildWaf: Entering directory `/samba_dev/bin/default'Selected embedded Heimdal buildChecking project rules ...ERROR: target smbd/smbd: dependency target xxx not declared
I want to hear advices or hints for solving this problem.