Skip to content

alr install gnatformat on Windows creates a non-executing binary #2056

@johnperry-math

Description

@johnperry-math

Checklist

  • I've searched for similar issues and found none.
  • I've included the output of alr version.
  • I've included complete steps to reproduce my issue.

Describe the bug
A fresh install of alire and then gnatformat on a Windows 10 system produces an executable, but the executable fails to do anything when run:

  • When I run the binary from the command line, it returns silently. It does not format files.
  • When run from File Explorer, it reports missing dll's; when the dll's are copied to a path, it runs longer, but still returns silently, without any errors.
  • When run from Msys, it segfaults.

I've tried building with gnat-native 15.2.1 and 14.2.1.

To Reproduce
Steps to reproduce the behavior:

  1. Fresh alire install on a previously Ada-free computer.
  2. Run alr install gnatformat.
  3. Add ~\.alire\bin to path (if it isn't already).
  4. Create a new binary crate. Edit a file with bad formatting.
  5. Run gnatformat.exe from the command line. See no output.
  6. Inspect source file. Observe no change in formatting.
  7. Run gnatformat.exe -P project.gpr from the command line. See no output.
  8. Inspect source file. Observe no change in formatting.

Expected Behavior
Repeat steps 1-5 (modulo different output when running a working gnatformat).
6. Inspect source file. Observe changed formatting.
7. Run gnatformat.exe -P project.gpr from the command line. See no output. (?)
8. Inspect source file. Observe changed formatting.

alr version

APPLICATION
alr version:               2.1.0
libalire version:          2.1.0
source commit:             2681b313d08224014fa3f5e4f76e9c75347213d2
source changes:            clean
compilation date:          2025-03-04 10:22:55
compiled with version:     14.2.0

CONFIGURATION
home folder:               C:\Users\john.perry
settings folder:           C:\Users\john.perry\AppData\Local\alire\settings
cache folder:              C:\Users\john.perry\AppData\Local\alire\cache
vault folder:              C:\Users\john.perry\AppData\Local\alire\cache\releases
build folder:              C:\Users\john.perry\AppData\Local\alire\cache\builds
temp folder:               C:\Users\JOHN~1.PER\AppData\Local\Temp
force flag:                FALSE
non-interactive flag:      FALSE
community index branch:    stable-1.4.0
compatible index versions: ^1.1 & <=1.4.0
indexes folder:            C:\Users\john.perry\AppData\Local\alire\settings\indexes
indexes metadata:          OK
index #1:                  (community) git+https://github.com/alire-project/alire-index#stable-1.4.0
toolchain folder:          C:\Users\john.perry\AppData\Local\alire\cache\toolchains
toolchain assistant:       disabled
tool #1 gnat:              gnat_native=15.2.1
tool #2 gprbuild:          gprbuild=25.0.1
system package manager:    C:\Users\john.perry\AppData\Local\alire\cache\msys64\usr\bin\pacman.exe
distro detection disabled: FALSE

WORKSPACE
root status:               VALID
root release:              parameters=0.1.0-dev
root load error:           none
root folder:               D:\Ada\Simulator_In_Ada\parameters
current folder:            D:\Ada\Simulator_In_Ada\parameters

SYSTEM
distribution:              MSYS2
host-arch:                 X86_64
os:                        WINDOWS
target:                    NATIVE
toolchain:                 USER
word-size:                 BITS_64

alr logs
I don't think this is pertinent, but correct me if I'm wrong.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions