About a month ago, Fabian posted on the forums here (Official platform support for other Linux Distributions (and a case for Amazon Linux 2)) and suggested that Amazon Linux 2 would be a good target for official Swift support. I won't recap all of his points here, but I will say that his post started some new discussions and focused some that were already underway, and that push caused interested folks to share their progress and work on the remaining issues.
Rather than keep that discussion on an email thread everyone thought it was a great idea to move the conversation to this thread - so it can be better tracked and so that we can get some more eyes and ideas on the issues we're seeing.
There's a few options about how it may be eventually distributed for Amazon Linux 2, but the first issue we want to resolve is to make sure the build works and the tests pass. Fortunately, a few people have figured out the dependencies, etc. to get the build working. Fabian posted his solution, which uses Docker with the amazonlinux:2 image, here: https://github.com/fabianfett/amazonlinux-swift. The tests mostly pass, but there were 5-6 test cases that were continuing to fail.
To reproduce those test failures using Fabian's setup:
- Clone that repository (https://github.com/fabianfett/amazonlinux-swift)
- Change to the “compile” directory
- Modify the last line of the Dockerfile to remove the “no_test” flag
- Run sh build.sh > >(tee -a stdout.log) 2> >(tee -a stderr.log >&2)
We're already starting to make progress on some of these test failures. Dario, for example, found that some of the errors may have been caused by a user permission issue - but I'll let people speak for themselves with their updates.
Please chime in here with any updates, questions or ideas you may have.