[PATCH] wafsamba: Remove code which is not used in most cases
Thomas Nagy
tnagy at waf.io
Sun Jun 28 22:35:54 MDT 2015
These changes will result in Samba incremental taking a much longer time to start: 2.5s -> 6s.
If the install build differs so much from the normal build, how about having the dependency cache depend on the previously executed command (build/install)?
Thomas
On Mon, 29 Jun 2015 11:06:34 +1000, Martin Schwenke wrote:
> On Fri, 26 Jun 2015 16:49:22 +1000, Amitay Isaacs <amitay at gmail.com>
> wrote:
>
> > I recently found strange behavior with standalone CTDB build.
> >
> > $ cd ctdb
> > $ ./configure --prefix=/tmp/ctdb
> > $ make
> > $ make install
> >
> > During the install, waf is supposed to re-link all the binaries with
> > correct -rpath flags.
> >
> > $ ldd /tmp/ctdb/bin/ctdb
> > linux-vdso.so.1 (0x00007ffe64571000)
> > libtdb-wrap-ctdb.so => not found
> > libtime-basic-ctdb.so => not found
> > libsocket-blocking-ctdb.so => not found
> > libtdb.so.1 => /lib64/libtdb.so.1 (0x00007f89a050c000)
> > libtevent.so.0 => /lib64/libtevent.so.0 (0x00007f89a02fe000)
> > libsamba-debug-ctdb.so => not found
> > libreplace-ctdb.so => not found
> > libdl.so.2 => /lib64/libdl.so.2 (0x00007f89a00fa000)
> > [... stuff deleted ...]
> >
> > It looks like the correct flags are not getting passed to the linker.
> > Running "make install V=1" confirms that.
> >
> > The problem originates in the function needs_private_lib() in
> > buildtools/wafsamba/samba_utils.py.
> > This function is supposed to check if the target depends on any private
> > libraries.
> > However, the function returns False since getattr(target, "final_libs", [])
> > always returns [].
> > In install_rpath(), the PRIVATELIBDIR is not added to the list of
> > directories.
> >
> > The real culprit is seen with the folllowing command:
> >
> > $ ../buildtools/bin/waf --zones=deps install
> > Waf: Entering directory `/home/amitay/samba/samba-master/ctdb/bin'
> > * creating /tmp/ctdb/var/log
> > * creating /tmp/ctdb/var/run/ctdb
> > * creating /tmp/ctdb/var/lib/ctdb
> > 16:32:21 deps checking saved dependencies <----
> > 16:32:21 deps loaded saved dependencies <----
> > * installing ctdb/bin/default/ctdb/ctdb.pc as
> > /tmp/ctdb/lib/pkgconfig/ctdb.pc
> > * installing ctdb/bin/default/ctdb/ctdb_run_tests.sh as
> > /tmp/ctdb/bin/ctdb_run_tests
> > [... stuff deleted ...]
> >
> > For standalone CTDB build, "make install" ends up loading the stored
> > dependencies instead of calculating them again. In the top-level build or
> > in the standalone ldb, dependencies are always re-calculated.
> >
> > Here is the output from top-level build:
> >
> > $ ./buildtools/bin/waf --zones=deps install
> > Waf: Entering directory `/home/amitay/samba/samba-master/bin'
> > * creating /home/amitay/samba/prefix1/etc
> > * creating /home/amitay/samba/prefix1/private
> > * creating /home/amitay/samba/prefix1/var
> > * creating /home/amitay/samba/prefix1/private
> > * creating /home/amitay/samba/prefix1/var/lib
> > * creating /home/amitay/samba/prefix1/var/locks
> > * creating /home/amitay/samba/prefix1/var/cache
> > * creating /home/amitay/samba/prefix1/var/lock
> > * creating /home/amitay/samba/prefix1/var/run
> > * creating /home/amitay/samba/prefix1/var/run
> > Selected embedded Heimdal build
> > 16:24:45 deps checking saved dependencies <-----
> > Checking project rules ...
> > 16:24:45 deps project rules checking started <-----
> > 16:24:45 deps expand_subsystem_deps: 0.000659
> > [... stuff deleted ...]
> >
> > The function load_samba_deps() in buildtools/wafsamba/samba_deps.py
> > always return False for top-level "make install" or standalone ldb "make
> > install".
> >
> > Since saving and loading dependencies code is broken and not getting used
> > in most cases, it may be a good idea to drop that code.
>
> Reviewed-by: Martin Schwenke <martin at meltin.net>
>
> I'll push this in 24 hours unless someone NACKs it.
>
> peace & happiness,
> martin
More information about the samba-technical
mailing list