comp.lang.ada
 help / color / mirror / Atom feed
* Emacs ada-mode installation on Debias bullseye
@ 2021-09-04 23:17 R R
  2021-09-05  9:55 ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: R R @ 2021-09-04 23:17 UTC (permalink / raw)


I recently upgraded my Debian machine to bullseye. By then Emacs' ada-mode stopped working as it couldn't find some dynamic library. So I reinstalled ada-mode 7.1.8 and now I have to compile the wisi parser. First I had to install libgnatcoll19-dev. But I still get the error messages:

ada_mode_wisi_parse.gpr:22:06: imported project file "gnatcoll_sqlite" not found
ada_mode_wisi_parse.gpr:23:06: imported project file "gnatcoll_xref" not found

So I tried to install libgnatcoll-sqlite20-dev, but that doesn't exist and libgnatcoll-sqlite20 doesn't provide a gpr file. I tried to comment out gnatcoll_sqlite and gnatcoll_xref in ada_mode_wisi_parse.gpr.gp to no avail.

Any hints how to get the ada-mode working again?

regards
    Rolf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs ada-mode installation on Debias bullseye
  2021-09-04 23:17 Emacs ada-mode installation on Debias bullseye R R
@ 2021-09-05  9:55 ` Simon Wright
  2021-09-05 18:19   ` Stephen Leake
  2021-09-05 18:32   ` R R
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Wright @ 2021-09-05  9:55 UTC (permalink / raw)


R R <rrr.eee.27@gmail.com> writes:

> I recently upgraded my Debian machine to bullseye. By then Emacs'
> ada-mode stopped working as it couldn't find some dynamic library. So
> I reinstalled ada-mode 7.1.8 and now I have to compile the wisi
> parser. First I had to install libgnatcoll19-dev. But I still get the
> error messages:
>
> ada_mode_wisi_parse.gpr:22:06: imported project file "gnatcoll_sqlite" not found
> ada_mode_wisi_parse.gpr:23:06: imported project file "gnatcoll_xref" not found
>
> So I tried to install libgnatcoll-sqlite20-dev, but that doesn't exist
> and libgnatcoll-sqlite20 doesn't provide a gpr file.

I don't know about the Debian system, but wouldn't the numbers have to
match (i.e., 19 vs 20)?

If you can't find the prebuilt -dev package, try building from source as
suggested here:
https://www.nongnu.org/ada-mode/ada-mode.html#Building-GNATCOLL-2019 -
probably best to install in a private location, not over the
system. Also, when you get to the Github repo, the v21.0.0 package may
have compilation issues depending on your compiler: there are very few
changes between that version and the latest commit.

>                                                      I tried to
> comment out gnatcoll_sqlite and gnatcoll_xref in
> ada_mode_wisi_parse.gpr.gp to no avail.

Since the wisi parser relies on the facilities provided by these two
packages, that is *guaranteed* not to work!

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs ada-mode installation on Debias bullseye
  2021-09-05  9:55 ` Simon Wright
@ 2021-09-05 18:19   ` Stephen Leake
  2021-09-05 18:32   ` R R
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2021-09-05 18:19 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

>>                                                      I tried to
>> comment out gnatcoll_sqlite and gnatcoll_xref in
>> ada_mode_wisi_parse.gpr.gp to no avail.
>
> Since the wisi parser relies on the facilities provided by these two
> packages, that is *guaranteed* not to work!

It's only gpr_query that relies on those libraries. gpr_query provides
the cross reference backend. So technically, you could comment out
gpr_query in ada_mode_wisi_parse.gpr.gp, and only build the parser. A
lot of ada-mode would still work.

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs ada-mode installation on Debias bullseye
  2021-09-05  9:55 ` Simon Wright
  2021-09-05 18:19   ` Stephen Leake
@ 2021-09-05 18:32   ` R R
  2021-09-05 20:58     ` R R
  2021-09-06 17:02     ` Stephen Leake
  1 sibling, 2 replies; 6+ messages in thread
From: R R @ 2021-09-05 18:32 UTC (permalink / raw)


On Sunday, September 5, 2021 at 11:55:35 AM UTC+2, Simon Wright wrote:
> R R  writes: 
> 
> > I recently upgraded my Debian machine to bullseye. By then Emacs' 
> > ada-mode stopped working as it couldn't find some dynamic library. So 
> > I reinstalled ada-mode 7.1.8 and now I have to compile the wisi 
> > parser. First I had to install libgnatcoll19-dev. But I still get the 
> > error messages: 
> > 
> > ada_mode_wisi_parse.gpr:22:06: imported project file "gnatcoll_sqlite" not found 
> > ada_mode_wisi_parse.gpr:23:06: imported project file "gnatcoll_xref" not found 
> > 
> > So I tried to install libgnatcoll-sqlite20-dev, but that doesn't exist 
> > and libgnatcoll-sqlite20 doesn't provide a gpr file.
> I don't know about the Debian system, but wouldn't the numbers have to 
> match (i.e., 19 vs 20)? 

No, I don't think they have to match.

> If you can't find the prebuilt -dev package, try building from source as 
> suggested here: 
> https://www.nongnu.org/ada-mode/ada-mode.html#Building-GNATCOLL-2019 - 
> probably best to install in a private location, not over the 
> system. Also, when you get to the Github repo, the v21.0.0 package may 
> have compilation issues depending on your compiler: there are very few 
> changes between that version and the latest commit.

thanks for the hint to compile it myself. After reading Stephe's page I installed libgnatcoll-xref20-dev which provides both necessary gpr files. The problem with gnatcoll is solved. If you don't use gnatcoll on a regular basis it is not obvious which packages exist and what they provide.

After successful installation of gnatcoll the compilation then fails at 
gen_emacs_wisi_lr_parse.ads:37:53: missing ";"

That line reads:

    with WisiToken.Parse.LR.Parser;
    with WisiToken.Syntax_Trees;
    with Wisi;
    generic
       type Parse_Data_Type  is new Wisi.Parse_Data_Type with private; --line 37, char pos 53 is right before the keyword 'with'.

The system compiler FSF gnat 10.2.1 doesn't like a generic parameter of a tagged type with a private part. Is that a new syntax?

  Rolf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs ada-mode installation on Debias bullseye
  2021-09-05 18:32   ` R R
@ 2021-09-05 20:58     ` R R
  2021-09-06 17:02     ` Stephen Leake
  1 sibling, 0 replies; 6+ messages in thread
From: R R @ 2021-09-05 20:58 UTC (permalink / raw)


On Sunday, September 5, 2021 at 8:32:23 PM UTC+2, R R wrote:

> The system compiler FSF gnat 10.2.1 doesn't like a generic parameter of a tagged type with a private part. Is that a new syntax? 

OK, I remember having seen that before, it was in the emacs ada-mode mailing list:
>> gen_run_wisi_lr_parse.ads:27:65: generic private child packages not
>> permitted
>
>This is a known bug in FSF gnat, triggered by the compiler option
>-gnat2020.
>
>The only workaround is to use Community GNAT 2019 or 2020 (from
>https://www.adacore.com/download), or possibly an earlier FSF version.

Seems very weird to me that I have to install the community edition in a Debian system...

Rolf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Emacs ada-mode installation on Debias bullseye
  2021-09-05 18:32   ` R R
  2021-09-05 20:58     ` R R
@ 2021-09-06 17:02     ` Stephen Leake
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Leake @ 2021-09-06 17:02 UTC (permalink / raw)


R R <rrr.eee.27@gmail.com> writes:

> On Sunday, September 5, 2021 at 11:55:35 AM UTC+2, Simon Wright wrote:
>> R R  writes: 
>> 
>> > I recently upgraded my Debian machine to bullseye. By then Emacs' 
>> > ada-mode stopped working as it couldn't find some dynamic library. So 
>> > I reinstalled ada-mode 7.1.8 and now I have to compile the wisi 
>> > parser. First I had to install libgnatcoll19-dev. But I still get the 
>> > error messages: 
>> > 
>> > ada_mode_wisi_parse.gpr:22:06: imported project file "gnatcoll_sqlite" not found 
>> > ada_mode_wisi_parse.gpr:23:06: imported project file "gnatcoll_xref" not found 
>> > 
>> > So I tried to install libgnatcoll-sqlite20-dev, but that doesn't exist 
>> > and libgnatcoll-sqlite20 doesn't provide a gpr file.
>> I don't know about the Debian system, but wouldn't the numbers have to 
>> match (i.e., 19 vs 20)? 
>
> No, I don't think they have to match.

What evidence do you have for this?

In general, all GNAT code must come from the same compiler version; they
are free to change lots of internal stuff between versions. You might
get lucky mixing versions, but why waste time with stuff that probably
won't work?

> After successful installation of gnatcoll the compilation then fails at 
> gen_emacs_wisi_lr_parse.ads:37:53: missing ";"
>
> That line reads:
>
>     with WisiToken.Parse.LR.Parser;
>     with WisiToken.Syntax_Trees;
>     with Wisi;
>     generic
>        type Parse_Data_Type  is new Wisi.Parse_Data_Type with private; --line 37, char pos 53 is right before the keyword 'with'.
>
> The system compiler FSF gnat 10.2.1 doesn't like a generic parameter of a tagged type with a private part. Is that a new syntax?

not new, just broken in FSF gnat 10.2.1 with -gnat2020

-- 
-- Stephe

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-06 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 23:17 Emacs ada-mode installation on Debias bullseye R R
2021-09-05  9:55 ` Simon Wright
2021-09-05 18:19   ` Stephen Leake
2021-09-05 18:32   ` R R
2021-09-05 20:58     ` R R
2021-09-06 17:02     ` Stephen Leake

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