* bug#66017: Cannot install Ada mode @ 2023-09-15 20:12 Left Right 2023-09-15 20:37 ` Gerd Möllmann 2023-09-15 20:52 ` Left Right 0 siblings, 2 replies; 16+ messages in thread From: Left Right @ 2023-09-15 20:12 UTC (permalink / raw) To: 66017 Hello. I'm trying to install Ada mode in Emacs 29.1 on Manjaro. This is my experience so far: ❯ cd ~/.emacs.d/elpa/ada-mode-8.0.5 ❯ ./build.sh alr is /usr/local/bin/alr building ada-mode executables via Alire error: Crate [emacs_ada_mode~8.0.5] does not exist in the catalog. ./build.sh: line 16: cd: emacs_ada_mode_*: No such file or directory error: Cannot continue with invalid session: error: Could not detect a session folder at current or parent locations When I try searching for this crate: ❯ alr index --update-all Already up to date. ❯ alr search emacs No hits Also, documentation mentions that Ada mode is supposed to be built-in, but unless I install this package from ELPA, there's no Ada mode in my Emacs installation. I found this page: https://alire.ada.dev/crates/emacs_ada_mode.html which seems to imply that the crate exists, but I don't understand why alr isn't finding it. (I'm very new to Ada). Any help would be very welcome. Best. Oleg ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-15 20:12 bug#66017: Cannot install Ada mode Left Right @ 2023-09-15 20:37 ` Gerd Möllmann 2023-09-15 20:39 ` Gerd Möllmann 2023-09-19 19:56 ` Left Right 2023-09-15 20:52 ` Left Right 1 sibling, 2 replies; 16+ messages in thread From: Gerd Möllmann @ 2023-09-15 20:37 UTC (permalink / raw) To: Left Right; +Cc: Stephen Leake, 66017 Left Right <olegsivokon@gmail.com> writes: > Hello. > > I'm trying to install Ada mode in Emacs 29.1 on Manjaro. > > This is my experience so far: > > ❯ cd ~/.emacs.d/elpa/ada-mode-8.0.5 > ❯ ./build.sh > alr is /usr/local/bin/alr > building ada-mode executables via Alire > error: Crate [emacs_ada_mode~8.0.5] does not exist in the catalog. > ./build.sh: line 16: cd: emacs_ada_mode_*: No such file or directory > error: Cannot continue with invalid session: > error: Could not detect a session folder at current or parent locations > > When I try searching for this crate: > > ❯ alr index --update-all > Already up to date. > ❯ alr search emacs > No hits > > Also, documentation mentions that Ada mode is supposed to be built-in, > but unless I install this package from ELPA, there's no Ada mode in my > Emacs installation. > > I found this page: https://alire.ada.dev/crates/emacs_ada_mode.html > which seems to imply that the crate exists, but I don't understand why > alr isn't finding it. (I'm very new to Ada). > > Any help would be very welcome. > > Best. > > Oleg Stephen Leake (in is the maintainer of ada-mode, ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-15 20:37 ` Gerd Möllmann @ 2023-09-15 20:39 ` Gerd Möllmann 2023-09-18 16:53 ` Stephen Leake 2023-09-19 19:56 ` Left Right 1 sibling, 1 reply; 16+ messages in thread From: Gerd Möllmann @ 2023-09-15 20:39 UTC (permalink / raw) To: Left Right; +Cc: Stephen Leake, 66017 Gerd Möllmann <gerd.moellmann@gmail.com> writes: > Stephen Leake (in is the maintainer of ada-mode, That went somehow wrong :-(. Stephen is the emaintainer of ada-mode. Maybe he can help you. ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-15 20:39 ` Gerd Möllmann @ 2023-09-18 16:53 ` Stephen Leake 2023-09-19 23:14 ` Richard Stallman 0 siblings, 1 reply; 16+ messages in thread From: Stephen Leake @ 2023-09-18 16:53 UTC (permalink / raw) To: 66017 Gerd Möllmann <gerd.moellmann@gmail.com> writes: > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > modified, could be declared constant [-gnatwk] 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. Earlier, you said: > Also, documentation mentions that Ada mode is supposed to be built-in, What documentation says that? -- -- Stephe ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-18 16:53 ` Stephen Leake @ 2023-09-19 23:14 ` Richard Stallman 2023-09-22 14:18 ` Stephen Leake 0 siblings, 1 reply; 16+ messages in thread From: Richard Stallman @ 2023-09-19 23:14 UTC (permalink / raw) To: Stephen Leake; +Cc: 66017 [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] What is Alire? Is it a competitor to GNU Ada? Is it free software? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-19 23:14 ` Richard Stallman @ 2023-09-22 14:18 ` Stephen Leake 0 siblings, 0 replies; 16+ messages in thread From: Stephen Leake @ 2023-09-22 14:18 UTC (permalink / raw) To: Richard Stallman; +Cc: 66017 Richard Stallman <rms@gnu.org> writes: > [[[ To any NSA and FBI agents reading my email: please consider ]]] > [[[ whether defending the US Constitution against all enemies, ]]] > [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > What is Alire? Is it a competitor to GNU Ada? Is it free software? https://alire.ada.dev/ It is a package manager for Ada; similar to package managers for Java and other languages. It packages GNU Ada. It is free software. -- -- Stephe ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-15 20:37 ` Gerd Möllmann 2023-09-15 20:39 ` Gerd Möllmann @ 2023-09-19 19:56 ` Left Right 2023-09-22 14:29 ` Stephen Leake 1 sibling, 1 reply; 16+ messages in thread From: Left Right @ 2023-09-19 19:56 UTC (permalink / raw) To: 66017; +Cc: Stephen Leake 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. But please consider that anyone trying to install Ada on Linux will firstly try to go through the process recommended by the distro maintainers. 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). It seems like you want me to install what gcc-ada would install, but through Alire. 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? 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 specifically: "Ada mode is part of the standard Emacs distribution; if you use that, no files need to be installed." 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. Thank you. Oleg On Fri, Sep 15, 2023 at 10:37 PM Gerd Möllmann <gerd.moellmann@gmail.com> wrote: > > Left Right <olegsivokon@gmail.com> writes: > > > Hello. > > > > I'm trying to install Ada mode in Emacs 29.1 on Manjaro. > > > > This is my experience so far: > > > > ❯ cd ~/.emacs.d/elpa/ada-mode-8.0.5 > > ❯ ./build.sh > > alr is /usr/local/bin/alr > > building ada-mode executables via Alire > > error: Crate [emacs_ada_mode~8.0.5] does not exist in the catalog. > > ./build.sh: line 16: cd: emacs_ada_mode_*: No such file or directory > > error: Cannot continue with invalid session: > > error: Could not detect a session folder at current or parent locations > > > > When I try searching for this crate: > > > > ❯ alr index --update-all > > Already up to date. > > ❯ alr search emacs > > No hits > > > > Also, documentation mentions that Ada mode is supposed to be built-in, > > but unless I install this package from ELPA, there's no Ada mode in my > > Emacs installation. > > > > I found this page: https://alire.ada.dev/crates/emacs_ada_mode.html > > which seems to imply that the crate exists, but I don't understand why > > alr isn't finding it. (I'm very new to Ada). > > > > Any help would be very welcome. > > > > Best. > > > > Oleg > > Stephen Leake (in is the maintainer of ada-mode, ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-19 19:56 ` Left Right @ 2023-09-22 14:29 ` Stephen Leake 2023-09-23 11:26 ` Stefan Kangas 2023-09-23 16:28 ` Left Right 0 siblings, 2 replies; 16+ messages in thread From: Stephen Leake @ 2023-09-22 14:29 UTC (permalink / raw) To: Left Right; +Cc: 66017 Left Right <olegsivokon@gmail.com> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-22 14:29 ` Stephen Leake @ 2023-09-23 11:26 ` Stefan Kangas 2023-09-23 16:03 ` Left Right 2023-09-23 16:28 ` Left Right 1 sibling, 1 reply; 16+ messages in thread From: Stefan Kangas @ 2023-09-23 11:26 UTC (permalink / raw) To: Stephen Leake, Left Right; +Cc: 66017 Stephen Leake <stephen_leake@stephe-leake.org> writes: >> 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. Should we add a 308 Permanent Redirect from that page to here, perhaps? https://elpa.gnu.org/packages/doc/ada-mode.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-23 11:26 ` Stefan Kangas @ 2023-09-23 16:03 ` Left Right 0 siblings, 0 replies; 16+ messages in thread From: Left Right @ 2023-09-23 16:03 UTC (permalink / raw) To: Stefan Kangas; +Cc: Stephen Leake, 66017 > Should we add a 308 Permanent Redirect from that page to here, perhaps? If one could dream, a label somewhere which displays the version of Emacs this documentation is for would've been great. On Sat, Sep 23, 2023 at 1:26 PM Stefan Kangas <stefankangas@gmail.com> wrote: > > Stephen Leake <stephen_leake@stephe-leake.org> writes: > > >> 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. > > Should we add a 308 Permanent Redirect from that page to here, perhaps? > > https://elpa.gnu.org/packages/doc/ada-mode.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-22 14:29 ` Stephen Leake 2023-09-23 11:26 ` Stefan Kangas @ 2023-09-23 16:28 ` Left Right 2023-09-23 18:55 ` Left Right 2023-09-28 17:25 ` Stephen Leake 1 sibling, 2 replies; 16+ messages in thread From: Left Right @ 2023-09-23 16:28 UTC (permalink / raw) To: Stephen Leake; +Cc: 66017 > Run "alr toolchain", select the internal Ada compiler. Only the external compiler had ever been installed. If I run (I never ran this before): ❯ alr toolchain CRATE VERSION STATUS NOTES gnat_external 13.2.1 Default Detected at /usr/bin/gnat This is what I get. Here's what I did afterwards: 1. Installed "gnat_native". 2. Ran `alr toolchain --select` and interactively selected a version of "gnat_native" and "gprbuild" so that it looks like this: ❯ alr toolchain CRATE VERSION STATUS NOTES gprbuild 22.0.1 Default gnat_native 13.1.0 Default gnat_external 13.2.1 Available Detected at /usr/bin/gnat Afterwards, I re-ran build.sh, and I get the same (?) error: wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not modified, could be declared constant [-gnatwk] gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" is not referenced [-gnatwu] compilation of wisitoken-followed_by.adb failed gprbuild: *** compilation phase failed error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr"] exited with code 4 error: Compilation failed. And if I re-run the failed command: ❯ gprbuild -s "-j0" "-p" "-P" "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" wisitoken_alire.gpr:8:06: imported project file "standard_common_alire" not found wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:28:43: wrong expression kind for attribute "default_switches" wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:31:43: wrong expression kind for attribute "default_switches" wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" wisitoken_config.gpr:3:06: imported project file "stephes_ada_library.gpr" not found wisitoken_config.gpr:3:06: imported by "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/config/wisitoken_config.gpr" wisitoken_config.gpr:3:06: imported by "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" gprbuild: "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" processing failed But when I run: ❯ gprbuild --version GPRBUILD Pro 24.0w (20230430) (x86_64-pc-linux-gnu) Copyright (C) 2004-2023, AdaCore This is free software; see the source for copying conditions. See your AdaCore support agreement for details of warranty and support. If you do not have a current support agreement, then there is absolutely no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. So, it looks like maybe the version I selected through Alire is ignored? Should I perhaps uninstall distribution-installed Ada-related packages and re-try with only Alire-installed ones? Thanks! Oleg On Fri, Sep 22, 2023 at 4:29 PM Stephen Leake <stephen_leake@stephe-leake.org> wrote: > > Left Right <olegsivokon@gmail.com> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-23 16:28 ` Left Right @ 2023-09-23 18:55 ` Left Right 2023-09-23 19:04 ` Left Right 2023-09-28 17:25 ` Stephen Leake 1 sibling, 1 reply; 16+ messages in thread From: Left Right @ 2023-09-23 18:55 UTC (permalink / raw) To: Stephen Leake; +Cc: 66017 I tried to uninstall every other Ada-related package I installed from my distro packages, including Alire. Downloaded Alire binary afresh and used it to install the toolchain. So, I don't think that when I try to run gprbuild command I get the same output Alire gets when it runs it. It must be running it in some other environment. The thing is: I don't have *any* globally available gprbuild now. But the command Alire runs somehow exits with code 4, whereas if it couldn't find the command, it would have to exit with code 1. It fails for some other reason, but I cannot find a way to make the build more verbose so that it would print the stderr / stdout of the failing command. On Sat, Sep 23, 2023 at 6:28 PM Left Right <olegsivokon@gmail.com> wrote: > > > Run "alr toolchain", select the internal Ada compiler. > > Only the external compiler had ever been installed. If I run (I never > ran this before): > > ❯ alr toolchain > CRATE VERSION STATUS NOTES > gnat_external 13.2.1 Default Detected at /usr/bin/gnat > > This is what I get. > > Here's what I did afterwards: > > 1. Installed "gnat_native". > 2. Ran `alr toolchain --select` and interactively selected a version > of "gnat_native" and "gprbuild" so that it looks like this: > > ❯ alr toolchain > CRATE VERSION STATUS NOTES > gprbuild 22.0.1 Default > gnat_native 13.1.0 Default > gnat_external 13.2.1 Available Detected at /usr/bin/gnat > > Afterwards, I re-ran build.sh, and I get the same (?) error: > > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > modified, could be declared constant [-gnatwk] > gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" > is not referenced [-gnatwu] > > compilation of wisitoken-followed_by.adb failed > > gprbuild: *** compilation phase failed > error: Command ["gprbuild", "-s", "-j0", "-p", "-P", > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr"] > exited with code 4 > error: Compilation failed. > > And if I re-run the failed command: > > ❯ gprbuild -s "-j0" "-p" "-P" > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > wisitoken_alire.gpr:8:06: imported project file > "standard_common_alire" not found > wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:28:43: wrong expression kind for attribute > "default_switches" > wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:31:43: wrong expression kind for attribute > "default_switches" > wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" > wisitoken_config.gpr:3:06: imported project file > "stephes_ada_library.gpr" not found > wisitoken_config.gpr:3:06: imported by > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/config/wisitoken_config.gpr" > wisitoken_config.gpr:3:06: imported by > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > gprbuild: "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > processing failed > > But when I run: > > ❯ gprbuild --version > GPRBUILD Pro 24.0w (20230430) (x86_64-pc-linux-gnu) > Copyright (C) 2004-2023, AdaCore > This is free software; see the source for copying conditions. > See your AdaCore support agreement for details of warranty and support. > If you do not have a current support agreement, then there is absolutely > no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > So, it looks like maybe the version I selected through Alire is ignored? > > Should I perhaps uninstall distribution-installed Ada-related packages > and re-try with only Alire-installed ones? > > Thanks! > > Oleg > > On Fri, Sep 22, 2023 at 4:29 PM Stephen Leake > <stephen_leake@stephe-leake.org> wrote: > > > > Left Right <olegsivokon@gmail.com> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-23 18:55 ` Left Right @ 2023-09-23 19:04 ` Left Right 2023-09-24 17:22 ` Left Right 0 siblings, 1 reply; 16+ messages in thread From: Left Right @ 2023-09-23 19:04 UTC (permalink / raw) To: Stephen Leake; +Cc: 66017 Sorry for making too much noise. Here's what I tried: ❯ alr printenv > alrenv ❯ . ./alrenv ❯ gprbuild -s "-j0" "-p" "-P" "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/depe ndencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" gnatcoll.gpr:254:07: warning: value "windows" is not used as label Compile [Ada] wisitoken-followed_by.adb [Ada] wisitoken_grammar_runtime.adb wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not modified, could be declared constant [-gnatwk] wisitoken_grammar_runtime.adb:197:13: warning: unreachable code [enabled by default] compilation of wisitoken_grammar_runtime.adb failed compilation of wisitoken-followed_by.adb failed gprbuild: *** compilation phase failed This seems to be the actual error. On Sat, Sep 23, 2023 at 8:55 PM Left Right <olegsivokon@gmail.com> wrote: > > I tried to uninstall every other Ada-related package I installed from > my distro packages, including Alire. Downloaded Alire binary afresh > and used it to install the toolchain. > > So, I don't think that when I try to run gprbuild command I get the > same output Alire gets when it runs it. It must be running it in some > other environment. The thing is: I don't have *any* globally available > gprbuild now. But the command Alire runs somehow exits with code 4, > whereas if it couldn't find the command, it would have to exit with > code 1. It fails for some other reason, but I cannot find a way to > make the build more verbose so that it would print the stderr / stdout > of the failing command. > > On Sat, Sep 23, 2023 at 6:28 PM Left Right <olegsivokon@gmail.com> wrote: > > > > > Run "alr toolchain", select the internal Ada compiler. > > > > Only the external compiler had ever been installed. If I run (I never > > ran this before): > > > > ❯ alr toolchain > > CRATE VERSION STATUS NOTES > > gnat_external 13.2.1 Default Detected at /usr/bin/gnat > > > > This is what I get. > > > > Here's what I did afterwards: > > > > 1. Installed "gnat_native". > > 2. Ran `alr toolchain --select` and interactively selected a version > > of "gnat_native" and "gprbuild" so that it looks like this: > > > > ❯ alr toolchain > > CRATE VERSION STATUS NOTES > > gprbuild 22.0.1 Default > > gnat_native 13.1.0 Default > > gnat_external 13.2.1 Available Detected at /usr/bin/gnat > > > > Afterwards, I re-ran build.sh, and I get the same (?) error: > > > > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > > modified, could be declared constant [-gnatwk] > > gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" > > is not referenced [-gnatwu] > > > > compilation of wisitoken-followed_by.adb failed > > > > gprbuild: *** compilation phase failed > > error: Command ["gprbuild", "-s", "-j0", "-p", "-P", > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr"] > > exited with code 4 > > error: Compilation failed. > > > > And if I re-run the failed command: > > > > ❯ gprbuild -s "-j0" "-p" "-P" > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > wisitoken_alire.gpr:8:06: imported project file > > "standard_common_alire" not found > > wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" > > wisitoken_alire.gpr:28:43: wrong expression kind for attribute > > "default_switches" > > wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" > > wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" > > wisitoken_alire.gpr:31:43: wrong expression kind for attribute > > "default_switches" > > wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" > > wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" > > wisitoken_config.gpr:3:06: imported project file > > "stephes_ada_library.gpr" not found > > wisitoken_config.gpr:3:06: imported by > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/config/wisitoken_config.gpr" > > wisitoken_config.gpr:3:06: imported by > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > gprbuild: "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > processing failed > > > > But when I run: > > > > ❯ gprbuild --version > > GPRBUILD Pro 24.0w (20230430) (x86_64-pc-linux-gnu) > > Copyright (C) 2004-2023, AdaCore > > This is free software; see the source for copying conditions. > > See your AdaCore support agreement for details of warranty and support. > > If you do not have a current support agreement, then there is absolutely > > no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > PURPOSE. > > > > So, it looks like maybe the version I selected through Alire is ignored? > > > > Should I perhaps uninstall distribution-installed Ada-related packages > > and re-try with only Alire-installed ones? > > > > Thanks! > > > > Oleg > > > > On Fri, Sep 22, 2023 at 4:29 PM Stephen Leake > > <stephen_leake@stephe-leake.org> wrote: > > > > > > Left Right <olegsivokon@gmail.com> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-23 19:04 ` Left Right @ 2023-09-24 17:22 ` Left Right 0 siblings, 0 replies; 16+ messages in thread From: Left Right @ 2023-09-24 17:22 UTC (permalink / raw) To: Stephen Leake; +Cc: 66017 Oh, and, finally, I realized that warnings here must've been interpreted as errors. Whoa. So, what I tried to do is to blindly follow what the warnings said. In wisitoken-followed_by.adb I changed Generate_Data : aliased WisiToken.BNF.Generate_Utils.Generate_Data := to Generate_Data : constant WisiToken.BNF.Generate_Utils.Generate_Data := and in wisitoken_grammar_runtime.adb: WisiToken.Syntax_Trees.LR_Utils.Raise_Programmer_Error ("Get_RHS: " & Exception_Name (E) & ": " & Exception_Message (E), Tree, Token); -- WORKAROUND; GNAT pro_22.0w-20201222 ignores 'pragma no_return' on Raise_Programmer_Error raise; to WisiToken.Syntax_Trees.LR_Utils.Raise_Programmer_Error ("Get_RHS: " & Exception_Name (E) & ": " & Exception_Message (E), Tree, Token); -- WORKAROUND; GNAT pro_22.0w-20201222 ignores 'pragma no_return' on Raise_Programmer_Error pragma Warnings (off, "unreachable code"); raise; pragma Warnings (on, "unreachable code"); I don't know if there are any negative consequences to what I've done, but at least this allowed me to run both build.sh and install.sh. On Sat, Sep 23, 2023 at 9:04 PM Left Right <olegsivokon@gmail.com> wrote: > > Sorry for making too much noise. Here's what I tried: > > ❯ alr printenv > alrenv > ❯ . ./alrenv > ❯ gprbuild -s "-j0" "-p" "-P" > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/depe > ndencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > gnatcoll.gpr:254:07: warning: value "windows" is not used as label > Compile > [Ada] wisitoken-followed_by.adb > [Ada] wisitoken_grammar_runtime.adb > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > modified, could be declared constant [-gnatwk] > wisitoken_grammar_runtime.adb:197:13: warning: unreachable code > [enabled by default] > > compilation of wisitoken_grammar_runtime.adb failed > compilation of wisitoken-followed_by.adb failed > > gprbuild: *** compilation phase failed > > This seems to be the actual error. > > On Sat, Sep 23, 2023 at 8:55 PM Left Right <olegsivokon@gmail.com> wrote: > > > > I tried to uninstall every other Ada-related package I installed from > > my distro packages, including Alire. Downloaded Alire binary afresh > > and used it to install the toolchain. > > > > So, I don't think that when I try to run gprbuild command I get the > > same output Alire gets when it runs it. It must be running it in some > > other environment. The thing is: I don't have *any* globally available > > gprbuild now. But the command Alire runs somehow exits with code 4, > > whereas if it couldn't find the command, it would have to exit with > > code 1. It fails for some other reason, but I cannot find a way to > > make the build more verbose so that it would print the stderr / stdout > > of the failing command. > > > > On Sat, Sep 23, 2023 at 6:28 PM Left Right <olegsivokon@gmail.com> wrote: > > > > > > > Run "alr toolchain", select the internal Ada compiler. > > > > > > Only the external compiler had ever been installed. If I run (I never > > > ran this before): > > > > > > ❯ alr toolchain > > > CRATE VERSION STATUS NOTES > > > gnat_external 13.2.1 Default Detected at /usr/bin/gnat > > > > > > This is what I get. > > > > > > Here's what I did afterwards: > > > > > > 1. Installed "gnat_native". > > > 2. Ran `alr toolchain --select` and interactively selected a version > > > of "gnat_native" and "gprbuild" so that it looks like this: > > > > > > ❯ alr toolchain > > > CRATE VERSION STATUS NOTES > > > gprbuild 22.0.1 Default > > > gnat_native 13.1.0 Default > > > gnat_external 13.2.1 Available Detected at /usr/bin/gnat > > > > > > Afterwards, I re-ran build.sh, and I get the same (?) error: > > > > > > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > > > modified, could be declared constant [-gnatwk] > > > gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" > > > is not referenced [-gnatwu] > > > > > > compilation of wisitoken-followed_by.adb failed > > > > > > gprbuild: *** compilation phase failed > > > error: Command ["gprbuild", "-s", "-j0", "-p", "-P", > > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr"] > > > exited with code 4 > > > error: Compilation failed. > > > > > > And if I re-run the failed command: > > > > > > ❯ gprbuild -s "-j0" "-p" "-P" > > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > > wisitoken_alire.gpr:8:06: imported project file > > > "standard_common_alire" not found > > > wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" > > > wisitoken_alire.gpr:28:43: wrong expression kind for attribute > > > "default_switches" > > > wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" > > > wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" > > > wisitoken_alire.gpr:31:43: wrong expression kind for attribute > > > "default_switches" > > > wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" > > > wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" > > > wisitoken_config.gpr:3:06: imported project file > > > "stephes_ada_library.gpr" not found > > > wisitoken_config.gpr:3:06: imported by > > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/config/wisitoken_config.gpr" > > > wisitoken_config.gpr:3:06: imported by > > > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > > gprbuild: "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > > > processing failed > > > > > > But when I run: > > > > > > ❯ gprbuild --version > > > GPRBUILD Pro 24.0w (20230430) (x86_64-pc-linux-gnu) > > > Copyright (C) 2004-2023, AdaCore > > > This is free software; see the source for copying conditions. > > > See your AdaCore support agreement for details of warranty and support. > > > If you do not have a current support agreement, then there is absolutely > > > no warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > > > PURPOSE. > > > > > > So, it looks like maybe the version I selected through Alire is ignored? > > > > > > Should I perhaps uninstall distribution-installed Ada-related packages > > > and re-try with only Alire-installed ones? > > > > > > Thanks! > > > > > > Oleg > > > > > > On Fri, Sep 22, 2023 at 4:29 PM Stephen Leake > > > <stephen_leake@stephe-leake.org> wrote: > > > > > > > > Left Right <olegsivokon@gmail.com> 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 ^ permalink raw reply [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-23 16:28 ` Left Right 2023-09-23 18:55 ` Left Right @ 2023-09-28 17:25 ` Stephen Leake 1 sibling, 0 replies; 16+ messages in thread From: Stephen Leake @ 2023-09-28 17:25 UTC (permalink / raw) To: Left Right; +Cc: 66017 Left Right <olegsivokon@gmail.com> writes: >> Run "alr toolchain", select the internal Ada compiler. > > Only the external compiler had ever been installed. If I run (I never > ran this before): > > ❯ alr toolchain > CRATE VERSION STATUS NOTES > gnat_external 13.2.1 Default Detected at /usr/bin/gnat > > This is what I get. > > Here's what I did afterwards: > > 1. Installed "gnat_native". > 2. Ran `alr toolchain --select` and interactively selected a version > of "gnat_native" and "gprbuild" so that it looks like this: > > ❯ alr toolchain > CRATE VERSION STATUS NOTES > gprbuild 22.0.1 Default > gnat_native 13.1.0 Default > gnat_external 13.2.1 Available Detected at /usr/bin/gnat Ok. Apparently the version of gnat in alr has been updated since my last release. I've updated my Alire index, and have now reproduced this error. If the --select list has gnat 12, selecting that would be the simplest workaround. You can change it back to external or internal 13 after finishing ada-mode install. > Afterwards, I re-ran build.sh, and I get the same (?) error: > > wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not > modified, could be declared constant [-gnatwk] > gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" > is not referenced [-gnatwu] As Simon pointed out, if the compilation options allowed ignoring warnings, this would not be a problem. I'll do that in the next release. One workaround is to edit the release options in your alire workspace for ada-mode: edit ~/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/stephes_ada_library_3.7.2_2b6a88f9/build/standard_common_alire.gpr (note that is a _very_ long file name!) delete "e" from Common_Switches; it's currently in "-gnatwaBCeJL". Full patch for that file attached below. rerun build.sh That worked for me. Another workaround is to edit the code to eliminate the warning; see the patches below. This will be in the next release. > And if I re-run the failed command: > > ❯ gprbuild -s "-j0" "-p" "-P" > "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" > wisitoken_alire.gpr:8:06: imported project file > "standard_common_alire" not found > wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:28:43: wrong expression kind for attribute > "default_switches" > wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:31:43: wrong expression kind for attribute > "default_switches" > wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" > wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" > wisitoken_config.gpr:3:06: imported project file > "stephes_ada_library.gpr" not found > So, it looks like maybe the version I selected through Alire is > ignored? This fails because it doesn't have the environment variables defined by alire to point to the toolchain and dependencies. You can use "alr exec" to try this, but I've not had much success with that. > Should I perhaps uninstall distribution-installed Ada-related packages > and re-try with only Alire-installed ones? No need to uninstall anything. -- -- Stephe diff --git a/build/standard_common_alire.gpr b/build/standard_common_alire.gpr index daf13a3e..c9b64f7c 100644 --- a/build/standard_common_alire.gpr +++ b/build/standard_common_alire.gpr @@ -7,7 +7,7 @@ -- [build-switches] in alire.toml. That is harder to maintain than -- this file. -- --- Copyright (C) 2018 - 2022 Free Software Foundation, Inc. +-- Copyright (C) 2018 - 2023 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or -- modify it under terms of the GNU General Public License as @@ -48,11 +48,11 @@ project Standard_Common_Alire is "-g", "-gnatfqQ", -- f = all error messages, qQ = process semantics, generate .ali if syntax errors "-gnatw.d", -- warnings about tags - "-gnatwaBCeJL" + "-gnatwaBCJL" -- wa = most warnings -- wB = no warn on bad fixed values -- wC = no warn on conditionals - -- we = error on warning + -- we = error on warning; only in debug, so released code still compiles with newer gnat -- wJ = no warn on obsolescent (including () for array indices!) -- wL = no warn on elaboration ); @@ -64,7 +64,7 @@ project Standard_Common_Alire is "-O0", -- we don't use -Og because that causes gdb to report incorrect results in some cases in Ada. "-gnatVa", -- validity checks "-gnateE", -- extra info in exceptions - "-gnatwP", -- no warn on Inline + "-gnatweP", -- error on warn, no warn on Inline "-gnata" -- assertions, pre/post-conditions ); diff --git a/wisitoken-followed_by.adb b/wisitoken-followed_by.adb index 04c9aed5..098b262f 100644 --- a/wisitoken-followed_by.adb +++ b/wisitoken-followed_by.adb @@ -30,7 +30,7 @@ -- expand : C2: simple_expression : 'new' subtype_indication + primary ; -- that's the derivation we are looking for. --- Copyright (C) 2020, 2022 Stephen Leake All Rights Reserved. +-- Copyright (C) 2020, 2022, 2023 Stephen Leake All Rights Reserved. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free @@ -219,7 +219,7 @@ begin Input_Data : aliased WisiToken_Grammar_Runtime.User_Data_Type; Trace : WisiToken.Text_IO_Trace.Trace; - Generate_Data : aliased WisiToken.BNF.Generate_Utils.Generate_Data := + Generate_Data : aliased constant WisiToken.BNF.Generate_Utils.Generate_Data := WisiToken.BNF.Generate_Utils.Parse_Grammar_File (-Grammar_File_Name, Input_Data'Unchecked_Access, BNF.LALR, BNF.re2c_Lexer, Trace, Ignore_Conflicts => True); -- Builds Generate_Data.Descriptor, Generate_Data.Grammar diff --git a/wisitoken_grammar_runtime.adb b/wisitoken_grammar_runtime.adb index dc2f3a72..8972f29e 100644 --- a/wisitoken_grammar_runtime.adb +++ b/wisitoken_grammar_runtime.adb @@ -242,7 +242,12 @@ package body WisiToken_Grammar_Runtime is begin WisiToken.Syntax_Trees.LR_Utils.Raise_Programmer_Error ("Get_RHS: " & Exception_Name (E) & ": " & Exception_Message (E), Tree, Token); - raise; -- WORKAROUND; GNAT pro_22.0w-20201222 ignores 'pragma no_return' on Raise_Programmer_Error + + -- WORKAROUND; GNAT pro_22.0w-20201222 ignores 'pragma + -- no_return' on Raise_Programmer_Error; uncomment 'raise' for that + -- compiler. + -- + -- raise; end; end if; end Get_RHS; ^ permalink raw reply related [flat|nested] 16+ messages in thread
* bug#66017: Cannot install Ada mode 2023-09-15 20:12 bug#66017: Cannot install Ada mode Left Right 2023-09-15 20:37 ` Gerd Möllmann @ 2023-09-15 20:52 ` Left Right 1 sibling, 0 replies; 16+ messages in thread From: Left Right @ 2023-09-15 20:52 UTC (permalink / raw) To: 66017 Hi. I seem to have found the problem. I discovered I somehow had two different versions of Alire installed: 1.2.0 and 1.2.1. The older one was the one found when running build.sh. However, the Emacs Ada mode crate must've been added after 1.2.1 Alire index was created. I couldn't find a way to update Alire, and apparently, older Alire cannot use the newer index... but deleting the old version allowed me to make some progress. Now it fails like this: wisitoken-followed_by.adb:222:07: warning: "Generate_Data" is not modified, could be declared constant [-gnatwk] gnatcoll-projects.adb:38:09: warning: unit "Ada.Unchecked_Conversion" is not referenced [-gnatwu] compilation of wisitoken-followed_by.adb failed gprbuild: *** compilation phase failed error: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr"] exited with code 4 error: Compilation failed. I'd still appreciate your help dealing with this. Also, it would be nice if documentation mentioned the minimum required version of Alire. Trying to run the command that failed generates this: ❯ "gprbuild" "-s" "-j0" "-p" "-P" "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" wisitoken_alire.gpr:8:06: imported project file "standard_common_alire" not found wisitoken_alire.gpr:28:43: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:28:43: wrong expression kind for attribute "default_switches" wisitoken_alire.gpr:28:84: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:31:43: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:31:43: wrong expression kind for attribute "default_switches" wisitoken_alire.gpr:31:82: unknown package or project "Standard_Common_Alire" wisitoken_alire.gpr:35:41: unknown package or project "Standard_Common_Alire" wisitoken_config.gpr:3:06: imported project file "stephes_ada_library.gpr" not found wisitoken_config.gpr:3:06: imported by "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/config/wisitoken_config.gpr" wisitoken_config.gpr:3:06: imported by "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" gprbuild: "/home/olegs/.emacs.d/elpa/ada-mode-8.0.5/emacs_ada_mode_8.0.5_ecfdcfb4/alire/cache/dependencies/wisitoken_4.1.0_f9cd282e/build/wisitoken_alire.gpr" processing failed On Fri, Sep 15, 2023 at 10:12 PM Left Right <olegsivokon@gmail.com> wrote: > > Hello. > > I'm trying to install Ada mode in Emacs 29.1 on Manjaro. > > This is my experience so far: > > ❯ cd ~/.emacs.d/elpa/ada-mode-8.0.5 > ❯ ./build.sh > alr is /usr/local/bin/alr > building ada-mode executables via Alire > error: Crate [emacs_ada_mode~8.0.5] does not exist in the catalog. > ./build.sh: line 16: cd: emacs_ada_mode_*: No such file or directory > error: Cannot continue with invalid session: > error: Could not detect a session folder at current or parent locations > > When I try searching for this crate: > > ❯ alr index --update-all > Already up to date. > ❯ alr search emacs > No hits > > Also, documentation mentions that Ada mode is supposed to be built-in, > but unless I install this package from ELPA, there's no Ada mode in my > Emacs installation. > > I found this page: https://alire.ada.dev/crates/emacs_ada_mode.html > which seems to imply that the crate exists, but I don't understand why > alr isn't finding it. (I'm very new to Ada). > > Any help would be very welcome. > > Best. > > Oleg ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2023-09-28 17:25 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-09-15 20:12 bug#66017: Cannot install Ada mode Left Right 2023-09-15 20:37 ` Gerd Möllmann 2023-09-15 20:39 ` Gerd Möllmann 2023-09-18 16:53 ` Stephen Leake 2023-09-19 23:14 ` Richard Stallman 2023-09-22 14:18 ` Stephen Leake 2023-09-19 19:56 ` Left Right 2023-09-22 14:29 ` Stephen Leake 2023-09-23 11:26 ` Stefan Kangas 2023-09-23 16:03 ` Left Right 2023-09-23 16:28 ` Left Right 2023-09-23 18:55 ` Left Right 2023-09-23 19:04 ` Left Right 2023-09-24 17:22 ` Left Right 2023-09-28 17:25 ` Stephen Leake 2023-09-15 20:52 ` Left Right
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.