Defining a subsystem conditionally in waf ...

Richard Sharpe realrichardsharpe at gmail.com
Fri Jan 9 22:51:57 MST 2015


On Fri, Jan 9, 2015 at 7:10 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> I am trying to define the zookeeper stuff this way in waf but it is not working:
>
> bld.SAMBA3_LIBRARY('smbregistry',
>                    source='''registry/reg_api.c
>                    registry/reg_dispatcher.c
>                    registry/reg_cachehook.c
>                    registry/reg_objects.c
>                    registry/reg_util_internal.c
>                    lib/util_nttoken.c
>                    registry/reg_backend_db.c
>                    registry/reg_parse_internal.c
>                    lib/cbuf.c
>                    lib/srprs.c
>                    registry/reg_init_basic.c''',
>                    deps='''smbd_shim tdb-wrap3 NDR_SECURITY util_tdb talloc
>                    replace util_reg samba-util samba-security
>                    errors3 dbwrap samba3-util REG_ZOOKEEPER''',
>                    allow_undefined_symbols=True,
>                    private_library=True)
>
> bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
>                     source='''registry/reg_backend_smbconf.c
>                     registry/reg_init_smbconf.c
>                     registry/reg_util_token.c
>                     registry/reg_api_util.c''',
>                     deps='smbregistry')
>
> bld.SAMBA3_SUBSYSTEM('REG_ZOOKEEPER',
>                     source='''registry/reg_backend_zookeeper.c''',
>                     includes='/usr/local/include/zookeeper',
>                     deps='zookeeper_st smbregistry',
>                     enabled=bld.env.enable_zookeeper)
>
> I keep getting:
>
> default/source3/libsmbregistry-samba4.so: undefined reference to
> `zookeeper_reg_ops'
>
> How do I work around this?

Well, it seems that I have to tell waf that I need to link with
libzookeeper_st, but I cannot see how to do that ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list