Defining a subsystem conditionally in waf ...

Richard Sharpe realrichardsharpe at gmail.com
Fri Jan 9 20:10:22 MST 2015


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?

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


More information about the samba-technical mailing list