Source: crash
Severity: serious
Tags: upstream patch ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

The crash package sometimes fails to build when dpkg-buildpackage is
invoked with -j > 1:

        # dpkg-buildpackage -us -uc -j4
        [...]
        /usr/bin/make extensions lzo snappy
        make[2]: Entering directory '/tmp/x/crash-7.2.8'
        mv: cannot stat 'Makefile.new': No such file or directory
        Makefile: cannot create new Makefile
        please copy Makefile.new to Makefile
        make[2]: *** [Makefile:324: lzo] Error 1
        make[2]: *** Waiting for unfinished jobs....
        mv: cannot stat 'Makefile.new': No such file or directory
        Makefile: cannot create new Makefile
        please copy Makefile.new to Makefile
        make[2]: *** [Makefile:328: snappy] Error 1
        make[3]: Entering directory '/tmp/x/crash-7.2.8'
        make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent 
make rule.
        gcc -Wall -g -shared -rdynamic -o echo.so echo.c -fPIC -DX86_64  
-DGDB_7_6
        eppic.so: failed to pull eppic code from git repo
        gcc -Wall -g -shared -rdynamic -o trace.so trace.c -fPIC -DX86_64  
-DGDB_7_6
        gcc -Wall -g -shared -rdynamic -o dminfo.so dminfo.c -fPIC -DX86_64  
-DGDB_7_6
        gcc -Wall -g -I. -shared -rdynamic -o snap.so snap.c -fPIC -DX86_64  
-DGDB_7_6
        make[3]: Leaving directory '/tmp/x/crash-7.2.8'
        make[2]: Leaving directory '/tmp/x/crash-7.2.8'
        make[1]: *** [debian/rules:16: override_dh_auto_build] Error 2
        make[1]: Leaving directory '/tmp/x/crash-7.2.8'
        make: *** [debian/rules:12: build] Error 2
        dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2

This is because crash's configure rewrites Makefile via a temporary file
(Makefile.new) and it is now getting invoked multiple times in parallel.
This is a problem upstream.

It can be avoided with the following change:
--- a/debian/rules
+++ b/debian/rules
@@ -12,8 +12,7 @@ include /usr/share/dpkg/buildflags.mk
        dh $@
 
 override_dh_auto_build:
-       dh_auto_build
-       $(MAKE) extensions lzo snappy
+       dh_auto_build -- all extensions lzo snappy
 
 override_dh_auto_clean:
        cp $(CURDIR)/Makefile $(CURDIR)/debian/Makefile.ori
--

Because the package uses debian/compat level 9, dh forces -j1.

Reply via email to