Bug#864831: [Debian-science-sagemath] NTL update to 10.3.0

Ximin Luo infinity0 at debian.org
Thu Oct 19 20:24:00 UTC 2017


Julien Puydt:
> 
> 
> Le 01/09/2017 à 00:03, Ximin Luo a écrit :
>> Thanks for that. I forced the rebuild to continue by skipping the flint tests with DEB_BUILD_OPTIONS=nocheck sbuild --profiles=nocheck <etc>, and am pleased to report that singular and pynac built (including tests) successfully.
> 
> That is good news, but since FLINT saw problems, they may be hidden.
> 
>> If the flint maintainer doesn't fix this "soon" then perhaps we can just disable that one test for the short-term to allow this transition to go forward.
> 
> I'm not sure it is a good idea to push things forward: Bill (main
> developer) said those tests only pass data to NTL, let it do the
> calculation and get the result back. If those conversions are
> problematic, the root can be:
> - NTL changed something and it wasn't intentional, so NTL will need a fix ;
> - NTL changed something and it was intentional, so FLINT will need a fix.
> 
> In either case, there is a good chance that this change will break
> things also higher up the stack : FLINT is just an early warning sign,
> and ignoring it is wrong.
> 
> I suggest to wait for a diagnosis before planning anything.
> 

Your cautiousness was well-placed, I think I nailed down the cause and fixed it. It was actually very serious.

I did not drill down into the *exact* underlying cause but saw enough to be fairly certain it was due to MAKEFLAGS plus incompletely-declared dependencies in d/rules. Those interested can read "recursive Make considered harmful" for a description of the generic problem. 

In summary, when you incompletely-duplicate dependency declarations from child Makefiles, the top-level make process (here, the one running debian/rules) does not have enough dependency information to always correctly determine the order in which targets should be rebuilt. Sometimes this gets overlooked because compilation "looks like" it worked but actually things were miscompiled (I admit I don't know the exact details of how the binary stuff works on this level). These errors are much more likely when running builds in parallel, because here make will aggressively parallelise non-dependent targets, so if two targets actually do depend on each other in the child Makefiles but you didn't declare this in the top-level Makefile, you get screwed.

Several observations pointed to this as being the culprit, e.g. rebuilding NTL using `dpkg-buildpackage -J1` or `debian/rules build && fakeroot debian/rules binary` directly (with no DEB_BUILD_OPTIONS=parallel=X in the env) would make the FLINT test failures go away.

I fixed things in git by removing MAKEFLAGS and rewriting d/rules to do the previous stuff in a cleaner way. I've rebuilt all of the reverse dependencies () and they all succeeded including tests. So I think we're good to go ahead with the transition, whenever Julien is ready.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the debian-science-maintainers mailing list