How can I install Alire on Void Linux with gcc-ada?

I’m trying to install Alire on my Void Linux computer that uses Void-provided gcc-ada. I need to install Ada Web Server and do not have gprbuild, nor have I been able to install gprbuild. How do I install Alire?

If you go to ada-lang.io, does it offer a download link for your Linux (on the landing page, in blue)?

1 Like

Thanks simonjwrite. I grabbed the link you mentioned, unzipped it and as user slitt (not root) I ran “alr get aws”. I got warnings “New solution is incomplete”, and it said under the category “Missing” that “openssl * (new,missing)”, and asked if I wanted to continue. I said no so of course it errored out. I don’t know what openssl it’s talking about, but my Void Linux package manager says I’ve installed both openssl-3.3.2_1 and openssl-devel-3.3.2_1 . The exact output is at https://dpaste.com/35W565H5Y . I tried alr get openssl and it said something about no such package. What do you think my next step should be?

Hi @stevelitt!

Alire can install Ada programs without much fuzz. However, some Ada programs/crates require external dependencies (read user supplied or system supplied dependencies). In your case, Alire is detecting that AWS requires that the system have the openssl program installed in order for it to build AWS.

In the case of Void Linux, which uses the xbps package manager, Alire is not able to tell xbps to install the openssl program. Therefore, you have to do so manually. As you said, you have them already installed (both the executable and the -devel version). That means that you should be able to go ahead with building AWS without issue.

In the output you linked, you are answering “No” (or you are using Alire in a non-interactive way) when it asks whether to move ahead with the build. Since you are already satisfying the external requirements, answer “Yes” and AWS should build. It really is just that simple! (in principle).

Best regards,
Fer

1 Like

This is because Alire doesn’t know about Void Linux or xbps; so, until someone steps up to fix that, you have to do as @Irvise says & install the relevant packages manually.

Thanks Fir. I said yes and it still griped about openssl. See dpaste: A9V4WGMZJ .

Yes; I think this is to be expected in the current state of things. But, what happened when you carried on with alr build?

1 Like

alr build appeared to complete without errors, but warned of lack of openssl. There’s more to the story. The alr executable was in a bin directory, the alire.toml directory was in the aws_24.0.0_2b75fe6d directory below bin, so I cd’ed to the aws_24.0.0_2b75fe6d directory and ran …/alr build.

So, to show you the warning, I ran it a second time, resulting in the following:

[slitt@mydesk aws_24.0.0_2b75fe6d]$ ../alr build
warn: The following external dependencies are unavailable within Alire:
warn:    openssl*
warn: They should be made available in the environment by the user.
warn: Generating possibly incomplete configuration because of missing dependencies
◷ Syncing build dir... warn: Generating possibly incomplete environment because of missing dependencies
ⓘ Building aws=24.0.0/install_dir/share/gpr/aws.gpr...                       
✓ Build finished successfully in 0.65 seconds.

[slitt@mydesk aws_24.0.0_2b75fe6d]$

I don’t know how to make openssl* available in the environment. Any ideas? Thanks!

You only get a warning, that means that the build was successful as you said. The warning, I suppose, can only be turned off by making Alire aware of xbps… But for the time being, it can safely be ignored :slight_smile:

Best regards,
Fer

1 Like

Thanks Fer,

Does this warning mean that I won’t have the security of ssl when I run Alire or AWS?

No, it means that Alire cannot be 100% sure that OpenSSL is available in your system while building programs that require it (because it does not know about the xbps package manager and it cannot “ask” it whether it installed the required system dependencies). Since you installed manually, it is available and AWS was built successfully.

Best regards,
Fer

1 Like

Void comes with LibreSSL by default and AWS can use LibreSSL which would be more secure anyway but I’m not sure if that is straight forward with the crate or not.

https://docs.adacore.com/live/wave/aws/html/aws_ug/building_aws.html