Source: numactl
Version: 2.0.11-1
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

I was recently working to sync the Ubuntu numactl with Debian's version,
and we noticed an odd build failure.

Under sbuild, the Ubuntu and Debian numactl's build fine, but when in a
schroot and manually running `debian/rules build`, our clone of the
debian/sid tree would fail.

After some debugging, where I had two source-identical trees with one
failing to build (our clone) and one successfully building (`apt-get
source`), I tried to update the timestamps in the apt-get'd version and
noticed that it also failed. That is,

# apt-get source numactl
# cd numactl-2.0.11
# find . -exec touch {} \;
# debian/rules build
 ...
make[1]: Entering directory '/root/numactl-2.0.11'
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash 
/root/numactl-2.0.11/build-aux/missing aclocal-1.14 -I m4
/root/numactl-2.0.11/build-aux/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
Makefile:724: recipe for target 'aclocal.m4' failed
make[1]: *** [aclocal.m4] Error 127
make[1]: Leaving directory '/root/numactl-2.0.11'
/usr/share/cdbs/1/class/makefile.mk:47: recipe for target 
'debian/stamp-makefile-build' failed
make: *** [debian/stamp-makefile-build] Error 2

This error does *not* occur if the timestamps on the files are left
alone.

The following simple fix, suggested by Serge Hallyn, fixes the issue for
me.

autoreconfigure the sources before building, to pull in the current
version of the build tools. This adds dh-autoreconf as a
build-dependency to support calling dh_autoreconf during build.

Signed-off-by: Nishanth Aravamudan <nish.aravamu...@canonical.com>

diff --git a/debian/control b/debian/control
index 03e6f8d..8f81463 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Al Stone <a...@debian.org>
 Standards-Version: 3.9.6
 Build-Depends: cdbs,
  autotools-dev,
+ dh-autoreconf,
  debhelper (>= 9~),
  dh-buildinfo, debhelper (>= 9)
 
diff --git a/debian/rules b/debian/rules
index acd4155..63b583d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 
 include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/autoreconf.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 # Including this file gets us a simple patch system.  You can just
 # drop patches in debian/patches, and they will be automatically

Reply via email to