Skip to content
New issue

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

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

Already on GitHub? # to your account

Problem with alr build / environment after with'ing gnoga #1687

Closed
bracke opened this issue May 27, 2024 · 3 comments
Closed

Problem with alr build / environment after with'ing gnoga #1687

bracke opened this issue May 27, 2024 · 3 comments
Labels
type: broken release A release is unusable due to some kind of brokenness

Comments

@bracke
Copy link
Contributor

bracke commented May 27, 2024

I'm getting an error when trying to build an app after withing gnoga (adding it as a dependency),

alr init --bin mytestapp
cd mytestapp
alr build
--> builds successfull

alr with gnoga
alr build
-->
error: Trying to set an already defined environment variable:
error: Target_OS is already defined as 'Linux' but new value is 'auto'

Is this something I should report to the Gnoga project or is this Alire related?

Output from alr version:
APPLICATION
alr version: 2.0.1
libalire version: 2.0.1
compilation date: 2024-03-21 11:06:29
compiled with version: 13.2.0

CONFIGURATION
settings folder: /home/bent/.config/alire
cache folder: /home/bent/.local/share/alire
vault folder: /home/bent/.local/share/alire/releases
build folder: /home/bent/.local/share/alire/builds
temp folder: /run/user/1000
force flag: FALSE
non-interactive flag: FALSE
community index branch: stable-1.3.0
compatible index versions: ^1.1 & <=1.3.0
indexes folder: /home/bent/.config/alire/indexes
indexes metadata: OK
index #1: (community) git+https://github.com/alire-project/alire-index#stable-1.3.0
toolchain folder: /home/bent/.local/share/alire/toolchains
toolchain assistant: disabled
tool #1 gnat: gnat_native=13.2.1
tool #2 gprbuild: gprbuild=22.0.1
system package manager: /usr/bin/apt
distro detection disabled: FALSE

WORKSPACE
root status: VALID
root release: gnogatest3=0.1.0-dev
root load error: none
root folder: /home/bent/Projekte/Ada/gnoga/2024/alr/gnogatest3
current folder: /home/bent/Projekte/Ada/gnoga/2024/alr/gnogatest3

SYSTEM
distribution: UBUNTU
host-arch: X86_64
os: LINUX
target: NATIVE
toolchain: SYSTEM
word-size: BITS_64

@mosteo
Copy link
Member

mosteo commented May 28, 2024

Thanks for the report. This is indeed a mistake in the metadata of both gnoga and simple_components, that should not set these variables.

There's currently no easy way to override a variable from the root project. What you can do until these releases are fixed is alr get e.g. simple_components, tweak its alire.toml, and pin to these sources from your project so there's no conflict.

@bracke
Copy link
Contributor Author

bracke commented May 28, 2024

@mosteo Thank you for the quick response.

I have opened an issue on the Gnoga project:
Blady-Com/gnoga#10

@mosteo
Copy link
Member

mosteo commented May 30, 2024

alire-project/alire-index#1082 (once merged)

@mosteo mosteo closed this as completed May 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: broken release A release is unusable due to some kind of brokenness
Projects
None yet
Development

No branches or pull requests

2 participants