Subject: bug#66017: Cannot install Ada mode

From: Stephen Leake <[email-masked]>
Date: Fri, 22 Sep 2023 07:29:20 -0700

Left Right <[email-masked]> writes:

> Hello Stephen, you wrote:
>
>> This indicates you are using a compiler external to Alire, with a newer version
>> than the internal one; I only test with Alire internal compilers, for
>> consistency.
>
>> Please configure the internal Alire compiler.
>
>> I will add the tested Alire version to the documentation.
>
> I don't know what to do with Alire, but I will try to figure out. 

Run "alr toolchain", select the internal Ada compiler.

> But please consider that anyone trying to install Ada on Linux will
> firstly try to go through the process recommended by the distro
> maintainers. 

Alire is supposed to replace that process, but it's not quite there yet.

> In my case, it's a combination of using pacman to install gcc-ada and
> AUR (auxiliary packages not directly maintained by Arch distribution)
> to install gprbuild, adaxml, alire etc. All I've done so far to
> install Ada was to install packages from these sources.
> (Unfortunately, both documentation and execution here are lacking, and
> the process is quite complicated and error-prone).

Apparently this ended up with Alire being configured for the external
distro Ada compiler, rather than the internal one. That should not
happen by default; perhaps you ran "alr toolchain" at some point?

> It seems like you want me to install what gcc-ada would install, but
> through Alire. 

No, just use the default compiler provided by the default Alire installation.

> Am I right? In other words, something that isn't provided and managed
> by the Linux distribution I'm using. This seems like a process that
> requires a lot more expertise from an average user (building any GCC
> compiler is not an easy task). Why is this the prefered choice of
> environment?

It is supposed to require less expertise. Unfortunately, when it fails, it
is confusing and hard to diagnose.

Part of the reason to start using Alire is to avoid version conflicts
like this! Apparently that doesn't really work. Sigh.

> As for the documentation: it seems we are reading two different
> documentations. Is the one you are referring to available online?
>
> I was reading this:
>
https://www.gnu.org/software/emacs/manual/html_mono/ada-mode.html#Installation

Sigh. That document is dated 2019 (see the Top node). The upstream
source has been updated since then.

> This documentation has no mention of how to build Ada mode, nor
> anything about how Ada compiler and toolchain are meant to be set up
> etc.

The current version refers to ELPA.

-- 
-- Stephe