Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If alr's host architecture changes, gnat_native toolchain breaks #1796

Open
2 tasks done
rongcuid opened this issue Nov 20, 2024 · 1 comment
Open
2 tasks done

If alr's host architecture changes, gnat_native toolchain breaks #1796

rongcuid opened this issue Nov 20, 2024 · 1 comment
Labels
type: bug Something isn't working
Milestone

Comments

@rongcuid
Copy link

Checklist

  • I've included the output of alr version.
  • I've included complete steps to reproduce my issue.

Describe the bug
Toolchain consistency breaks if alr's architecture changes.

To Reproduce
Steps to reproduce the behavior:

  1. On a Mac Apple Silicon machine
  2. Install alr x86-64 version
  3. alr toolchain --select and pick gnat_native
  4. X86-64 toolchain gets installed
  5. Install alr arm64 version
  6. No project will build now because kb: warning: can't find a toolchain for the following configuration: language 'Ada', target 'aarch64-darwin', default runtime
  7. alr toolchain --select will not install the correct toolchain

Expected Behavior
At step 7, alr should detect that gnat_native does not point to the correct host arch and thus should reinstall the correct toolchain

alr version
Paste here the output of alr version.

APPLICATION
alr version:               2.0.2+9b80158
libalire version:          2.0.2+9b80158
compilation date:          2024-10-09 16:57:49
compiled with version:     14.2.0

CONFIGURATION
settings folder:           /Users/rongcuid/.config/alire
cache folder:              /Users/rongcuid/.local/share/alire
vault folder:              /Users/rongcuid/.local/share/alire/releases
build folder:              /Users/rongcuid/.local/share/alire/builds
temp folder:               /private/var/folders/tw/8vsfcypj5rx4gbst7z5nrj7c0000gn/T
force flag:                FALSE
non-interactive flag:      FALSE
community index branch:    stable-1.3.0
compatible index versions: ^1.1 & <=1.3.0
indexes folder:            /Users/rongcuid/.config/alire/indexes
indexes metadata:          OK
index #1:                  (community) git+https://github.com/alire-project/alire-index#stable-1.3.0
toolchain folder:          /Users/rongcuid/.local/share/alire/toolchains
toolchain assistant:       disabled
tool #1 gnat:              gnat_native=14.2.1
tool #2 gprbuild:          gprbuild=24.0.1
system package manager:    /opt/local/bin/port
distro detection disabled: FALSE

WORKSPACE
root status:               VALID
root release:              ada_ray=0.1.0-dev
root load error:           none
root folder:               /Users/rongcuid/tmp/ada_ray
current folder:            /Users/rongcuid/tmp/ada_ray

SYSTEM
distribution:              MACPORTS
host-arch:                 AARCH64
os:                        MACOS
target:                    NATIVE
toolchain:                 USER
word-size:                 BITS_64

alr logs
If pertinent, paste the output of alr -vv -d <your command> here.

@mosteo
Copy link
Member

mosteo commented Nov 21, 2024

Thanks for the report. Actually, I believe the problem will be the mismatch between gprbuild and the installed gnat, rather than gnat itself.

@mosteo mosteo added the type: bug Something isn't working label Nov 21, 2024
@mosteo mosteo added this to the 2.0.3 milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants