[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc-gnat sources



Pavel Zhukov <pavel@zhukoff.net> writes:

>> scng.adb:1799:47: "SPARK" is undefined
> Please read README
> in gprbuild sources folder do:
> ln -s <gcc-sources(not GNAT_GPL buf FSF GCC)>/gcc/ada/ gnat_src

This is under "using alternate GNAT sources"

That's not what we should do; we should use the correct version of the
installed gcc gnat sources to build the correct version of gprbuild.

I looked in gnat-gpl-2011-src.tgz from the AdaCore Libre site. It has
SPARK in s-rident.ads; no configuration switches necessary.

So this is a GNAT version issue; Debian gnat-4.6 vs AdaCore Libre
gnat-gpl-2011. To make things even more confusing, the sources for
gnat-gpl-2011 imply it is built on gcc-4.5, not 4.6 (it has diffs for
gcc-4.5). 

I looked in AdaCore Libre gprbuild-gpl-2010-src.tgz; it does not
require SPARK in s-rident.ads

So it would seem that Debian gnat-4.6 is more compatible with AdaCore
Libre gprbuild 2010 than gprbuild 2011. That's consistent with the
section 'Timeline of GNAT releases | FSF releases' in debian-ada-policy
(http://people.debian.org/~lbrenta/debian-ada-policy.html); Debian
gnat-4.6 is apparently roughly equivalent to Libre 2010, not 2011.

However, I don't want to use gprbuild 2010 for Debian,
because it has a bug that prevents building QtAda (or at least requires
significant work-arounds).

It's likely that simply patching s-rident.ads to declare SPARK would be
sufficient for gprbuild 2011. However, that may be misleading; I'm not
clear how much "support" gnat 2011 provides for SPARK, but all of it is
apparently missing from Debian gnat-4.6.

I guess it would be better to patch gprbuild 2011 for Debian to remove
the SPARK restriction support, if Debian gnat does not contain the
matching SPARK restriction support.

I could also try to back-port the specific bug fix for the QtAda issue
from gprbuild 2011 to 2010.

Eugeniy Meshcheryakov has packaged SPARK for Debian: version
2010.0.deb-6 in unstable depends on libgnat-4.4.

Eugeniy; any input on this gprbuild issue? 

Have you tried updating to gnat-4.6 yet? 

Ludovic; could you update debian-ada-policy.texi sections 'The Debian Ada
compiler' and 'the Variants of GNAT' with versions for Debian 7.0 and
Libre 2011?  (I guess I could do that just as easily, except for the FSF
sections).

It seems we should add gprbuild versions to 'the Variants of GNAT' as well. 

In the long run, the best solution is to lobby/pressure/help AdaCore to put
gprbuild in the FSF distribution :(.

-- 
-- Stephe


Reply to: