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

Bug#527367: FTBFS: configure: error: GNAT is required to build ada



Unfortunately, the log file you provided doesn't tell me much more; it
only contains:

configure:4943: checking whether compiler driver understands Ada
configure:4966: result: no

On my machine which also runs testing, I get:

configure:4943: checking whether compiler driver understands Ada
configure:4966: result: yes

and the bootstrap succeeds.

Since I cannot reproduce your problem, I'm afraid I can't help much
more.  I can however explain how this works so you can try to
investigate further on your side.

The package gnat only contains the symbolic link

/usr/bin/gnatgcc -> gcc-4.3

thereby encoding the fact that gcc-4.3 is the default compiler driver.
Driver? Yes.  The role of gnatgcc or /usr/bin/gcc-4.3 (provided by
package gcc-4.3), is to parse command line options and delegate the
actual processing to several other executables.  If the source language
is C, the real compiler is /usr/lib/gcc/x86_64-linux-gnu/4.3/cc1,
provided by package cpp-4.3.  If the source language is Ada, the real
compiler is /usr/lib/gcc/x86_64-linux-gnu/4.3/gnat1, provided by package
gnat-4.3.

The "1" in the name of the compiler executable means that it executes
the first pass of compilation.  For some languages (e.g. C++) there is a
second pass.

The output of the compiler is a temporary file containing assembly
language.  The compiler driver gnatgcc then calls /usr/bin/as (the
assembler), provided by package binutils, which emits object files.

For most languages (but not Ada), gcc-4.3 can then call the linker
(/usr/bin/ld, also provided by package binutils) to link the object
files into an executable or shared library.  For Ada, a preliminary step
called binding is necessary because Ada allows the programmer to control
the order of elaboration (i.e. everything that the program does before
reaching the first statement of the main procedure).

The test which you can see at line 4943 in .../src/configure calls
"gnatgcc -c conftest.adb" (where conftest.adb is a generated,
minimalistic Ada source file) and then checks for the existence of the
corresponding object file.  In your case, something went wrong; either
gnatgcc failed to produce an object file, or it emitted an error message
on stderr.  On my machine, the test succeeds.

I hope you can take it from there to see what's wrong.

-- 
Ludovic Brenta.

Attachment: pgpzg_0b1gsNz.pgp
Description: PGP signature


Reply to: