-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Alire isn't happy with getting gtkada #1554
Comments
Hi @MrAda, I just tried on my setup and the download was fine. I guess there is an issue with curl and your network, or a bad installation of MSYS2. Can you try to run
|
I am trying to follow your directions and each time I get an error with the -bin: PS C:\Users\Chris\hello_1.0.2_5715870b> alr exec -- curl By the way I have install gprbuild so I don't know what that is about. Chris@Lucy MINGW64 ~ |
Maybe do a clean install of Alr and get rid of any files it created up to this point? |
The |
The |
Thanks to mosteo's acute vision! PS C:\Users\Chris> alr init --bin plob |
I ran it and selected gnat_native=13.2.1 got this: |
Hi @MrAda , this is with |
Yes the stable version. I don't see ALR_CONFIG in my Environment Variables window. I did notice that it started off in my C:\Users\Chris folder which is odd for me as I never develop out of there. I did do a fresh install so that didn't help. I will try again, but where can I found ALR_CONFIG? |
So I did the alr toolchain --select and I let it default to what it can find and I got: |
Ok. So I updated my Msys2 packages, which seem to help because I was able to select my toolset because I can see that the compilers I have installed in Msys. Those are what I chose. I think prefer to have the tools done with Msys and then have Alire go use them. Get things downloaded from Alire has been a problem when it comes to tool sets. |
$ pacman -Q | grep curl Is this the correct version that works with Alire? I see in pacman there are many curl's to choose from... |
Looks like there's an issue with curl or your network. Can you try to run this in our Msys2 shell?
|
|
$ curl https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-windows64-22.0.0-1.tar.gz --location --progress-bar --output gprbuild-x86_64-windows64-22.0.0-1.tar.gz curl failed to verify the legitimacy of the server and therefore could not |
Since I am doing this on Windows, just go into the Environment settings and set it? |
I think so, but since you seem to be using Power Shell, I would try first:
and check the paths being reported by Note that the quotes are mandatory and the path must be absolute. That's temporary to your shell session, though. |
Also, the target config dir must exist before you run |
PS C:\Users\Chris> $env:ALR_CONFIG="c:\Users\Chris\Alire" CONFIGURATION WORKSPACE SYSTEM So there was another folder the config was pointing to but I guess deleted it. It was C:\Users\Chris.alire.... So I did an alr get hello Note: Selected tool version gprbuild=22.0.1 This is infuriating that nothing works well on WIndows. |
OK so the issue is not with Alire here. You have to fix the problem with curl before. |
When you tried in a pristine configuration, did Alire prompt to install msys2? If not, you have another msys2 in your path (Alire looks for an executable |
Actually I saw that Alire wanted to install msys2 a while back so I did it and hence I also used pacman to install any remaining things I could think of because of the curl issue I have. |
I only got the SSL certification issue once. I went into MSYS and did a curl -V and it complained that the lib and curl didn't match. So installed both libcurl and curl. I ran alr toolchain --select again and got the same error messages. I am still getting "File not found" withing the .\config\alire\cache\dependencies\alr-*.tmp folders along with the curl issue which I suspect is due to the missing folders, not curl. That is a guess at this point. If there is a clear/concise/accurate of how to get started with Alire I am interested. I feel I have been piece-mealing this too much to the point that it is a mess on my PC. |
@Fabien-Chouteau So I did a search on my PC to see if I had more than one curl installed and it seems I do. One in the windows area and one in my msys area. I don't know which one Alire is trying to use but I am guessing the windows one.so I fixed my PATH env var and it didn't make a difference. |
@MrAda, I gave you partial information before. To ensure you use a pristine configuration with fresh msys2, you need to do two things (assuming PowerShell syntax):
But, take into account that if you have another msys2 already in your path not installed by Alire, it will be detected and Alire won't try to reinstall msys2. |
@mosteo I am not a PowerShell user so I am not sure if I am doing things right. I did as you said above and I still have the file not found issues. I don't know why we just don't use msys2's bash shell instead of powershell. |
I talked about PowerShell (PS) because the Alire Windows installer sets up a menu entry that launches a PS command window with Alire in its path, and I thought that would be your situation. Also, the first log you pasted shows the PS prompt, which made think that you were using it:
If you're using a msys2 bash shell, then I suspect that that shell comes from a different msys2 installation, and launching Alire inside it for sure will detect it in the path and use it, so tweaking Alire will not help if the trouble is with the enclosing msys2 installation. In other words, to isolate the trouble and discard possible culprits, Alire should be run from a shell that has no |
You can run alr from an msys2 shell, but be sure to the mingw64.exe shell. |
I appreciate the help. I used PS because that is that the installation required me to use. I never intentionally wanted to use it. To address @Fabien-Chouteau 's comment, alr is not seen from my MINGW64 shell. But then again according to @mosteo 's comment, pacman is visible. So I feel I have gone in a circle.ls -
I retried the 2 commands above in my PS shell and this time it worked. So hello seems to be working. I guess the next thing to do is create a new crate and see if I can build/run another app to make sure the changes took. |
Well I am able to get through doing the myproj example and follow along with the documentation online. I guess the two commands above are the key. I am wondering why the documentation just didn't say that up front. Wasted a lot of time trying to get this to work. My goal is to integrate alire, etc into a project at work since community versions no long will be created. If I cannot make it work then we won't be updating. |
I'm glad we made some progress. We don't have specific documentation as it's an unintended situation that we had not encountered before that I remember. I will add some extra documentation in our Windows setup docs. |
We documented settings a bit more at https://alire.ada.dev/docs/#relocating-your-settings, so I'm closing this issue. |
PS C:\Users\Chris> alr get gtkada
Warning:
Warning: New solution is incomplete.
Warning: +~ libgtk3 >=3.24.24 (new,external)
Warning: +~ make * (new,external)
Warning: + pkg_config 2.1.0 (new)
Warning:
Warning: Could not find a complete solution for gtkada=24.0.0
Build will fail unless externals are made available, do you want to continue?
[Y] Yes [N] No (default is No) Yes
Note: Deploying gtkada=24.0.0...
File not found - C:\Users\Chris\alr-azyz.tmp*
File not found - C:\Users\Chris\alr-azyz.tmp*
ERROR: Command ["curl", "https://github.com/AdaCore/gtkada/archive/v24.0.0/gtkada-24.0.0.zip", "--location", "--progress-bar", "--output", "C:\Users\Chris\alr-azyz.tmp\gtkada-24.0.0.zip"] exited with code -1
I keep getting stuff like this on Windows and Alire. Here is my system info:
APPLICATION
alr version: 1.2.2
libalire version: 1.2.2
compilation date: 2023-01-12 20:53:29
compiler version: Community 2021 (20210519-103)
CONFIGURATION
config folder: C:\Users\Chris.config\alire
force flag: FALSE
non-interactive flag: FALSE
community index branch: stable-1.2.1
compatible index versions: ^1.1 & <=1.2.1
indexes folder: C:\Users\Chris.config\alire\indexes
indexes metadata: OK
index #1: (community) git+https://github.com/alire-project/alire-index#stable-1.2.1
toolchain assistant: disabled
tool #1 gnat: gnat_external=13.2.0
tool #2 gprbuild: gprbuild=22.0.0
WORKSPACE
root status: OUTSIDE
root release: N/A
root load error: N/A
root folder: N/A
current folder: C:\Users\Chris
SYSTEM
distribution: DISTRO_UNKNOWN
host-arch: X86_64
os: WINDOWS
target: NATIVE
toolchain: USER
word-size: BITS_64
I seem to have less issues on Linux but I want to do this on WIndows too.
The text was updated successfully, but these errors were encountered: