comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Specifying an `--RTS` option in a GPR file, for a runtime library
Date: Mon, 15 Apr 2013 13:22:27 +0200
Date: 2013-04-15T13:22:27+02:00	[thread overview]
Message-ID: <op.wvkxvpkuule2fv@cardamome> (raw)
In-Reply-To: kkgd6k$kqn$1@dont-email.me

Le Mon, 15 Apr 2013 10:19:32 +0200, Brian Drummond  
<brian@shapes.demon.co.uk> a écrit:

> On Sun, 14 Apr 2013 22:07:58 +0200, Yannick Duchêne (Hibou57) wrote:
>
>> Le Sun, 14 Apr 2013 21:54:20 +0200, Yannick Duchêne (Hibou57)
>> <yannick_duchene@yahoo.fr> a écrit:
>
>> It still starts with “warning: RTS for language ada is discarded (full
>> path)” as before with the absolute path variant, but now `gprbuild` also
>> returns this additional message: “raised TYPES.UNRECOVERABLE_ERROR :
>> targparm.adb:177”.
>>
>> This must be a file from the compiler source, as I could not find this
>> in the runtime source files.
>
> This error is "cannot find system.ads" -

I figured it later, when I get targparm.adb to have a look inside. Just  
above line 177, there is…

     Write_Line ("fatal error, run-time library not installed correctly");
     Write_Line ("cannot locate file system.ads");

…but this was not displayed (I checked it with two different terminal  
emulators). Is this the expected behaviour? That's strange there are two  
`Write_Line` just before the raise statement, and I only get the exception  
message without the “fatal error, run‑time […] cannot locate file  
system.ads” message.

> first make sure your RTS
> directory contains adainclude/system.ads, and then figure out why the --
> RTS= option is ignored/wrong/broken.

It contains `system.ads`, and the `adalib` contains the static library and  
ALI files.

> As of a couple of revisions ago, some tools (FSF tree, gnatclean+?) were
> looking for system.ads in the wrong place (ignoring --RTS) but that
> didn't affect normal builds.
>
> As a crosscheck, have you tried building with gnatmake and a direct
> command line (no gpr), which DOES honour the --RTS= option? This may
> yield some light on what's wrong.

I tried with GNATMake, although it seems to not understand the project  
file (it compiles files, but does not link an executable), I still tried.

   * say `runtime` is in <dir>. If I run GNATMake from <dir> to
     compile a `test.adb` file in <dir> too, seems to be OK
     with the `--RTS=runtime` option.
   * say a directory `source-test` is in <dir> and a `test.gpr`
     is in <dir>, then it's not OK anymore, it says the `--RTS=runtime`
     is not valid and is missing `adainclude` and `adalib`.
   * With the same as above, but with an absolute path given
     for the argument of the RTS options, GNATMake does not
     complain any more.

Trying the second and the third with GPRBuild, it complains in both case  
(with either an absolute or relative path). The only way seems to  
specifically assign `ADA_INCLUDE_PATH` and `ADA_OBJECTS_PATH` environment  
variables, but this can't be done from a GPR file (or is so, I don't know  
how to do).


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

  reply	other threads:[~2013-04-15 11:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-14 19:54 Specifying an `--RTS` option in a GPR file, for a runtime library Yannick Duchêne (Hibou57)
2013-04-14 20:07 ` Yannick Duchêne (Hibou57)
2013-04-14 20:36   ` Yannick Duchêne (Hibou57)
2013-04-15  8:19   ` Brian Drummond
2013-04-15 11:22     ` Yannick Duchêne (Hibou57) [this message]
2013-04-15 22:28       ` Yannick Duchêne (Hibou57)
2013-04-17 11:43       ` Brian Drummond
2013-04-18 22:10         ` Yannick Duchêne (Hibou57)
2013-04-15 13:27 ` Yannick Duchêne (Hibou57)
2013-04-15 13:29   ` Yannick Duchêne (Hibou57)
2013-04-23  1:26 ` Yannick Duchêne (Hibou57)
2013-04-23 17:22   ` Yannick Duchêne (Hibou57)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox