GNU bug report logs - #18436
Error building 8.23 with builddir != srcdir and --disable-dependency-tracking

Previous Next

Package: coreutils;

Reported by: "Daniel Richard G." <skunk <at> iSKUNK.ORG>

Date: Tue, 9 Sep 2014 19:58:02 UTC

Severity: normal

Merged with 18055

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 18436 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: "Daniel Richard G." <skunk <at> iSKUNK.ORG>
Cc: 18436 <at> debbugs.gnu.org
Subject: Re: bug#18436: Error building 8.23 with builddir != srcdir and
 --disable-dependency-tracking
Date: Fri, 19 Sep 2014 17:36:23 +0100
[Message part 1 (text/plain, inline)]
forcemerge 18055 18436
stop

On 09/09/2014 08:57 PM, Daniel Richard G. wrote:
> I normally build with --disable-dependency-tracking to speed up builds,
> and also build out-of-tree, and got this with the latest coreutils:
> 
>     $ cd /foo/bar/coreutils-8.23
>     $ mkdir _build
>     $ cd _build
>     $ ../configure --disable-dependency-tracking
>     checking for a BSD-compatible install... /usr/bin/install -c
>     checking whether build environment is sane... yes
>     [...]
>     $ make
>     [...]
>       GEN      lib/unistr.h
>       GEN      lib/unitypes.h
>       GEN      lib/uniwidth.h
>       GEN      lib/wchar.h
>       GEN      lib/wctype.h
>       GEN      src/coreutils.h
>     /bin/sh: src/coreutils.ht: No such file or directory
>     gmake: *** [src/coreutils.h] Error 1

This is essentially the same issue as http://bugs.gnu.org/18055
I'm guessing tha dependency tracking is disabled there too for the distro
as it's not needed for once off builds, and then doing parallel make
builds compounds the issue.

We could fix it for GNU and solaris make but break on BSD
(since it doesn't support included makefiles) like:

  diff --git a/man/local.mk b/man/local.mk
  index f2d1357..0464cf1 100644
  --- a/man/local.mk
  +++ b/man/local.mk
  @@ -78,7 +78,7 @@ man/dynamic-deps.mk: Makefile
          && mv $@-t $@

   # Include the generated man dependencies.
  -@AMDEP_TRUE@@am__include@ man/dynamic-deps.mk
  +@am__include@ man/dynamic-deps.mk


We could work nicely for all once off builds like,
but require rebuilding all man pages for any change for devs with:

  diff --git a/man/local.mk b/man/local.mk
  index f2d1357..888ff10 100644
  --- a/man/local.mk
  +++ b/man/local.mk
  @@ -41,7 +41,7 @@ distclean-local:
          test x$(srcdir) = x$(builddir) || rm -f $(ALL_MANS)

   # Dependencies common to all man pages.  Updated below.
  -mandeps =
  +mandeps = $(bin_PROGRAMS)

   # Depend on this to get version number changes.
   mandeps += .version
  @@ -77,9 +77,6 @@ man/dynamic-deps.mk: Makefile
          done > $@-t                                     \
          && mv $@-t $@

  -# Include the generated man dependencies.
  -@AMDEP_TRUE@@am__include@ man/dynamic-deps.mk


It would be nice to rely on GNU make for dynamic rules or
order-only prerequisites which would nicely handle things.
However it's best to stick with portable make for now
due to the low level nature of coreutils which might be
required to build gnu make etc. for example.

Instead the attached patch simplifies things by avoiding
the dynamically generated makefile entirely.

There are still a few foibles with parallel make syntax-check
in --enable-single-binary mode, but I've a handle on that edge case
which we can fix up later.

thanks,
Pádraig.
[help2man-dep-fixes.patch (text/x-patch, attachment)]

This bug report was last modified 10 years and 251 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.