comp.lang.ada
 help / color / mirror / Atom feed
* Installing ada-mode 6.2.1 on Debian Buster
@ 2019-11-15 10:30 Markus Schöpflin
  2019-11-17 18:45 ` Stephen Leake
  2019-12-15 17:38 ` Azathoth Hastur
  0 siblings, 2 replies; 7+ messages in thread
From: Markus Schöpflin @ 2019-11-15 10:30 UTC (permalink / raw)


This turned out to be more difficult than expected, so I decided to share my 
notes on this here. It might be of use to someone.

How to install Emacs Ada mode 6.2.1 on Debian Buster:
-----------------------------------------------------

Prerequisits:

     apt-get install gnat
     apt-get install libgnatcoll-xref18-dev

Download & install Ada mode 6.2.1 from GNU ELPA via the Emacs package manager.

(Side note: Emacs has a bug preventing it to download anything from GNU ELPA, 
you need (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") in your 
.emacs. See 
https://www.reddit.com/r/emacs/comments/cdei4p/failed_to_download_gnu_archive_bad_request/ 
for more.)

Now, open a shell and go into the directory where Ada mode has been installed 
(e.g. ~/.emacs.d/elpa/ada-mode-6.2.1).

* Fix the line-ending of the two files wisi-fringe.el and gpr-query.el:

     dos2unix gpr-query.el ; dos2unix ../wisi-2.2.1/wisi-fringe.el.

* Comment out the line with "gnat_util"; in the file gpr_query.gpr.

* Make sure gprbuild will use the correct compilers, run gprconfig to select 
GNAT for Ada and GNATGCC for C. This is especially important if Clang is 
installed as well.

* Run build.sh. It should compile everything without errors, but it will fail 
on installation.

* Manually install the files gpr_query, all *.exe, and ada_lr1_parse_table.txt 
into /usr/local/bin/ or another directory on PATH.


-- 
Markus

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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-11-15 10:30 Installing ada-mode 6.2.1 on Debian Buster Markus Schöpflin
@ 2019-11-17 18:45 ` Stephen Leake
  2019-11-17 20:59   ` Simon Wright
  2019-11-18  9:01   ` Markus Schöpflin
  2019-12-15 17:38 ` Azathoth Hastur
  1 sibling, 2 replies; 7+ messages in thread
From: Stephen Leake @ 2019-11-17 18:45 UTC (permalink / raw)


On Friday, November 15, 2019 at 2:30:05 AM UTC-8, Markus Schöpflin wrote:

>      apt-get install gnat
>      apt-get install libgnatcoll-xref18-dev

I have been testing on Debian with the GNAT Community install, because gprbuild was not in the Debian package. I gather it is now, so I'll switch to that.

> Now, open a shell and go into the directory where Ada mode has been installed 
> (e.g. ~/.emacs.d/elpa/ada-mode-6.2.1).
> 
> * Fix the line-ending of the two files wisi-fringe.el and gpr-query.el:
> 
>      dos2unix gpr-query.el ; dos2unix ../wisi-2.2.1/wisi-fringe.el.

As mentioned on the ada-mode mailing list (https://lists.nongnu.org/mailman/listinfo/ada-mode-users) this should not matter, but does not hurt, and the files will have Unix line endings in the next Gnu ELPA release.

> * Comment out the line with "gnat_util"; in the file gpr_query.gpr.

This is a difference between GNAT versions. My development version also has deleted the "gnat_util".

> * Make sure gprbuild will use the correct compilers, run gprconfig to select 
> GNAT for Ada and GNATGCC for C. This is especially important if Clang is 
> installed as well.

I'll mention this in ada-mode.info. Can you post a little more detail about what to look for in gprconfig output? That is, by default build.sh just works; how can you tell if gprconfig needs special attention?
 
> * Run build.sh. It should compile everything without errors, but it will fail 
> on installation.

By default it installs executables in the same directory as the "gnat" binary. Thus it needs root privs (as any system install does).

> * Manually install the files gpr_query, all *.exe, and ada_lr1_parse_table.txt 
> into /usr/local/bin/ or another directory on PATH.

Simpler is to edit build.sh to add "--prefix <path>" to the gprinstall line. I gather it would be helpful to add a command line option to build.sh for this.
 
Thanks for the feedback.

After installing, is ada-mode working well for you? Have you noticed error recovery in the parser?

-- Stephe

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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-11-17 18:45 ` Stephen Leake
@ 2019-11-17 20:59   ` Simon Wright
  2019-11-18  9:01   ` Markus Schöpflin
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Wright @ 2019-11-17 20:59 UTC (permalink / raw)


Stephen Leake <stephen_leake@stephe-leake.org> writes:

> By default it installs executables in the same directory as the "gnat"
> binary. Thus it needs root privs (as any system install does).

This may be a macOS (or Simon!) weirdity, but both GCC 9.1 & GNAT CE
2019 installed under my ownership (in the staff group and the wheel
group rsp) so I have no problem installing the ada-mode executables.

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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-11-17 18:45 ` Stephen Leake
  2019-11-17 20:59   ` Simon Wright
@ 2019-11-18  9:01   ` Markus Schöpflin
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Schöpflin @ 2019-11-18  9:01 UTC (permalink / raw)


On 11/17/19 7:45 PM, Stephen Leake wrote:
> On Friday, November 15, 2019 at 2:30:05 AM UTC-8, Markus Schöpflin wrote:
> 
>>       apt-get install gnat
>>       apt-get install libgnatcoll-xref18-dev
> 
> I have been testing on Debian with the GNAT Community install, because gprbuild was not in the Debian package. I gather it is now, so I'll switch to that.
> 
>> Now, open a shell and go into the directory where Ada mode has been installed
>> (e.g. ~/.emacs.d/elpa/ada-mode-6.2.1).
>>
>> * Fix the line-ending of the two files wisi-fringe.el and gpr-query.el:
>>
>>       dos2unix gpr-query.el ; dos2unix ../wisi-2.2.1/wisi-fringe.el.
> 
> As mentioned on the ada-mode mailing list (https://lists.nongnu.org/mailman/listinfo/ada-mode-users) this should not matter, but does not hurt, and the files will have Unix line endings in the next Gnu ELPA release.

I got compile errors from Emacs during installation otherwise. This is with 
the regular Emacs (1:26.1+1-3.2+deb10u1) from Debian Buster.

[...]

>> * Make sure gprbuild will use the correct compilers, run gprconfig to select
>> GNAT for Ada and GNATGCC for C. This is especially important if Clang is
>> installed as well.
> 
> I'll mention this in ada-mode.info. Can you post a little more detail about what to look for in gprconfig output? That is, by default build.sh just works; how can you tell if gprconfig needs special attention?

This is impossible to miss, as you get weird error during compilation:

[...]
    [Ada]          gpr_mode_wisi_parse.ads
    [Ada]          run_gpr_parse.ads
    [C]            wisitoken_grammar_re2c.c
clang: error: argument unused during compilation: 
'-specs=/tmp/GNAT-TEMP-000006.TMP' [-Werror,-Wunused-command-line-argument]
gprbuild: *** compilation phase failed

You then need to run gprconfig, which gives you a list of compilers it finds 
on the PATH:

 > gprconfig
--------------------------------------------------
gprconfig has found the following compilers on your PATH.
Only those matching the target and the selected compilers are displayed.
    1. GNAT for Ada in /usr/bin/ version 8 (default runtime)
    2. GCC-ASM for Asm in /usr/bin/ version 8.3.0
    3. GCC-ASM for Asm2 in /usr/bin/ version 8.3.0
    4. GCC-ASM for Asm_Cpp in /usr/bin/ version 8.3.0
    5. LLVM for C in /usr/bin/ version 7.0.1
    6. GNATGCC for C in /usr/bin/ version 8
    7. GCC for C in /usr/bin/ version 8.3.0
    8. G++ for C++ in /usr/bin/ version 8.3.0
    9. GFORTRAN for Fortran in /usr/bin/ version 8.3.0
Select or unselect the following compiler (or "s" to save):

Just select the correct ones for GNAT, which means (1) and (6) in the example 
above.

>> * Run build.sh. It should compile everything without errors, but it will fail
>> on installation.
> 
> By default it installs executables in the same directory as the "gnat" binary. Thus it needs root privs (as any system install does).
> 
>> * Manually install the files gpr_query, all *.exe, and ada_lr1_parse_table.txt
>> into /usr/local/bin/ or another directory on PATH.
> 
> Simpler is to edit build.sh to add "--prefix <path>" to the gprinstall line. I gather it would be helpful to add a command line option to build.sh for this.

Plus perhaps splitting it in two scripts: build.sh and install.sh. So the 
build can be run as regular user, and only the install step needs to be run as 
root.

> Thanks for the feedback.

Thank *you* for all your hard work on the Ada mode. This is very much appreciated.

> After installing, is ada-mode working well for you? Have you noticed error recovery in the parser?

I didn't get around yet to really use it, but my first experience with it so 
far is good. I'm sure I will use it more in the weeks to come, so I will give 
you some feedback then.

-- 
Markus


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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-11-15 10:30 Installing ada-mode 6.2.1 on Debian Buster Markus Schöpflin
  2019-11-17 18:45 ` Stephen Leake
@ 2019-12-15 17:38 ` Azathoth Hastur
  2019-12-15 18:31   ` Simon Wright
  2019-12-15 19:05   ` Dennis Lee Bieber
  1 sibling, 2 replies; 7+ messages in thread
From: Azathoth Hastur @ 2019-12-15 17:38 UTC (permalink / raw)


On Friday, November 15, 2019 at 5:30:05 AM UTC-5, Markus Schöpflin wrote:
> This turned out to be more difficult than expected, so I decided to share my 
> notes on this here. It might be of use to someone.
> 
> How to install Emacs Ada mode 6.2.1 on Debian Buster:
> -----------------------------------------------------
> 
> Prerequisits:
> 
>      apt-get install gnat
>      apt-get install libgnatcoll-xref18-dev
> 
> Download & install Ada mode 6.2.1 from GNU ELPA via the Emacs package manager.
> 
> (Side note: Emacs has a bug preventing it to download anything from GNU ELPA, 
> you need (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") in your 
> .emacs. See 
> https://www.reddit.com/r/emacs/comments/cdei4p/failed_to_download_gnu_archive_bad_request/ 
> for more.)
> 
> Now, open a shell and go into the directory where Ada mode has been installed 
> (e.g. ~/.emacs.d/elpa/ada-mode-6.2.1).
> 
> * Fix the line-ending of the two files wisi-fringe.el and gpr-query.el:
> 
>      dos2unix gpr-query.el ; dos2unix ../wisi-2.2.1/wisi-fringe.el.
> 
> * Comment out the line with "gnat_util"; in the file gpr_query.gpr.
> 
> * Make sure gprbuild will use the correct compilers, run gprconfig to select 
> GNAT for Ada and GNATGCC for C. This is especially important if Clang is 
> installed as well.
> 
> * Run build.sh. It should compile everything without errors, but it will fail 
> on installation.
> 
> * Manually install the files gpr_query, all *.exe, and ada_lr1_parse_table.txt 
> into /usr/local/bin/ or another directory on PATH.
> 
> 
> -- 
> Markus

debian LOL

who uses that junkpile in 2019?
archlinux or art of linux s3


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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-12-15 17:38 ` Azathoth Hastur
@ 2019-12-15 18:31   ` Simon Wright
  2019-12-15 19:05   ` Dennis Lee Bieber
  1 sibling, 0 replies; 7+ messages in thread
From: Simon Wright @ 2019-12-15 18:31 UTC (permalink / raw)


Azathoth Hastur <azathothhaster@gmail.com> writes:

> who uses that junkpile in 2019?

:clunk:

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

* Re: Installing ada-mode 6.2.1 on Debian Buster
  2019-12-15 17:38 ` Azathoth Hastur
  2019-12-15 18:31   ` Simon Wright
@ 2019-12-15 19:05   ` Dennis Lee Bieber
  1 sibling, 0 replies; 7+ messages in thread
From: Dennis Lee Bieber @ 2019-12-15 19:05 UTC (permalink / raw)


On Sun, 15 Dec 2019 09:38:23 -0800 (PST), Azathoth Hastur
<azathothhaster@gmail.com> declaimed the following:

>
>debian LOL
>
>who uses that junkpile in 2019?

	It's the standard OS for Beaglebone, the base of the standard OS
(Raspbian) for Raspberry Pi, and is one of the releases available for the
M$ Windows Subsystem for Linux (the others being Ubuntu -- derived from
Debian, openSUSE, SUSE Enterprise, Kali... Sorry, no archlinux in sight).


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/


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

end of thread, other threads:[~2019-12-15 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 10:30 Installing ada-mode 6.2.1 on Debian Buster Markus Schöpflin
2019-11-17 18:45 ` Stephen Leake
2019-11-17 20:59   ` Simon Wright
2019-11-18  9:01   ` Markus Schöpflin
2019-12-15 17:38 ` Azathoth Hastur
2019-12-15 18:31   ` Simon Wright
2019-12-15 19:05   ` Dennis Lee Bieber

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