[Q-e-developers] [sanvila at unex.es: [Debichem-devel] Bug#841096: espresso: FTBFS (make install fails)]

Michael Banck mbanck at debian.org
Sat Nov 12 22:26:40 CET 2016


Hi,

we had a report (see http://bugs.debian.org/841096) where
building/installing q-e would randomly fail one on machine but not the
other. Santiago tracked it down as below, there is a patch at the end.


Michael

----- Forwarded message from Santiago Vila <sanvila at unex.es> -----

Date: Wed, 9 Nov 2016 17:38:43 +0100 (CET)
From: Santiago Vila <sanvila at unex.es>
To: Graham Inggs <ginggs at debian.org>
Cc: 841096 at bugs.debian.org
Subject: [Debichem-devel] Bug#841096: espresso: FTBFS (make install fails)
User-Agent: Alpine 2.11 (DEB 23 2013-08-11)
X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2
List-Id: Debichem development list <debichem-devel.lists.alioth.debian.org>

Hi.

The problem seems to be in the install target of the top-level
Makefile, which reads like this:

install : touch-dummy
        @if test -d bin ; then mkdir -p $(DESTDIR)$(bindir) ; \
        for x in `find . -path ./test-suite -prune -o -name *.x -type f` ; do \
                cp $$x $(DESTDIR)$(bindir)/ ; done ; \
        fi
        @echo 'Quantum ESPRESSO binaries installed in $(PREFIX)/bin'

This is the output of "find" in the machine where it does not fail:

./S3DE/iotk/src/iotk.x
./S3DE/iotk/src/iotk_print_kinds.x
./test-suite
./PW/tools/ev.x
./PW/tools/pwi2xsf.x
./PW/tools/dist.x
./PW/tools/kpoints.x
./PW/src/pw.x
./PW/src/generate_rVV10_kernel_table.x
./PW/src/generate_vdW_kernel_table.x
./PW/src/manypw.x

and this is the output of "find" in the machine where it fails:

./S3DE/iotk/src/iotk_print_kinds.x
./S3DE/iotk/src/iotk.x
./PW/tools/kpoints.x
./PW/tools/pwi2xsf.x
./PW/tools/dist.x
./PW/tools/ev.x
./PW/src/pw.x
./PW/src/generate_vdW_kernel_table.x
./PW/src/generate_rVV10_kernel_table.x
./PW/src/manypw.x
./test-suite

There are severl problems here:

* The directory "test-suite" should be excluded but it isn't.

* The output of "find" depends on filesystem ordering, it may be anything.

* The "cp" commands are concatenated using ";" and not "&&", which means
an intermediate "cp" command may fail as far as it's not the last one.

* If we are unlucky enough that "test-suite" is the last one, the whole
"install" target will fail, because copying a directory gives an error.


To reproduce the problem try forcing the output of the find command
so that the "test-suite" directory always comes last:

find . -path ./test-suite -prune -o -name *.x -type f | LC_ALL=C sort

Then I guess it will always fail for you as well.


The attached patch should probably work, it just ensures that the
"test-suite" directory is excluded from the output of "find".

I think it would be very good if you could forward this upstream so
that they fix the Makefile.

Thanks.

--- a/Makefile
+++ b/Makefile
@@ -259,7 +259,7 @@ links : bindir
 
 install : touch-dummy
 	@if test -d bin ; then mkdir -p $(DESTDIR)$(bindir) ; \
-	for x in `find . -path ./test-suite -prune -o -name *.x -type f` ; do \
+	for x in `find * ! -path "test-suite/*" -name *.x -type f` ; do \
 		cp $$x $(DESTDIR)$(bindir)/ ; done ; \
 	fi
 	@echo 'Quantum ESPRESSO binaries installed in $(PREFIX)/bin'

_______________________________________________
Debichem-devel mailing list
Debichem-devel at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debichem-devel


----- End forwarded message -----



More information about the developers mailing list