AWS not working with Alire - SSL Error

I am trying to make HTTPS Get requests to websites in Ada web server. I can currently do HTTP requests without issues but HTTPS fails - possibly due to SSL Certificates. I only plan on using the client portion of the Ada AWS (Ada Web Server) library.

The errors I get are raised PROGRAM_ERROR : SSL not supported. and below that is raised PROGRAM_ERROR : aws-client.adb:398 finalize/adjust raised exception. This error also happened when I repeated the process on a virtual machine of Ubuntu - I was able to build aws though. My issue with that is explained below.

I am using AWS.Client.Get(url) and am able to get a response when it’s HTTP. For HTTPS, it doesn’t work. I can’t find any instructions to set SSL up and how would users in future work with my application without having to download a certificate.

Even though AWS is working, when I do “alr build” after “alr with aws” - I get the following :
creating s-main.tadb

Cannot create embedded resource file

make: *** [Makefile:220: gen-templates] Error 2

ERROR: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2

People on reddit said SSL should be enabled by default for the AWS crate in Alire. I tried cloning the repository and changing the Makefile config to specify “openssl” anyway but I can’t figure out how to use the “make” command in Windows 11. Mingw32-make doesn’t work and even if I did make it - I have no idea how to add this to my Ada project. I’ve never used the make command or done this stuff manually as I come from a Python and Java background.

Any help is appreciated.


I use make in Windows a lot. I start with msys2 ( ), which is what Alire uses I think. Once that is installed, I run: pacman -S make to install make. and make works good after that (I think I had to restart the shell after installing it).

1 Like

Thanks for getting back to me. I tried that and was successfully able to install make. Running “alr build” after doing “alr with aws” in a fresh project still gives me this error though :

[gprbind] awsres.bexch
[Ada] awsres.ali
[link] awsres.adb
make[1]: Entering directory ‘/c/Users/doctor/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates’
-r wsdl2aws_templates
-o …/…/.build/x86_64-w64-mingw32/common/src
*.tad[sb] *.macros
AWSRes - Resource Creator v1.3

creating s-main.tadb
Cannot create embedded resource file
make[1]: *** [Makefile:20: gen-templates] Error 1
make[1]: Leaving directory ‘/c/Users/doctor/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates’
make: *** [Makefile:220: gen-templates] Error 2
ERROR: Command [“make”, “all”, “ENABLE_SHARED=false”] exited with code 2

That’s not a Make error in and of itself. it is saying that line 20 of the Makefile is failing I think. So one of the commands is failling (whatever is trying to generate s-main.tadb)

Ohh I see. Is there a way of locating that file to see what line it is or even downloading AWS in a different way without Alire?

It’s usually named Makefile straight up. So I would look for that in the directory where you are building it.

Checked all the subfolders and can’t seem to find it. Is it possible to use a different package manager like gprbuild to do this instead? It might just be some weird alire issue I’m having because even after I deleted the cached version, I still get “Cannot create embedded resource file” and that same “make” error.

Did you happen to check:
/c/Users/doctor/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates or one of its subdirectories? Take a look at the paths mentioned in the Makefile output. They are in AppData, which may not be where you are searching?

I haven’t built AWS myself, so I am not sure if you can do it with just a GPR file or not. My naive assumption is that the Makefile probably calls gprbuild internally, but I don’t know for sure.

Thanks, I did find it in one of the parent directory of that but I think at this point I’m going to just give up. Appreciate the help you provided.

No problem. Sorry I wasn’t better help. I’ve never really used AWS, so I was limited in what I could help with.

Thanks anyhow though for trying and I at least found that path so it may help me in future if I go back!