Desember 04, 2015

Swift in Arch Linux

Following its open source release, Swift can be downloaded at http://www.swift.org. I am lucky enough to see that there is Linux version available for download. The binary version was developed in Ubuntu, so I tried to grab the binary release and then have them installed to no luck. It was some problems with some libraries: libpanel (from ncurses5), libedit.so.2 and libicuuc. Being a bleeding edge distro does mean that I may not be able to run binary files from older libs in my Arch box. That was the case with Swift, it was compiled under Ubuntuwith older libs.

Here's what I did to make Swift able to run without recompiling in Arch Linux:
  1. Whenever Swift complain about no libs available, go to rpmfind.net and then find one. Here's an example: http://www.rpmfind.net/linux/RPM/mageia/cauldron/x86_64/media/core/release/lib64ncurses5-5.9-24.mga6.x86_64.html. Get the rpm, rpmextract.sh rpmfile, the put all of the files inside, let's say $HOME/lib/swift
  2. Exception for libedit, just make a symlink from /usr/lib/libedit.so to libedit.so.2 (this should be done inside $HOME/lib/swift.
  3. Create a file, mine is $HOME/env/swift:
export PATH=$PATH:/opt/software/swift/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib/swift
 That's all. Now, just "source ~/env/swift" to use Swift.




0 comments:

Poskan Komentar