Bug#926935: arpack: FTBFS (does not honor parallel=n in DEB_BUILD_OPTIONS)

Santiago Vila sanvila at debian.org
Fri Apr 12 13:03:41 BST 2019


Package: src:arpack
Version: 3.7.0-1
Severity: serious
Tags: ftbfs patch

Dear maintainer:

I tried to build this package in buster but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-arch
dh build-arch
   dh_update_autotools_config -a
   dh_autoreconf -a
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:12: installing 'build-aux/compile'
configure.ac:17: installing 'build-aux/config.guess'

[... snipped ...]

make[4]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK/SRC/MPI'
Making check in .
make[4]: Entering directory '/<<PKGBUILDDIR>>/PARPACK'
make[4]: Nothing to be done for 'check-am'.
make[4]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK'
Making check in TESTS/MPI
make[4]: Entering directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make  issue46 
make[5]: Entering directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
mpif77  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -c -o issue46.o issue46.f
/bin/bash ../../../libtool  --tag=F77   --mode=link mpif77  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong  -Wl,-z,relro -o issue46 issue46.o ../../../PARPACK/SRC/MPI/libparpack.la -llapack -lblas 
libtool: link: mpif77 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wl,-z -Wl,relro -o .libs/issue46 issue46.o  ../../../PARPACK/SRC/MPI/.libs/libparpack.so -llapack -lblas
make[5]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make  check-TESTS
make[5]: Entering directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make[6]: Entering directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
FAIL: issue46
============================================================================
Testsuite summary for ARPACK-NG 3.7.0
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See PARPACK/TESTS/MPI/test-suite.log
Please report to https://github.com/opencollab/arpack-ng/issues/
============================================================================
make[6]: *** [Makefile:830: test-suite.log] Error 1
make[6]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make[5]: *** [Makefile:938: check-TESTS] Error 2
make[5]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make[4]: *** [Makefile:1026: check-am] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK/TESTS/MPI'
make[3]: *** [Makefile:387: check-recursive] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/PARPACK'
make[2]: *** [Makefile:509: check-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:15: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2
--------------------------------------------------------------------------------

This used to work ok in all my autobuilders in version 3.5.0+real-2, but
it started to fail in some of them in version 3.6.3-1.

I've put a bunch of build logs here:

https://people.debian.org/~sanvila/build-logs/arpack/

The problem seems to be that the Makefiles wrongly assume that the
system has at least 2 CPUs, which may or may not be the case.

A simple solution that seems to work is to set 'LOG_FLAGS = -n 1' in
both PARPACK/EXAMPLES/MPI/Makefile.am and PARPACK/TESTS/MPI/Makefile.am,
but it would be even better to honor parallel=n setting in DEB_BUILD_OPTIONS
when there is one, as in the patch below.

I did not find a simple way to reproduce this in any system.
The usual recipe is to try "taskset -c 0 dpkg-buildpackage" but
this does not seem to work here, so if you need a test machine to
reproduce the failure please contact me privately and I will gladly
provide one.

Thanks.

--- a/PARPACK/EXAMPLES/MPI/Makefile.am
+++ b/PARPACK/EXAMPLES/MPI/Makefile.am
@@ -12,7 +12,7 @@ check_PROGRAMS = $(SNDRV) $(DNDRV) $(SSDRV) $(DSDRV) $(CNDRV) $(ZNDRV)
 
 # Run MPI tests with "mpirun -n 2"
 LOG_COMPILER = mpirun
-LOG_FLAGS = -n 2
+LOG_FLAGS = -n $(NUMJOBS)
 
 TESTS = $(check_PROGRAMS)
 
--- a/PARPACK/TESTS/MPI/Makefile.am
+++ b/PARPACK/TESTS/MPI/Makefile.am
@@ -3,7 +3,7 @@ LDADD = $(top_builddir)/PARPACK/SRC/MPI/libparpack$(LIBSUFFIX).la $(LAPACK_LIBS)
 
 # Run MPI tests with "mpirun -n 2"
 LOG_COMPILER = mpirun
-LOG_FLAGS = -n 2
+LOG_FLAGS = -n $(NUMJOBS)
 
 SISS = issue46
 
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,12 @@
 %:
 	dh $@
 
+export NUMJOBS = $(shell nproc)
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
+
 override_dh_auto_configure:
 	# Enforce generic BLAS (to avoid tying to ATLAS or OpenBLAS)
 	dh_auto_configure --  --enable-mpi --with-blas=blas



More information about the debian-science-maintainers mailing list