Alire download for gnatprove install repeated fails mid-way

When I try to install gnatprove using alire, with fails part way through downloading https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatprove-x86_64-linux-14.1.0-1.tar.gz with curl. I’m still condemned to DSL, so I expect that it is simply timing out at some time. It has done this ever time I’ve tried to install gnatprove on this machine.

Is there any way for me to download it manually and provide it to alire directly?

Can I change the download tool to something else, wget perhaps, and see if that will download it ok?

Just as a data point, I’m able to download that file just fine with wget.

It might be more helpful to have the full error message you get as well. Might help identify what is crashing vs wget. I have troubles on my work computer, but my home computer works just fine.

It also might be worthwhile opening a github issue so the Alire team can maybe highlight what is going on (though definitely provide more specific details like error messages there for sure).

I’m too new to Alire to be of much help, but maybe someone else will recognize the error message.

Here’s the error with -v.

$ alr -v install gnatprove                                                                                             
-> Using default value for configuration 'distribution.disable_detection': 'FALSE'
detail: Found 1 indexes                                                                                                
info: ⓘ Computing solutions...                                                                                         
detail: Spawning: ["cat", "/etc/os-release"] > /run/user/1010/alr-iywc.tmp                                             
detail: Spawning: ["uname", "-m"] > /run/user/1010/alr-xyug.tmp                                                        
detail: Loading index found at /home/tkb/.config/alire/indexes/community/repo/index
info: ✓ Installation targets fully solved                                                                              
info: ⓘ Deploying gnatprove=14.1.1...                                                                                  
detail: Downloading file: https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatpro
ve-x86_64-linux-14.1.0-1.tar.gz                                                                                        
detail: Spawning: ["curl", "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatp
rove-x86_64-linux-14.1.0-1.tar.gz", "--location", "--progress-bar", "--output", "/home/tkb/.alire/alr-mqiv.tmp/gnatprov
e-x86_64-linux-14.1.0-1.tar.gz"]                                                                                       
###########################################################                                                       53.4%
curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)
error: Command ["curl", "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-14.1.0-1/gnatprov
e-x86_64-linux-14.1.0-1.tar.gz", "--location", "--progress-bar", "--output", "/home/tkb/.alire/alr-mqiv.tmp/gnatprove-x
86_64-linux-14.1.0-1.tar.gz"] exited with code 92
1 Like

Thanks!

So based on that, it looks like that is hardcoded into Alire to use curl. I think I found the location here: alire/src/alire/alire-os_lib-download.adb at b44efe6a062e3a9a81f9cf32b123ebb30a6aeadf · alire-project/alire · GitHub

So I think unless you just want to change that section of code locally to use wget and build alire yourself (I’ve built it in windows pretty easily, but never tried in linux), you may have to put in a github issue with the alire team to get an option to change it added (maybe if you are experienced in this kind of stuff you could even offer a PR, but I’m not good enough for that kind of thing).

I looked up that error with curl and it seems to happen to a lot of folks. For most it seems like some sort of load balancing timeout, but there are some other reasons for it too.

Thanks for finding that location. I’ll plan on submitting a GitHub issue, and then take a look at the code.

No problem. I realized I posted link to a specific commit. Updated the previous post with the master branch version of the link. Hopefully they can do something more to help out. EDIT: Nevermind, the forums keep changing the link back after a few mins.

It seems the possibility to change the download command has been implemented recently.

1 Like

Thanks! I’ll see if I can fix my problem using that.