alire icon indicating copy to clipboard operation
alire copied to clipboard

Problem running Alire under Windows: raised ADA.ASSERTIONS.ASSERTION_ERROR : Path is not absolute: C:

Open rveenker opened this issue 6 months ago • 13 comments

On My PC I tried to build Alire from the github repository and am experiencing issues when running the executable.

Here is a log of what I did. Note that the currently installed Alire is alr-2.0.1-bin-x86_64-windows.zip, which works fine.

To reproduce, I built Alire from scratch (Commit: d296745691926f3c32217b59f93236281593132b):

================================================================================ D:\repos>git clone --recurse-submodules https://github.com/alire-project/alire.git Cloning into 'alire'...

D:\repos>cd alire

D:\repos\alire>alr toolchain --select Welcome to the toolchain selection assistant

In this assistant you can set up the default toolchain to be used with any crate that does not specify its own top-level dependency on a version of gnat or gprbuild.

If you choose "None", Alire will use whatever version is found in the environment.

Note: Currently configured: gnat_native=14.2.1

Please select the gnat version for use with this configuration

  1. gnat_native=14.2.1
  2. None
  3. gnat_external=2021.0.0 [Detected at d:\GNAT\2021\bin\gnat.exe]
  4. gnat_arm_elf=14.2.1
  5. gnat_avr_elf=14.2.1
  6. gnat_riscv64_elf=14.2.1
  7. gnat_xtensa_esp32_elf=14.2.1
  8. gnat_arm_elf=14.1.3
  9. gnat_avr_elf=14.1.3
  10. gnat_native=14.1.3 a. (See more choices...) Enter your choice index (first is default):

1 Note: Selected tool version gnat_native=14.2.1

Note: Choices for the following tool are narrowed down to releases compatible with just selected gnat_native=14.2.1

Note: Currently configured: gprbuild=22.0.1

Please select the gprbuild version for use with this configuration

  1. gprbuild=22.0.1
  2. None
  3. gprbuild=21.0.2
  4. gprbuild=21.0.1 Enter your choice index (first is default):

1 Note: Selected tool version gprbuild=22.0.1

D:\repos\alire>set ALIRE_OS=windows

D:\repos\alire>gprbuild -j0 -p -P alr_env

================================================================================

When I go to a crate that worked fine before, I now get an exception:

================================================================================

D:\alire\crates\cuda\cuda64>\repos\alire\bin\alr -d printenv stderr: ADA.ASSERTIONS.ASSERTION_ERROR stderr: Path is not absolute: C: stderr: raised ADA.ASSERTIONS.ASSERTION_ERROR : Path is not absolute: C: [D:\repos\alire\bin\alr.exe] 0xf86092 Semantic_Versioning.Basic.At_Least at alire.ads:352 0xb6bd23 Semantic_Versioning.Basic.At_Least at alire-platforms-current__windows.adb:91 0x83d1fb Semantic_Versioning.Basic.At_Least at alire-environment-formatting.adb:34 0x841863 Semantic_Versioning.Basic.At_Least at alire-environment-loading.adb:127 0x83fa5a Semantic_Versioning.Basic.At_Least at alire-environment-loading.adb:82 0xd4e369 Semantic_Versioning.Basic.At_Least at alire-roots.adb:300 0x4ad526 Semantic_Versioning.Basic.At_Least at alr-commands-printenv.adb:42 0x535dd7 Semantic_Versioning.Basic.At_Least at clic-subcommand-instance.adb:749 0x54384d Semantic_Versioning.Basic.At_Least at alr-commands.adb:562 0x4017b3 Alr.Main at alr-main.adb:13 0x4054ac Main at b__alr-main.adb:2427 0x401423 __tmainCRTStartup at ??? 0x40113b mainCRTStartup at ??? [C:\WINDOWS\System32\KERNEL32.DLL] 0x7ffe9e9e257b [C:\WINDOWS\SYSTEM32\ntdll.dll] 0x7ffe9f8caf26

ERROR: Path is not absolute: C: ERROR: alr encountered an unexpected error, re-run with -d for details. ERROR: error location: 0xf86092 Semantic_Versioning.Basic.At_Least at alire.ads:352

================================================================================

Running the 'old' Alire 2.0.1 I get:

================================================================================

D:\alire\crates\cuda\cuda64>alr -d printenv export ALIRE="True" export CUDA64_ALIRE_PREFIX="D:\alire\crates\cuda\cuda64" export GNAT_NATIVE_ALIRE_PREFIX="C:\Users\veenk\AppData\Local\alire\cache\toolchains\gnat_native_14.2.1_2540cccb" export GPRBUILD_ALIRE_PREFIX="C:\Users\veenk\AppData\Local\alire\cache\toolchains\gprbuild_22.0.1_c842bbc5" export GPR_PROJECT_PATH= (no issues)

================================================================================

The Alire settings are:

================================================================================ D:\alire\crates\cuda\cuda64>alr settings --global last_build_profile=cuda64=DEVELOPMENT toolchain.external.gprbuild=false msys2.do_not_install=true editor.cmd=gnatstudio -P ${GPR_FILE} index.last_update=226394249 toolchain.assistant=false index.auto_update_asked=true toolchain.use.gnat=gnat_native=14.2.1 toolchain.use.gprbuild=gprbuild=22.0.1 toolchain.external.gnat=false

================================================================================

For this crate the alire.toml is:

================================================================================ name = "cuda64" version = "10.2.0" description = "CUDA runtime libraries" long-description = """ This crate contains NVidia CUDA support libraries." """ authors = "[email protected]" maintainers = ["[email protected]"] maintainers-logins = ["rveenker",]

project-files = []

rveenker avatar Aug 25 '24 06:08 rveenker