unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43742: Unable to compile ada-mode
@ 2020-10-01  4:55 Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-01 16:52 ` Lars Ingebrigtsen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-01  4:55 UTC (permalink / raw)
  To: ada-mode-users; +Cc: 43742

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.










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

* bug#43742: Unable to compile ada-mode
  2020-10-01  4:55 bug#43742: Unable to compile ada-mode Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-10-01 16:52 ` Lars Ingebrigtsen
  2020-10-01 17:29 ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 16:52 UTC (permalink / raw)
  To: Colton Lewis; +Cc: 43742, ada-mode-users

Colton Lewis <colton.w.lewis@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





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

* bug#43742: Unable to compile ada-mode
  2020-10-01  4:55 bug#43742: Unable to compile ada-mode Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-01 16:52 ` Lars Ingebrigtsen
@ 2020-10-01 17:29 ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-04 23:01 ` Stephen Leake
  2021-08-23 20:53 ` Stephen Leake
  3 siblings, 0 replies; 10+ messages in thread
From: Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-01 17:29 UTC (permalink / raw)
  To: Colton Lewis; +Cc: 43742, ada-mode-users

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@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.
> 
> 
> 
> 
> 
> 






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

* bug#43742: Unable to compile ada-mode
  2020-10-01  4:55 bug#43742: Unable to compile ada-mode Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-01 16:52 ` Lars Ingebrigtsen
  2020-10-01 17:29 ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-10-04 23:01 ` Stephen Leake
  2020-10-06  6:32   ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-23 20:53 ` Stephen Leake
  3 siblings, 1 reply; 10+ messages in thread
From: Stephen Leake @ 2020-10-04 23:01 UTC (permalink / raw)
  To: Colton Lewis; +Cc: 43742, ada-mode-users

Colton Lewis <colton.w.lewis@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





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

* bug#43742: Unable to compile ada-mode
  2020-10-04 23:01 ` Stephen Leake
@ 2020-10-06  6:32   ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-08 15:43     ` Stephen Leake
  0 siblings, 1 reply; 10+ messages in thread
From: Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-06  6:32 UTC (permalink / raw)
  To: 43742; +Cc: ada-mode-users

On Sunday, October 4, 2020 6:01:10 PM CDT Stephen Leake wrote:
> 
> Colton Lewis <colton.w.lewis@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








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

* bug#43742: Unable to compile ada-mode
  2020-10-06  6:32   ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-10-08 15:43     ` Stephen Leake
  2020-10-09 23:04       ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Leake @ 2020-10-08 15:43 UTC (permalink / raw)
  To: Colton Lewis; +Cc: 43742, ada-mode-users

Colton Lewis <colton.w.lewis@protonmail.com> writes:

> On Sunday, October 4, 2020 6:01:10 PM CDT Stephen Leake wrote:
>> 
>> Colton Lewis <colton.w.lewis@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





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

* bug#43742: Unable to compile ada-mode
  2020-10-08 15:43     ` Stephen Leake
@ 2020-10-09 23:04       ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-10-10  8:44         ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 10+ messages in thread
From: Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-09 23:04 UTC (permalink / raw)
  To: 43742; +Cc: ada-mode-users

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.









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

* bug#43742: Unable to compile ada-mode
  2020-10-09 23:04       ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-10-10  8:44         ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-10  8:44 UTC (permalink / raw)
  To: Colton Lewis; +Cc: 43742, ada-mode-users

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

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@protonmail.com> wrote:
> 
> Might want to add
> for Driver ("C") use "gcc";
> somewhere.


[-- Attachment #2: Type: text/html, Size: 2628 bytes --]

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

* bug#43742: Unable to compile ada-mode
  2020-10-01  4:55 bug#43742: Unable to compile ada-mode Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
                   ` (2 preceding siblings ...)
  2020-10-04 23:01 ` Stephen Leake
@ 2021-08-23 20:53 ` Stephen Leake
  2022-01-28 15:28   ` Lars Ingebrigtsen
  3 siblings, 1 reply; 10+ messages in thread
From: Stephen Leake @ 2021-08-23 20:53 UTC (permalink / raw)
  To: 43742

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


-- 
-- Stephe





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

* bug#43742: Unable to compile ada-mode
  2021-08-23 20:53 ` Stephen Leake
@ 2022-01-28 15:28   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-28 15:28 UTC (permalink / raw)
  To: 43742; +Cc: colton.w.lewis

Stephen Leake <stephen_leake@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





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

end of thread, other threads:[~2022-01-28 15:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01  4:55 bug#43742: Unable to compile ada-mode Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-10-01 16:52 ` Lars Ingebrigtsen
2020-10-01 17:29 ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-10-04 23:01 ` Stephen Leake
2020-10-06  6:32   ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-10-08 15:43     ` Stephen Leake
2020-10-09 23:04       ` Colton Lewis via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-10-10  8:44         ` Simon Wright via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-23 20:53 ` Stephen Leake
2022-01-28 15:28   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).