[patch] problems building / installing samba4 (for openchange)
Matthias Dieter Wallnöfer
mdw at samba.org
Mon Jul 5 03:30:51 MDT 2010
Tridge,
you as WAF build system expert: do you think we could apply this?
Matthias
Brad Hards wrote:
> Hi,
>
> I'm trying to update openchange to use current samba4 (with waf build).
>
> openchange uses both samba and some of the supporting libraries (e.g. talloc, ldb, libdcerpc).
> We have a script to do this:
> http://trac.openchange.org/browser/branches/current-samba4/script/installsamba4.sh
>
> Essentially the script checks out the samba tree (from git), builds talloc, tdb, tevent, ldb,
> builds samba and installs samba.
>
> I frequently have problems with this process, mostly about missing include files. Today, ldb.h
> was missing. This patch addresses that issue.
>
> diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build
> index 577d495..e8ce78e 100644
> --- a/source4/dsdb/samdb/ldb_modules/wscript_build
> +++ b/source4/dsdb/samdb/ldb_modules/wscript_build
> @@ -339,5 +339,5 @@ bld.SAMBA_MODULE('ldb_lazy_commit',
> subsystem='ldb',
> internal_module=not bld.CONFIG_SET('USING_SYSTEM_LDB'),
> init_function='LDB_MODULE(lazy_commit)',
> - deps='SAMDB'
> + deps='SAMDB ldb'
> )
> diff --git a/source4/lib/ldb-samba/wscript_build b/source4/lib/ldb-samba/wscript_build
> index a58316e..2b606bd 100644
> --- a/source4/lib/ldb-samba/wscript_build
> +++ b/source4/lib/ldb-samba/wscript_build
> @@ -14,5 +14,5 @@ bld.SAMBA_SUBSYSTEM('LDBSAMBA',
>
>
> bld.SAMBA_PYTHON('python_samba__ldb', 'pyldb.c',
> - deps='LDBSAMBA pyparam_util',
> + deps='LDBSAMBA pyparam_util ldb',
> realname='samba/_ldb.so')
> diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript
> index 9de9a5b..10e1ba0 100644
> --- a/source4/lib/ldb/wscript
> +++ b/source4/lib/ldb/wscript
> @@ -199,11 +199,11 @@ def build(bld):
>
> LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
> for t in LDB_TOOLS.split():
> - bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='LIBLDB_CMDLINE',
> + bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='LIBLDB_CMDLINE ldb',
> manpages='man/%s.1' % t)
>
> # ldbtest doesn't get installed
> - bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='LIBLDB_CMDLINE',
> + bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='LIBLDB_CMDLINE ldb',
> install=False)
>
>
> diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build
> index 05b47e4..3d2579c 100644
> --- a/source4/torture/wscript_build
> +++ b/source4/torture/wscript_build
> @@ -102,7 +102,7 @@ bld.SAMBA_MODULE('TORTURE_UNIX',
> bld.SAMBA_MODULE('TORTURE_LDAP',
> source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/cldapbench.c ldap/ldap_sort.c
> ldap/nested_search.c',
> subsystem='smbtorture',
> - deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDBSAMBA',
> + deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDBSAMBA ldb',
> internal_module=True,
> autoproto='ldap/proto.h',
> init_function='torture_ldap_init'
> diff --git a/source4/utils/net/wscript_build b/source4/utils/net/wscript_build
> index 07aa8f7..c929ce8 100644
> --- a/source4/utils/net/wscript_build
> +++ b/source4/utils/net/wscript_build
> @@ -12,7 +12,7 @@ bld.SAMBA_MODULE('net_drs',
> bld.SAMBA_BINARY('net',
> source='net.c net_password.c net_join.c net_vampire.c net_gpo.c',
> autoproto='net_proto.h',
> - deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL LIBSAMBA-NET popt POPT_SAMBA POPT_CREDENTIALS net_drs policy',
> + deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL LIBSAMBA-NET popt POPT_SAMBA POPT_CREDENTIALS net_drs policy auth',
> needs_python=True
> )
>
> diff --git a/source4/utils/wscript_build b/source4/utils/wscript_build
> index a0b3ac5..32a23da 100644
> --- a/source4/utils/wscript_build
> +++ b/source4/utils/wscript_build
> @@ -11,6 +11,6 @@ bld.SAMBA_BINARY('ntlm_auth',
> bld.SAMBA_BINARY('oLschema2ldif',
> source='oLschema2ldif.c',
> manpages='man/oLschema2ldif.1',
> - deps='LIBLDB_CMDLINE SAMDB'
> + deps='LIBLDB_CMDLINE SAMDB ldb'
> )
>
>
> However that only makes samba build, not install.
>
> The install step fails with this:
> [1797/2072] Linking default/source4/lib/ldb/libildap.inst.so
> gcc: no input files
> Waf: Leaving directory `/home/bradh-dev/openchange/branches/current-samba4/samba4/source4/bin'
> Build failed: -> task failed (err #1):
> {task: cc_link -> libildap.inst.so}
> gmake: *** [install] Error 1
> Error in Step1 (error code 2)
>
>
> When I run it manually, I get
> [bradh-dev at repens source4]$ sudo WAF=WAF_MAKE=1 ../buildtools/bin/waf -vv install
> ....
> [1797/2072] Linking default/source4/lib/ldb/libildap.inst.so
> [1800/2072] Linking default/source4/dsdb/samdb/ldb_modules/libsamba_dsdb.inst.so
> 21:23:57 runner /usr/lib64/ccache/gcc -o /home/bradh-dev/openchange/branches/current-
> samba4/samba4/source4/bin/default/source4/dsdb/samdb/ldb_modules/libsamba_dsdb.inst.so -shared
> [1801/2072] Linking default/source4/dsdb/samdb/ldb_modules/libsamba_secrets.inst.so
> [1802/2072] Linking default/source4/dsdb/samdb/ldb_modules/libobjectguid.inst.so
> 21:23:57 runner /usr/lib64/ccache/gcc -o /home/bradh-dev/openchange/branches/current-
> samba4/samba4/source4/bin/default/source4/lib/ldb/libildap.inst.so -shared
> 21:23:57 runner /usr/lib64/ccache/gcc -o /home/bradh-dev/openchange/branches/current-
> samba4/samba4/source4/bin/default/source4/dsdb/samdb/ldb_modules/libsamba_secrets.inst.so -shared
> gcc: no input files
> 21:23:57 runner /usr/lib64/ccache/gcc -o /home/bradh-dev/openchange/branches/current-
> samba4/samba4/source4/bin/default/source4/dsdb/samdb/ldb_modules/libobjectguid.inst.so -shared
> gcc: no input files
> gcc: no input files
> gcc: no input files
> Waf: Leaving directory `/home/bradh-dev/openchange/branches/current-samba4/samba4/source4/bin'
> Build failed:
> -> task failed (err #1):
> {task: cc_link -> libsamba_dsdb.inst.so}
> -> task failed (err #1):
> {task: cc_link -> libildap.inst.so}
> -> task failed (err #1):
> {task: cc_link -> libsamba_secrets.inst.so}
> -> task failed (err #1):
> {task: cc_link -> libobjectguid.inst.so}
> File "../buildtools/bin/waf", line 158, in<module>
> Scripting.prepare(t, cwd, VERSION, wafdir)
> File "/home/bradh-dev/openchange/branches/current-
> samba4/samba4/buildtools/bin/.waf-1.5.17-164170d221747ffbb50f4a8b9ccc2b2a/wafadmin/Scripting.py", line 107, in prepare
> error(str(e))
>
> 1. If the deps changes are OK, can they please be applied?
> 2. Any suggestions on what the problem with the install process could be?
>
> Brad
>
>
More information about the samba-technical
mailing list