There have been a number of updates to Open Source Swift that take advantage of newer versions of CMake to build swift on Linux. In particular, the default version of
cmake that comes with Ubuntu 14.04 (18.104.22.168) is no longer up to the task.
Let’s get our Ubuntu 14.04 environment updated with CMake 3.4.3, the version proposed by the developers that work in this area.
On systems I’m installing software by source, I usually have a build area in
/usr/local/src and an area of archives (so I can keep track of the versions I built) in
root or using
# cd /usr/local/archive # wget https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz # cd ../src/ # tar -xzvf ../archive/cmake-3.4.3.tar.gz
Now, to configure and build:
# cd cmake-3.4.3 # ./configure --prefix=/usr/local ... CMake has bootstrapped. Now run make. # make
make install will install
cmake and its associated configuration to
# make install # which cmake # cmake --version cmake version 3.4.3 CMake suite maintained and supported by Kitware (kitware.com/cmake).
That’s all it takes. Happy building!