Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Swift on Arch Linux

Install debootstrap.

# pacman -S arch-install-scripts debootstrap

Install Ubuntu base system into $ROOTFS.

$ export ROOTFS=$HOME/rootfs
# mkdir -p $ROOTFS
# debootstrap --arch amd64 xenial $ROOTFS http://archive.ubuntu.com/ubuntu/

Chroot to the Ubuntu, and set PATH.

(## means chrooted shell

# arch-chroot $ROOTFS /bin/bash
## echo 'export PATH="$PATH:/usr/sbin:/sbin:/bin"' >> .bashrc # run once
## source .bashrc

Install related library for Swift.

## apt update
## apt install make \
    libc6-dev \
    curl \
    libedit-dev \
    libpython2.7 \
    libicu-dev \
    libssl-dev \
    libxml2 \
    tzdata \
    git \
    libcurl4-openssl-dev \
    pkg-config \
    libicu57

Follow the official Ubuntu 16.04 instructions. https://swift.org/download/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.