[debhelper-devel] Bug#861627: debhelper: dh_auto_install (with libtool/automake) can fail for parallel builds

IOhannes m zmoelnig umlaeute at debian.org
Mon May 1 21:00:13 UTC 2017


Package: debhelper
Version: 10.2.5
Severity: normal

Dear Maintainer,

automake/libtools are known to break parallel installs (`make -j2 install`) in
some situtations.

the problem was triggered when building the gsequencer package on my local
machine, which has routinely set `DEB_BUILD_OPTIONS=parallel=2`; (and probably a
recent switch to compat=10)

example
=======
an example project consists of both public (lib_LTLIBRARIES=libfoo.la) and
private (e.g.  pkglib_LTLIBRARIES=libbar.la) shared libraries that interdepend
(e.g. libbar_la_LIBADD=libfoo.la).
All libraries are built from a single Makefile.am (no subdirectories or the
like).
On 'make install', libtool will run a "relink" for each library.
Since the public and private libraries are in a different namespace, their
installation can be parallelized by make (if requested; e.g. because dh's
`--parallel` flag is used), which can result in libbar.la being
installed/relinked before libfoo.la, which in turn will result in an error
(since libfoo.so cannot be found).

This is a bug in autotools/automake/libtool, which has been known for some time
([1], [2]) and is unlikely to get fixed.

proposal
========
It would be great if debhelper would automatically force a '--no-parallel' for
the 'make install' target of automake/libtool based projects.

in the meantime, this works as a local workaround (but must be implemented for
each package)

	override_dh_auto_install:
	        dh_auto_install --no-parallel

what else?
==========
thanks for this great piece of software :-)


references
==========

[1] https://lists.gnu.org/archive/html/automake/2005-08/msg00021.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1260190


-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64
 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev            20161112.1
ii  binutils                 2.28-4
ii  dh-autoreconf            14
ii  dh-strip-nondeterminism  0.032-1
ii  dpkg                     1.18.23
ii  dpkg-dev                 1.18.23
ii  file                     1:5.29-3
ii  libdpkg-perl             1.18.23
ii  man-db                   2.7.6.1-2
ii  perl                     5.24.1-2
ii  po-debconf               1.0.20

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make  2.201608

-- no debconf information




More information about the debhelper-devel mailing list