Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

finlandia:~> apropos win win: nothing appropriate.


devel / comp.lang.ada / Re: Problem with emacs ada-mode-7.1.4

SubjectAuthor
* Problem with emacs ada-mode-7.1.4Paul Onions
+* Re: Problem with emacs ada-mode-7.1.4Simon Wright
|`* Re: Problem with emacs ada-mode-7.1.4Paul Onions
| `* Re: Problem with emacs ada-mode-7.1.4Dmitry A. Kazakov
|  `* Re: Problem with emacs ada-mode-7.1.4Paul Onions
|   +* Re: Problem with emacs ada-mode-7.1.4Paul Onions
|   |`* Re: Problem with emacs ada-mode-7.1.4Simon Wright
|   | +* Re: Problem with emacs ada-mode-7.1.4Paul Onions
|   | |`- Re: Problem with emacs ada-mode-7.1.4Simon Wright
|   | `- Re: Problem with emacs ada-mode-7.1.4Stephen Leake
|   `- Re: Problem with emacs ada-mode-7.1.4Stephen Leake
`* Re: Problem with emacs ada-mode-7.1.4Stephen Leake
 `- Re: Problem with emacs ada-mode-7.1.4Paul Onions

1
Problem with emacs ada-mode-7.1.4

<4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5581&group=comp.lang.ada#5581

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:2d04:: with SMTP id t4mr14355100qkh.160.1626508590417;
Sat, 17 Jul 2021 00:56:30 -0700 (PDT)
X-Received: by 2002:a25:ae25:: with SMTP id a37mr18937817ybj.253.1626508590249;
Sat, 17 Jul 2021 00:56:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sat, 17 Jul 2021 00:56:29 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
Subject: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sat, 17 Jul 2021 07:56:30 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Paul Onions - Sat, 17 Jul 2021 07:56 UTC

Hello All,

Not sure if this is the right place to post this, but I have a problem compiling the Ada code after installing ada-mode 7.1.4 as a package in Gnu Emacs 27.2.

Specifically, when I cd into ~/.emacs.d/elpa/ada-mode-7.1.4/ and issue the command ./build.sh I get the following:-

....
Compile
[Ada] ada_mode_wisi_lalr_parse.ads
[Ada] ada_mode_wisi_lr1_parse.ads
[Ada] run_ada_lalr_parse.ads
[Ada] run_ada_lr1_parse.ads
[Ada] gpr_mode_wisi_parse.ads
[Ada] run_gpr_parse.ads
[Ada] gpr_query.adb
[C] wisitoken_grammar_re2c.c
sal-gen_unbounded_definite_vectors.adb:452:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:454:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:456:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:474:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:476:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:478:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:532:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:534:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:543:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:545:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:552:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:554:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:561:10: access discriminant in return object would be a dangling reference
sal-gen_unbounded_definite_vectors.adb:563:10: access discriminant in return object would be a dangling reference
....

I'm using GCC 11.1.0 from the download at https://github.com/simonjwright/building-gcc-macos-native, on macOS Big Sur.

Any help appreciated. Thanks,
Paul

Re: Problem with emacs ada-mode-7.1.4

<lyfswcy6zx.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5582&group=comp.lang.ada#5582

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!PbIre1IJ/IjjT/hZmc5sCw.user.gioia.aioe.org.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Sat, 17 Jul 2021 22:18:10 +0100
Organization: Aioe.org NNTP Server
Lines: 15
Message-ID: <lyfswcy6zx.fsf@pushface.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
NNTP-Posting-Host: PbIre1IJ/IjjT/hZmc5sCw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: abuse@aioe.org
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:P9x4EFLC/pd/XDGlx2zmyu4xhsE=
 by: Simon Wright - Sat, 17 Jul 2021 21:18 UTC

Paul Onions <ponions37@gmail.com> writes:

> Not sure if this is the right place to post this, but I have a problem
> compiling the Ada code after installing ada-mode 7.1.4 as a package in
> Gnu Emacs 27.2.
[...]
> sal-gen_unbounded_definite_vectors.adb:452:10: access discriminant in
> return object would be a dangling reference
[...]
> I'm using GCC 11.1.0 from the download at
> https://github.com/simonjwright/building-gcc-macos-native, on macOS
> Big Sur.

There has been a problem in this area for a while now. I compiled the
ada-mode I'm using (successfully) with GNAT CE 2019.

Re: Problem with emacs ada-mode-7.1.4

<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5583&group=comp.lang.ada#5583

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:4102:: with SMTP id kc2mr18800648qvb.44.1626597798444;
Sun, 18 Jul 2021 01:43:18 -0700 (PDT)
X-Received: by 2002:a25:aa09:: with SMTP id s9mr24180015ybi.165.1626597798302;
Sun, 18 Jul 2021 01:43:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 18 Jul 2021 01:43:18 -0700 (PDT)
In-Reply-To: <lyfswcy6zx.fsf@pushface.org>
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com> <lyfswcy6zx.fsf@pushface.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
Subject: Re: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sun, 18 Jul 2021 08:43:18 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Paul Onions - Sun, 18 Jul 2021 08:43 UTC

Hello Simon,

On Saturday, 17 July 2021 at 22:18:16 UTC+1, Simon Wright wrote:
> There has been a problem in this area for a while now. I compiled the
> ada-mode I'm using (successfully) with GNAT CE 2019.

Thanks for responding. I just tried that but now I get:-

ada_mode_wisi_parse.gpr:22:06: unknown project file: "gnatcoll_sqlite"
ada_mode_wisi_parse.gpr:23:06: unknown project file: "gnatcoll_xref"

So I assume I need to install these gnatcoll components. I downloaded gnatcoll-db-21.0.0 from AdaCore's GitHub presence, but trying to build gnatcoll_sql I get:-

....
Compile
[Ada] gnatcoll-sql-exec-tasking.adb
[Ada] gnatcoll-sql-inspect.adb
[Ada] gnatcoll-sql_fields.adb
[Ada] gnatcoll-sql_impl.adb
gnatcoll-sql_impl.adb:1679:44: "UTC_Time_Offset" is not visible (more references follow)
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-catizo.ads:28
gnatcoll-sql_impl.adb:1679:44: non-visible declaration at a-calend.ads:403
....

I also tried with GNAT CE 2020 but get the same results. I'm guessing that UTC_Time_Offset is maybe a recent addition to one of the Ada/GNAT packages USEd by gnatcoll-sql_impl.adb?

Slightly confused,
Paul

Re: Problem with emacs ada-mode-7.1.4

<sd0qjl$hj2$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5584&group=comp.lang.ada#5584

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Sun, 18 Jul 2021 11:00:35 +0200
Organization: Aioe.org NNTP Server
Lines: 14
Message-ID: <sd0qjl$hj2$1@gioia.aioe.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org>
<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
NNTP-Posting-Host: 5WHqCw2XxjHb2npjM9GYbw.user.gioia.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.12.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Sun, 18 Jul 2021 09:00 UTC

On 2021-07-18 10:43, Paul Onions wrote:

> I'm guessing that UTC_Time_Offset is maybe a recent addition to one of the Ada/GNAT packages USEd by gnatcoll-sql_impl.adb?

That depends on personal perception. To me year 2005 is like yesterday
(:-()


https://www.adaic.org/resources/add_content/standards/05rm/html/RM-9-6-1.html#I3765

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Problem with emacs ada-mode-7.1.4

<76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5585&group=comp.lang.ada#5585

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:2d04:: with SMTP id t4mr19423937qkh.160.1626600377153;
Sun, 18 Jul 2021 02:26:17 -0700 (PDT)
X-Received: by 2002:a25:4206:: with SMTP id p6mr23643974yba.465.1626600377003;
Sun, 18 Jul 2021 02:26:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 18 Jul 2021 02:26:16 -0700 (PDT)
In-Reply-To: <sd0qjl$hj2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org> <6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
Subject: Re: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sun, 18 Jul 2021 09:26:17 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Paul Onions - Sun, 18 Jul 2021 09:26 UTC

Hi Dmitry,

On Sunday, 18 July 2021 at 10:00:43 UTC+1, Dmitry A. Kazakov wrote:
> https://www.adaic.org/resources/add_content/standards/05rm/html/RM-9-6-1.html#I3765

That's interesting, so it's in Ada.Calendar.Time_Zones from Ada2005, but that is not one of the packages USEd by gnatcoll-sql_impl.adb. So I'm guessing it was added to one of the GNAT packages later.

Anyway, I cloned the gnatcoll-db git repository and found a "20-sustained" branch in there. Switching to it then allowed me to build gnatcoll_sqlite with GNAT CE 2020. Yay.

However, trying to build gnatcoll_xref failed because it's looking for something called gnatcoll_iconv, which I don't see anywhere in the repository. Need to go looking for that now (or rather later, when I've more time)...

Paul

Re: Problem with emacs ada-mode-7.1.4

<71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5586&group=comp.lang.ada#5586

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:6214:a0d:: with SMTP id dw13mr20154751qvb.41.1626614912694;
Sun, 18 Jul 2021 06:28:32 -0700 (PDT)
X-Received: by 2002:a25:aa09:: with SMTP id s9mr25426218ybi.165.1626614912482;
Sun, 18 Jul 2021 06:28:32 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 18 Jul 2021 06:28:32 -0700 (PDT)
In-Reply-To: <76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org> <6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org> <76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com>
Subject: Re: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sun, 18 Jul 2021 13:28:32 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Paul Onions - Sun, 18 Jul 2021 13:28 UTC

So I've finally managed to get ada-mode installed and working with GNAT CE 2020. For the record here's what I did (in case it's useful to others):-

1. Cloned git repositories gnatcoll-db and gnatcoll-bindings from github.com/AdaCore/, checked out branch "20-sustained" in both repositories then built and installed gnatcoll_iconv (in gnatcoll-bindings), and gnatcoll_xref, gnatcoll_sql, gnatcoll_sqlite (in gnatcoll-db).

2. In ~/.emacs.d/elpa/ada-mode-7.1.4/ ran ./build.sh, which failed with an error message about file sal-gen_unbounded_definite_red_black_trees.adb. So went to that file in ~/.emacs.d/elpa/wisi-3.1.3/, read the comments tagged with "WORKAROUND" and deleted the appropriate ".all" components. Reran ./build.sh which completed successfully and then ran ./install.sh, also successful.

3. Opened an Ada file and watched Emacs complain about a void-function called wisi--lexer-error. Enabled the Emacs debugger and looked in the traceback. Message seems to be coming from compiled byte-code, so I deleted all .elc files in the wisi-3.1.3 directory and tried again. Now I get a message saying ada_mode_wisi_lr1_parse cannot be found on exec-path, so I go look for it and end up adding the GNAT CE 2020 bin path to exec-path in my Emacs setup and now finally it's working! Phew.

I have one question: was my original problem a bug in the ada-mode code or is it a bug in the latest GNAT compiler? (GCC 11.1.0)

Thanks,
Paul

Re: Problem with emacs ada-mode-7.1.4

<ly7dhny4ig.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5587&group=comp.lang.ada#5587

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!RKN7TKnHC01q0gdg6EhkbQ.user.46.165.242.75.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Sun, 18 Jul 2021 17:24:07 +0100
Organization: Aioe.org NNTP Server
Message-ID: <ly7dhny4ig.fsf@pushface.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org>
<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org>
<76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
<71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="1860"; posting-host="RKN7TKnHC01q0gdg6EhkbQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
Cancel-Lock: sha1:CHr0IuTnUfKupLtLihJhgOOHN0c=
X-Notice: Filtered by postfilter v. 0.9.2
 by: Simon Wright - Sun, 18 Jul 2021 16:24 UTC

Paul Onions <ponions37@gmail.com> writes:

> I have one question: was my original problem a bug in the ada-mode
> code or is it a bug in the latest GNAT compiler? (GCC 11.1.0)

Just had a poke around.

GNAT CE 2019, using the matching gnatcoll-db and gnatcoll-bindings from
the CE download site, worked OK.

CE 2020, with its matching bindings, required the WORKAROUND changes to
build.

CE 2021, with its matching bindings, failed in *exactly the same way* as
FSF GCC 11.1.0!! There was an interesting thread about this at [1]; I'm
not sure from that whether the ada-mode code is OK or not, but it seems
that even if it is we'll have to wait for a later compiler release.

The lesson I'd draw is that building your own container collection is
risky. At least if you start from Ada.Containers you have a reasonably
firm basis.

With regard to "matching bindings" above, these can be found at the CE
download site[2]. Find the compiler release you want the bindings for
(we Mac users are better off going for the x86 GNU Linux (64 bits)
version) and click on the Sources link. For CE 2021, you'll find -core
and -bindings but not -db; I see that I used the v21.0.0 tag from
AdaCore's github repo when I built the binary CE 2021 distribution
you'll find at [3].

[1]
https://groups.google.com/g/comp.lang.ada/c/7dw7Oqi8lIk/m/t6UJkTIHDQAJ
[2] https://www.adacore.com/download/more
[3] https://github.com/simonjwright/distributing-gcc/releases/tag/gnat-ce-2021

Re: Problem with emacs ada-mode-7.1.4

<86lf634ks4.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5588&group=comp.lang.ada#5588

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!9CzwYWWlKVx8RMZd/VcwFg.user.46.165.242.75.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Sun, 18 Jul 2021 10:03:07 -0700
Organization: Aioe.org NNTP Server
Message-ID: <86lf634ks4.fsf@stephe-leake.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="35357"; posting-host="9CzwYWWlKVx8RMZd/VcwFg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:d0GhtoWiA4s6a22QMnFUfE8o1XI=
 by: Stephen Leake - Sun, 18 Jul 2021 17:03 UTC

Paul Onions <ponions37@gmail.com> writes:

> Not sure if this is the right place to post this,

This is ok; the ada-mode mailing list at
https://savannah.nongnu.org/projects/ada-mode/ is better.

> but I have a problem compiling the Ada code after installing ada-mode
> 7.1.4 as a package in Gnu Emacs 27.2.
>
> Specifically, when I cd into ~/.emacs.d/elpa/ada-mode-7.1.4/ and issue
> the command ./build.sh I get the following:-

> sal-gen_unbounded_definite_vectors.adb:452:10: access discriminant in
> return object would be a dangling reference

This is due to a change in your version of GNAT vs the one I tested with
(better dangling reference detection); switch to Community 2020.

> I'm using GCC 11.1.0 from the download at
> https://github.com/simonjwright/building-gcc-macos-native, on macOS
> Big Sur.

Ok.

I have a fix for this in the development version of ada-mode. I didn't
realize this version of GNAT was in FSF gcc yet.

--
-- Stephe

Re: Problem with emacs ada-mode-7.1.4

<e31c513b-3836-4baa-9017-f940ce500231n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5589&group=comp.lang.ada#5589

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a37:9504:: with SMTP id x4mr20599251qkd.235.1626636293273;
Sun, 18 Jul 2021 12:24:53 -0700 (PDT)
X-Received: by 2002:a25:6b0c:: with SMTP id g12mr27656945ybc.303.1626636292999;
Sun, 18 Jul 2021 12:24:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 18 Jul 2021 12:24:52 -0700 (PDT)
In-Reply-To: <ly7dhny4ig.fsf@pushface.org>
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org> <6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org> <76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
<71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com> <ly7dhny4ig.fsf@pushface.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e31c513b-3836-4baa-9017-f940ce500231n@googlegroups.com>
Subject: Re: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sun, 18 Jul 2021 19:24:53 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Paul Onions - Sun, 18 Jul 2021 19:24 UTC

On Sunday, 18 July 2021 at 17:24:11 UTC+1, Simon Wright wrote:
> There was an interesting thread about this at [1]; I'm
> not sure from that whether the ada-mode code is OK or not, but it seems
> that even if it is we'll have to wait for a later compiler release.

Thanks for looking further into it. Not sure I'm qualified enough in the Ada world to properly follow the discussion in the thread you link to -- I'll try to spend some on it later :-)

Thanks,
Paul

Re: Problem with emacs ada-mode-7.1.4

<bcee7910-a051-4737-b12b-a8b7552173e8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5590&group=comp.lang.ada#5590

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:a05:620a:1465:: with SMTP id j5mr12833233qkl.63.1626637006954;
Sun, 18 Jul 2021 12:36:46 -0700 (PDT)
X-Received: by 2002:a25:bc10:: with SMTP id i16mr25602053ybh.73.1626637006799;
Sun, 18 Jul 2021 12:36:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 18 Jul 2021 12:36:46 -0700 (PDT)
In-Reply-To: <86lf634ks4.fsf@stephe-leake.org>
Injection-Info: google-groups.googlegroups.com; posting-host=109.180.159.156; posting-account=8KbgxQkAAACJyvtPg84oL23eOX_jDVUP
NNTP-Posting-Host: 109.180.159.156
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com> <86lf634ks4.fsf@stephe-leake.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bcee7910-a051-4737-b12b-a8b7552173e8n@googlegroups.com>
Subject: Re: Problem with emacs ada-mode-7.1.4
From: ponion...@gmail.com (Paul Onions)
Injection-Date: Sun, 18 Jul 2021 19:36:46 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Paul Onions - Sun, 18 Jul 2021 19:36 UTC

Hi Stephen,

On Sunday, 18 July 2021 at 18:03:13 UTC+1, Stephen Leake wrote:
> Paul Onions writes:
> > Not sure if this is the right place to post this,
> This is ok; the ada-mode mailing list at
> https://savannah.nongnu.org/projects/ada-mode/ is better.

Okay, thanks, I'll try to remember in future :-)

> I have a fix for this in the development version of ada-mode. I didn't
> realize this version of GNAT was in FSF gcc yet.

Okay, sounds good, look forward to trying it out.

Thanks,
Paul

Re: Problem with emacs ada-mode-7.1.4

<ly35say2r1.fsf@pushface.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5593&group=comp.lang.ada#5593

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!RKN7TKnHC01q0gdg6EhkbQ.user.46.165.242.75.POSTED!not-for-mail
From: sim...@pushface.org (Simon Wright)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Mon, 19 Jul 2021 12:14:26 +0100
Organization: Aioe.org NNTP Server
Message-ID: <ly35say2r1.fsf@pushface.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org>
<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org>
<76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
<71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com>
<ly7dhny4ig.fsf@pushface.org>
<e31c513b-3836-4baa-9017-f940ce500231n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="44280"; posting-host="RKN7TKnHC01q0gdg6EhkbQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)
Cancel-Lock: sha1:GtiN+a9a+RilLKi4k6o+lHP+ZXo=
X-Notice: Filtered by postfilter v. 0.9.2
 by: Simon Wright - Mon, 19 Jul 2021 11:14 UTC

Paul Onions <ponions37@gmail.com> writes:

> On Sunday, 18 July 2021 at 17:24:11 UTC+1, Simon Wright wrote:
>> There was an interesting thread about this at [1]; I'm not sure from
>> that whether the ada-mode code is OK or not, but it seems that even
>> if it is we'll have to wait for a later compiler release.
>
> Thanks for looking further into it. Not sure I'm qualified enough in
> the Ada world to properly follow the discussion in the thread you link
> to -- I'll try to spend some on it later :-)

Not many of us are. That chapter in the ARM (3.10.2) is known as the
Heart of Darkness for a reason. See AARM 3.10.2(3.a, b)[1].

While poking at the ada-mode code, I found that avoiding anonymous
accesses (especially when used as discriminants) went a long way to
quieting the compiler; and the use of 'Unchecked_Access also helped.

[1]: http://www.ada-auth.org/standards/aarm12_w_tc1/html/AA-3-10-2.html#p3.a

Re: Problem with emacs ada-mode-7.1.4

<86czreauos.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5594&group=comp.lang.ada#5594

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!9CzwYWWlKVx8RMZd/VcwFg.user.46.165.242.75.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Mon, 19 Jul 2021 13:57:07 -0700
Organization: Aioe.org NNTP Server
Message-ID: <86czreauos.fsf@stephe-leake.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org>
<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org>
<76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="7921"; posting-host="9CzwYWWlKVx8RMZd/VcwFg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:ZkF2BnrFNggk/37+4HA/w2gfnF8=
 by: Stephen Leake - Mon, 19 Jul 2021 20:57 UTC

Paul Onions <ponions37@gmail.com> writes:

> Anyway, I cloned the gnatcoll-db git repository and found a
> "20-sustained" branch in there. Switching to it then allowed me to
> build gnatcoll_sqlite with GNAT CE 2020. Yay.

I'll add that to the ada-mode.info install instructions.

> However, trying to build gnatcoll_xref failed because it's looking for
> something called gnatcoll_iconv, which I don't see anywhere in the
> repository. Need to go looking for that now (or rather later, when
> I've more time)...

See the install instructions in ada-mode.info; it's in another github
repo; gnatcoll-bindings.

--
-- Stephe

Re: Problem with emacs ada-mode-7.1.4

<868s22atqf.fsf@stephe-leake.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=5595&group=comp.lang.ada#5595

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!9CzwYWWlKVx8RMZd/VcwFg.user.46.165.242.75.POSTED!not-for-mail
From: stephen_...@stephe-leake.org (Stephen Leake)
Newsgroups: comp.lang.ada
Subject: Re: Problem with emacs ada-mode-7.1.4
Date: Mon, 19 Jul 2021 14:17:44 -0700
Organization: Aioe.org NNTP Server
Message-ID: <868s22atqf.fsf@stephe-leake.org>
References: <4e943274-59ad-497d-9ef1-5f5d096aea56n@googlegroups.com>
<lyfswcy6zx.fsf@pushface.org>
<6b724d0f-3184-47f0-8266-c805406cf4b7n@googlegroups.com>
<sd0qjl$hj2$1@gioia.aioe.org>
<76673bec-53cc-4789-8f01-4a1d0d04e077n@googlegroups.com>
<71c3d589-fd6f-4b5e-a9f3-394109b1fa05n@googlegroups.com>
<ly7dhny4ig.fsf@pushface.org>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="27153"; posting-host="9CzwYWWlKVx8RMZd/VcwFg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt)
X-Notice: Filtered by postfilter v. 0.9.2
Cancel-Lock: sha1:BXtRo/0RfBDWloOwvMTmpdO8bjY=
 by: Stephen Leake - Mon, 19 Jul 2021 21:17 UTC

Simon Wright <simon@pushface.org> writes:

> Paul Onions <ponions37@gmail.com> writes:
>
>> I have one question: was my original problem a bug in the ada-mode
>> code or is it a bug in the latest GNAT compiler? (GCC 11.1.0)
>
> Just had a poke around.
>
> GNAT CE 2019, using the matching gnatcoll-db and gnatcoll-bindings from
> the CE download site, worked OK.
>
> CE 2020, with its matching bindings, required the WORKAROUND changes to
> build.
>
> CE 2021, with its matching bindings, failed in *exactly the same way* as
> FSF GCC 11.1.0!! There was an interesting thread about this at [1]; I'm
> not sure from that whether the ada-mode code is OK or not, but it seems
> that even if it is we'll have to wait for a later compiler release.

I think the latest gnat compiler is more correct, so the bug is in the
ada-mode code. There is a fix in the devel version of ada-mode (it still
has workarounds for a remaining compiler bug I found while creating that
fix).

I think you can access that devel version of ada-mode via the "bleeding
edge" elpa repository, which serves the HEAD versions instead of the
release versions. But I can't find any instructions on how to do that in
the ELPA docs.

> The lesson I'd draw is that building your own container collection is
> risky.

More generally, trusting the compiler to check use of access types, by
never using 'Unchecked_Access.

> At least if you start from Ada.Containers you have a reasonably firm
> basis.

I question "firm"; they use 'Unchecked_Access internally, and they are
not written in Spark. The best you can say is "maintained by AdaCore",
which nominally means any bugs exposed by compiler updates are fixed
before the compiler updates are released.

I posit that I have more experience writing Ada code than many of the
people now at AdaCore :).

Some of the containers in ada-mode that are required to be fast (because
they are used a lot in error recovery) are written in Spark; they use
bounded data storage, not allocation. Some are not, because they require
allocation. Spark has lately added some support for allocation; I'll
have to check if that means I can now migrate those containers to Spark.

> With regard to "matching bindings" above, these can be found at the CE
> download site[2].

As you point out, that has gnatcoll-bindings, but not gnatcoll-db;
gnatcoll-db is only available via github. ada-mode.info currently says
to get gnatcoll-bindings from github; I'll change that.

A recent exchange with AdaCore indicated that packages on github are
_not_ supported (even with a support contract). Which I did not know
before, and is yet another reason to switch to libadalang (which is
supported).

--
-- Stephe

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor