GNU bug report logs - #43742
Unable to compile ada-mode

Previous Next

Packages: ada-mode, emacs;

Reported by: Colton Lewis <colton.w.lewis <at> protonmail.com>

Date: Thu, 1 Oct 2020 12:35:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43742 in the body.
You can then email your comments to 43742 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Thu, 01 Oct 2020 12:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colton Lewis <colton.w.lewis <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org. (Thu, 01 Oct 2020 12:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colton Lewis <colton.w.lewis <at> protonmail.com>
To: ada-mode-users <at> nongnu.org
Cc: bug-gnu-emacs <at> gnu.org
Subject: Unable to compile ada-mode
Date: Thu, 01 Oct 2020 04:55:49 +0000
Package: emacs, ada-mode

I have recently tried and failed to compile ada-mode.
This may be a bug in -gnat2020 support, but I'm not
sure how the list wants to handle a solution.

emacs-27.1
ada-mode-7.1.4
gnat-10.2.1

$ ./build.sh
...
gen_run_wisi_lr_parse.ads:27:52: missing ";"
gen_run_wisi_lr_parse.ads:27:65: generic private child packages not permitted
gen_run_wisi_lr_parse.ads:27:65: subprogram specification expected
gen_run_wisi_lr_parse.ads:27:65: compilation unit expected
gen_run_wisi_lr_parse.ads:34:04: misplaced "with"
gen_run_wisi_lr_parse.ads:34:09: reserved word "procedure" cannot be used as identifier
gen_run_wisi_lr_parse.ads:34:18: missing ";"
gen_run_wisi_lr_parse.ads:34:19: compilation unit expected
clang-10: error: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000012.TMP' [-Werror,-Wunused-command-line-argument]

   compilation of ada_mode_wisi_lalr_parse.ads failed
   compilation of ada_mode_wisi_lr1_parse.ads failed
   compilation of run_ada_lalr_parse.ads failed
   compilation of run_ada_lr1_parse.ads failed
   compilation of gpr_mode_wisi_parse.ads failed
   compilation of run_gpr_parse.ads failed
   compilation of wisitoken_grammar_re2c.c failed

gprbuild: *** compilation phase failed

It is choking on the line:
type Parse_Data_Type is new Wisi.Parse_Data_Type with private;

As far as I can tell from the ARM, this should be legal in 2020 and 2012.
Also note the clang error. Trying with some options.

$ ./build -cargs:ada -gnat2012 -cargs:c -Wno-error=unused-command-line-argument
...
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
gpr_query.adb:553:19: target_name is an Ada 2020 feature
gpr_query.adb:553:22: (style) space not allowed
clang-10: warning: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000012.TMP' [-Wunused-command-line-argument]

   compilation of gpr_query.adb failed

And we fail again lacking a 2020 feature.









Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Thu, 01 Oct 2020 16:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 43742 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Colton Lewis <colton.w.lewis <at> protonmail.com>
Cc: 43742 <at> debbugs.gnu.org, ada-mode-users <at> nongnu.org
Subject: Re: bug#43742: Unable to compile ada-mode
Date: Thu, 01 Oct 2020 18:52:18 +0200
Colton Lewis <colton.w.lewis <at> protonmail.com> writes:

> Package: emacs, ada-mode
>
> I have recently tried and failed to compile ada-mode.
> This may be a bug in -gnat2020 support, but I'm not
> sure how the list wants to handle a solution.
>
> emacs-27.1
> ada-mode-7.1.4
> gnat-10.2.1
>
> $ ./build.sh
> ...
> gen_run_wisi_lr_parse.ads:27:52: missing ";"

I'm not quite sure I understand the bug report.  Is it about compiling
ada-mode, or is it about building gnat?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Thu, 01 Oct 2020 17:30:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Wright <simon.j.wright <at> mac.com>
To: Colton Lewis <colton.w.lewis <at> protonmail.com>
Cc: bug-gnu-emacs <at> gnu.org, Ada mode users <ada-mode-users <at> nongnu.org>
Subject: Re: Unable to compile ada-mode
Date: Thu, 1 Oct 2020 18:29:31 +0100
GCC 10[.1.0] has the problem.
GCC 9[.1.0] does not.

I haven't bothered to install the necessary gnatcoll packages in GNAT CE 2020 so I don't know whether it would work or fail.

> On 1 Oct 2020, at 05:55, Colton Lewis <colton.w.lewis <at> protonmail.com> wrote:
> 
> Package: emacs, ada-mode
> 
> I have recently tried and failed to compile ada-mode.
> This may be a bug in -gnat2020 support, but I'm not
> sure how the list wants to handle a solution.
> 
> emacs-27.1
> ada-mode-7.1.4
> gnat-10.2.1
> 
> $ ./build.sh
> ...
> gen_run_wisi_lr_parse.ads:27:52: missing ";"
> gen_run_wisi_lr_parse.ads:27:65: generic private child packages not permitted
> gen_run_wisi_lr_parse.ads:27:65: subprogram specification expected
> gen_run_wisi_lr_parse.ads:27:65: compilation unit expected
> gen_run_wisi_lr_parse.ads:34:04: misplaced "with"
> gen_run_wisi_lr_parse.ads:34:09: reserved word "procedure" cannot be used as identifier
> gen_run_wisi_lr_parse.ads:34:18: missing ";"
> gen_run_wisi_lr_parse.ads:34:19: compilation unit expected
> clang-10: error: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000012.TMP' [-Werror,-Wunused-command-line-argument]
> 
>   compilation of ada_mode_wisi_lalr_parse.ads failed
>   compilation of ada_mode_wisi_lr1_parse.ads failed
>   compilation of run_ada_lalr_parse.ads failed
>   compilation of run_ada_lr1_parse.ads failed
>   compilation of gpr_mode_wisi_parse.ads failed
>   compilation of run_gpr_parse.ads failed
>   compilation of wisitoken_grammar_re2c.c failed
> 
> gprbuild: *** compilation phase failed
> 
> It is choking on the line:
> type Parse_Data_Type is new Wisi.Parse_Data_Type with private;
> 
> As far as I can tell from the ARM, this should be legal in 2020 and 2012.
> Also note the clang error. Trying with some options.
> 
> $ ./build -cargs:ada -gnat2012 -cargs:c -Wno-error=unused-command-line-argument
> ...
> 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
> gpr_query.adb:553:19: target_name is an Ada 2020 feature
> gpr_query.adb:553:22: (style) space not allowed
> clang-10: warning: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000012.TMP' [-Wunused-command-line-argument]
> 
>   compilation of gpr_query.adb failed
> 
> And we fail again lacking a 2020 feature.
> 
> 
> 
> 
> 
> 





Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Sun, 04 Oct 2020 23:02:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: Colton Lewis <colton.w.lewis <at> protonmail.com>
Cc: bug-gnu-emacs <at> gnu.org, ada-mode-users <at> nongnu.org
Subject: Re: Unable to compile ada-mode
Date: Sun, 04 Oct 2020 16:01:10 -0700
Colton Lewis <colton.w.lewis <at> protonmail.com> writes:

>
> emacs-27.1
> ada-mode-7.1.4
> gnat-10.2.1

What is "gnat-10.2.1"? where did you get it?

If possible, report this as a compiler bug.

I'm testing with the GNAT Community releases, and a gnat pro wavefront.


> gpr_query.adb:553:19: target_name is an Ada 2020 feature

that line is:

         Count := @ + 1;

you can change it to:

         Count := Count + 1;

-- 
-- Stephe




Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Tue, 06 Oct 2020 14:11:03 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colton Lewis <colton.w.lewis <at> protonmail.com>
To: Stephen Leake <stephen_leake <at> stephe-leake.org>
Cc: bug-gnu-emacs <at> gnu.org, ada-mode-users <at> nongnu.org
Subject: Re: Unable to compile ada-mode
Date: Tue, 06 Oct 2020 06:32:37 +0000
On Sunday, October 4, 2020 6:01:10 PM CDT Stephen Leake wrote:
> 
> Colton Lewis <colton.w.lewis <at> protonmail.com> writes:
> 
> >
> > emacs-27.1
> > ada-mode-7.1.4
> > gnat-10.2.1
> 
> What is "gnat-10.2.1"? where did you get it?

GCC version 10.2.1 from the default Fedora 32 repositories. On a tangent,
the online Emacs manual says ada-mode should be included in the standard
distribution, but it wasn't. Should it be there?

> If possible, report this as a compiler bug.

Done: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97283
Closed as the logic bug causing the issue is fixed on master.
Unsure if it will be released in GCC 10 updates.

> that line is:
> 
>          Count := @ + 1;
> 
> you can change it to:
> 
>          Count := Count + 1;

Thanks. After changing that, I get a further error.

$ ./build.sh -cargs:ada -gnat2012 -cargs:c -Wno-error=unused-command-line-argument
...
   [Ada]          wisi-ada.adb
   [Ada]          wisitoken.adb
sal-gen_unbounded_definite_red_black_trees.adb:308:26: access discriminant in return aggregate would be a dangling reference
sal-gen_unbounded_definite_red_black_trees.adb:326:29: access discriminant in return aggregate would be a dangling reference
sal-gen_unbounded_definite_red_black_trees.adb:338:26: access discriminant in return aggregate would be a dangling reference
sal-gen_unbounded_definite_red_black_trees.adb:352:29: access discriminant in return aggregate would be a dangling reference
sal-gen_definite_doubly_linked_lists.adb:268:26: access discriminant in return aggregate would be a dangling reference
sal-gen_definite_doubly_linked_lists.adb:273:26: access discriminant in return aggregate would be a dangling reference
sal-gen_definite_doubly_linked_lists.adb:280:26: access discriminant in return aggregate would be a dangling reference
sal-gen_definite_doubly_linked_lists.adb:285:26: access discriminant in return aggregate would be a dangling reference
clang-10: warning: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000014.TMP' [-Wunused-command-line-argument]
clang-10: warning: argument unused during compilation: '-specs=/tmp/GNAT-TEMP-000014.TMP' [-Wunused-command-line-argument]


   compilation of wisitoken.adb failed
   compilation of wisi.adb failed







Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Thu, 08 Oct 2020 15:44:01 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: Colton Lewis <colton.w.lewis <at> protonmail.com>
Cc: bug-gnu-emacs <at> gnu.org, ada-mode-users <at> nongnu.org
Subject: Re: Unable to compile ada-mode
Date: Thu, 08 Oct 2020 08:43:07 -0700
Colton Lewis <colton.w.lewis <at> protonmail.com> writes:

> On Sunday, October 4, 2020 6:01:10 PM CDT Stephen Leake wrote:
>> 
>> Colton Lewis <colton.w.lewis <at> protonmail.com> writes:
>> 
>> >
>> > emacs-27.1
>> > ada-mode-7.1.4
>> > gnat-10.2.1
>> 
>> What is "gnat-10.2.1"? where did you get it?
>
> GCC version 10.2.1 from the default Fedora 32 repositories. 

Ok. Apparently Debian testing has gnat-10.2.0. I could test with the latest
Debian gnat release.

> On a tangent, the online Emacs manual 

Where?

> says ada-mode should be included in the standard distribution, but it
> wasn't. 

ada-mode used to be in Emacs core, but I moved it to ELPA. Apparently
that's a more complex process than I realized.

> Should it be there?

There is not yet a mechanism to bundle ELPA packages in the emacs
distribution. I don't see the point of doing that; people should be used
to installing Emacs packages, just like they install Debian (or Fedora
or ...) packages.

>    [Ada]          wisi-ada.adb
>    [Ada]          wisitoken.adb
> sal-gen_unbounded_definite_red_black_trees.adb:308:26: access
> discriminant in return aggregate would be a dangling reference

That's a new instance of a known bug; see the WORKAROUND note at line
321 in that file; delete the '.all' and it magically works.

> clang-10: warning: argument unused during compilation:
> '-specs=/tmp/GNAT-TEMP-000014.TMP' [-Wunused-command-line-argument]

This I don't understand

-- 
-- Stephe




Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Fri, 09 Oct 2020 23:26:02 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Colton Lewis <colton.w.lewis <at> protonmail.com>
To: Stephen Leake <stephen_leake <at> stephe-leake.org>
Cc: bug-gnu-emacs <at> gnu.org, ada-mode-users <at> nongnu.org
Subject: Re: Unable to compile ada-mode
Date: Fri, 09 Oct 2020 23:04:37 +0000
On Thursday, October 8, 2020 10:43:07 AM CDT Stephen Leake wrote:
> 
> > On a tangent, the online Emacs manual
> 
> Where?

First result on google for the string "emacs ada-mode".
First sentence under Installation section.

https://www.gnu.org/software/emacs/manual/html_mono/ada-mode.html#Installation

> >    [Ada]          wisi-ada.adb
> >    [Ada]          wisitoken.adb
> > sal-gen_unbounded_definite_red_black_trees.adb:308:26: access
> > discriminant in return aggregate would be a dangling reference
> 
> That's a new instance of a known bug; see the WORKAROUND note at line
> 321 in that file; delete the '.all' and it magically works.
Deleted ".all" everywhere the compiler complained. More errors.

wisitoken.ads:80:04: instantiation error at sal-gen_definite_doubly_linked_lists.adb:268
wisitoken.ads:80:04: instantiation error at sal-gen_unbounded_definite_queues.ads:88
wisitoken.ads:80:04: access discriminant in return aggregate would be a dangling reference
wisi.ads:497:04: instantiation error at sal-gen_unbounded_definite_red_black_trees.adb:308
wisi.ads:497:04: access discriminant in return aggregate would be a dangling reference

> 
> > clang-10: warning: argument unused during compilation:
> > '-specs=/tmp/GNAT-TEMP-000014.TMP' [-Wunused-command-line-argument]
> 
> This I don't understand

gprbuild grabs the first C compiler it can find on the system. I have
clang installed, so it uses that as the C compiler. Clang doesn't support
a "-spec" argument. 

https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug/companion_tools.html

Might want to add
for Driver ("C") use "gcc";
somewhere.








Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Sat, 10 Oct 2020 08:45:01 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Wright <simon.j.wright <at> mac.com>
To: Colton Lewis <colton.w.lewis <at> protonmail.com>
Cc: bug-gnu-emacs <at> gnu.org, Stephen Leake <stephen_leake <at> stephe-leake.org>,
 Ada mode users <ada-mode-users <at> nongnu.org>
Subject: Re: Unable to compile ada-mode
Date: Sat, 10 Oct 2020 09:44:26 +0100
[Message part 1 (text/plain, inline)]
I see. I always have GNAT first on my PATH, but of course on macOS GNAT isn't in the standard PATH so I have to.

I would have had similar problems, but it seems I used GCC 9.

> On 10 Oct 2020, at 00:04, Colton Lewis <colton.w.lewis <at> protonmail.com> wrote:
> 
> Might want to add
> for Driver ("C") use "gcc";
> somewhere.

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Mon, 23 Aug 2021 20:55:01 GMT) Full text and rfc822 format available.

