comp.lang.ada
 help / color / mirror / Atom feed
From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: Re: Installing ada-mode 6.2.1 on Debian Buster
Date: Mon, 18 Nov 2019 10:01:51 +0100
Date: 2019-11-18T10:01:51+01:00	[thread overview]
Message-ID: <qqtmlv$8lm$1@gioia.aioe.org> (raw)
In-Reply-To: bc2bd8e3-33be-4f55-8f2c-c4c535ff43b3@googlegroups.com

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


  parent reply	other threads:[~2019-11-18  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-12-15 17:38 ` Azathoth Hastur
2019-12-15 18:31   ` Simon Wright
2019-12-15 19:05   ` Dennis Lee Bieber
replies disabled

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