Building Swift For Debian 9 (Stretch)

I just went through this, and wrote the process up so that future-me remembered what the heck I actually did.

Posting here in the hope that it might help someone out one day...

7 Likes

i’ve just internalized --preset=buildbot_linux_1804 and wait for it to ask me for the other 2 arguments at this point

1 Like

Yeah, that's about what I've landed on through much trial and and error.

It would be nice if the README.md for Swift even mentioned --preset somewhere.

The build process is ridiculous enough without the documentation being so bad. I'm working on making a Gentoo package but it would be easier if I didn't have to read through all the source of the build scripts to figure out how they're supposed to work.

Ah, that's another way to do it, yeah. It looks like the buildbot_linux_1804 preset isn't in the swift-4.2-branch branch though.

Also, what's up with that naming? buildbot_linux_1804? linux ≠ ubuntu

¯_(ツ)_/¯

Helping with the documentation is a great way for folks to contribute to an open source project. If you see specific ways that the documentation can be constructively improved, please feel free to open up a pull request. Chances are someone else had the same experience as you.

Thanks for writing this up! If you think there’s a natural place we could incorporate such helpful information into the documentation with the Swift project, I think many people would be very happy to see that. Feel free to open up a pull request. Others would really likely benefit from what you discovered.

1 Like

We have similar documentation specific for compiling for Ubuntu 14.04 in the docs directory. Rather than have the complete build though, it contains information about the ways building for Ubuntu 14.04 differs from the main documentation. I think it would be reasonable to create something similar for Debian 9 that includes similar information. Here is a link to the file:

https://github.com/apple/swift/blob/master/docs/Ubuntu14.md

1 Like

I forgot to add. It would be reasonable to put this next to the link for ubuntu 14.04 in the readme file as one can see here: