[Debian-med-packaging] Bug#847171: Help needed for Bug#847171 soapdenovo2: Different output, still FTBFS
Christian Seiler
christian at iwakd.de
Thu Dec 8 20:53:17 UTC 2016
Control: retitle -1 soapdenovo2: FTBFS with parallel builds (dpkg-buildpackage -J$n, $n > 1)
On 12/08/2016 09:17 PM, Andreas Tille wrote:
> On Thu, Dec 08, 2016 at 02:11:07PM +0500, Andrey Rahmatullin wrote:
>> On Thu, Dec 08, 2016 at 09:58:37AM +0100, Andreas Tille wrote:
>>> it seems there are different ways how the build fails but its totally
>>> unclear to me why this happens.
>> The package just built fine in my sbuild chroot for 3 times.
>
> I tried again and had one build success in pbuilder and in the very
> same pbuilder environment the next build ended with
>
> ...
> make[2]: Leaving directory '/build/soapdenovo2-240+dfsg1/standardPregraph'
> make[2]: Leaving directory '/build/soapdenovo2-240+dfsg1/standardPregraph'
> standardPregraph/kmerhash.o: In function `search_kmerset2':
> ./kmerhash.c:227: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `put_kmerset2':
> ./kmerhash.c:410: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `modular':
> ./kmerhash.c:56: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `encap_kmerset2':
> ./kmerhash.c:354: undefined reference to `Kmer2int128'
> collect2: error: ld returned 1 exit status
> Makefile:74: recipe for target 'SOAPdenovo-127mer' failed
> make[1]: *** [SOAPdenovo-127mer] Error 1
> make[1]: *** Waiting for unfinished jobs....
> standardPregraph/kmerhash.o: In function `search_kmerset2':
> ./kmerhash.c:227: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `put_kmerset2':
> ./kmerhash.c:410: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `modular':
> ./kmerhash.c:56: undefined reference to `Kmer2int128'
> standardPregraph/kmerhash.o: In function `encap_kmerset2':
> ./kmerhash.c:354: undefined reference to `Kmer2int128'
> collect2: error: ld returned 1 exit status
> Makefile:70: recipe for target 'SOAPdenovo-63mer' failed
> make[1]: *** [SOAPdenovo-63mer] Error 1
> make[1]: Leaving directory '/build/soapdenovo2-240+dfsg1'
> dh_auto_build: make -j4 returned exit code 2
> debian/rules:15: recipe for target 'build' failed
> make: *** [build] Error 2
> dpkg-buildpackage: error: debian/rules build gave error exit status 2
> I: copying local configuration
> E: Failed autobuilding of package
>
>
> I admit I'm totally clueless. :-(
Well, the problem is the following: upstream's build system doesn't
support parallel builds, see the Makefile:
all: SOAPdenovo-63mer SOAPdenovo-127mer
# [...]
SOAPdenovo-63mer:
@cd sparsePregraph;make 63mer=1;cd ..;
@cd standardPregraph;make 63mer=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LDFLAGS) $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-63mer
SOAPdenovo-127mer:
@cd sparsePregraph;make 127mer=1;cd ..;
@cd standardPregraph;make 127mer=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LDFLAGS) $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-127mer
It builds the project twice, and this has to be done in sequence
for this to work properly, otherwise both builds get in each other's
way.
However, if you look at the build log attached to the bug report,
you'll see that make is invoked with -j9:
dh_auto_build
make -j9
That's the problem that's occurring here. Because you recently
switched to debhelper compat level 10 and that defaults to parallel
builds - see man 7 debhelper, which mentions that.
What you should do is to pass --max-parallel=1 to either dh or to
dh_auto_build in an override (either will likely work here) in
debian/rules to ensure that upstream's build system is never invoked
with parallel build options. As a more long-term goal you could try
to convince upstream to switch to a build system that supports
parallel building (i.e. write their Makefiles in a more make-like
manner and less in a shell script-like manner), because that will
save time during builds.
Hope that helps.
Regards,
Christian
More information about the Debian-med-packaging
mailing list