Message #29 received at 43742 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Leake <stephen_leake <at> stephe-leake.org>
To: 43742 <at> debbugs.gnu.org
Subject: Re: Unable to compile ada-mode
Date: Mon, 23 Aug 2021 13:53:58 -0700
I believe this should be fixed by ada-mode 7.1.8 with wisi 3.1.5; please
confirm.


-- 
-- Stephe




Information forwarded to bug-gnu-emacs <at> gnu.org, stephen_leake <at> stephe-leake.org:
bug#43742; Package emacs, ada-mode. (Fri, 28 Jan 2022 15:29:02 GMT) Full text and rfc822 format available.

Message #32 received at 43742 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Leake <stephen_leake <at> stephe-leake.org>
Cc: 43742 <at> debbugs.gnu.org, Colton Lewis <colton.w.lewis <at> protonmail.com>
Subject: Re: bug#43742: Unable to compile ada-mode
Date: Fri, 28 Jan 2022 16:28:01 +0100
Stephen Leake <stephen_leake <at> stephe-leake.org> writes:

> I believe this should be fixed by ada-mode 7.1.8 with wisi 3.1.5; please
> confirm.

More information was requested, but no response was given within a few
months, so I'm closing this bug report.  If the problem still exists,
please respond to this email and we'll reopen the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 43742 <at> debbugs.gnu.org and Colton Lewis <colton.w.lewis <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 28 Jan 2022 15:29:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 52 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.