Package Details: swift-bin 4.1-3

Git Clone URL: https://aur.archlinux.org/swift-bin.git (read-only)
Package Base: swift-bin
Description: Official binary builds of the Swift programming language.
Upstream URL: https://swift.org
Keywords: apple language swift swiftlang
Licenses: Apache
Conflicts: lldb, swift-language-git
Provides: lldb, swift-language
Replaces: swift-language-bin
Submitter: ashleyis
Maintainer: refi.64
Last Packager: refi.64
Votes: 52
Popularity: 3.596301
First Submitted: 2015-12-04 17:31
Last Updated: 2018-04-22 02:10

Required by (24)

Sources (2)

Pinned Comments

refi.64 commented on 2018-02-08 22:13

New package release! Changes include:

  • libcurl should now work out-of-the-box, without having to use LD_PRELOAD.
  • Header includes work.
  • Version warnings won't be printed. This means that Swift commands that assume any output is erroneous will succeed, and any compiled programs also won't print version information warnings. This ALSO means that any binaries you compile will use a custom dynamic linker (stored in /usr/lib/swift/arch/ld.so), and that an incredibly ugly hack was necessary in order to make this work.

Note that the signing key comment by @FredBezies still applies, so make sure you enter:

gpg --recv-keys --keyserver hkp://pgp.mit.edu EF5430F071E1B235

Enjoy!

FredBezies commented on 2017-09-21 05:28

Swift 4.x.x provides a new signing key. So before building it, please enter this key : gpg --recv-keys --keyserver hkp://pgp.mit.edu EF5430F071E1B235

And there is no easy way - as I tried this morning - to work around libcurl issue :(

Latest Comments

lf-araujo commented on 2018-05-21 11:42

I am affected by the same error: swift: symbol lookup error: /usr/lib/libstdc++.so.6: undefined symbol: memcpy, version GCC_3.0

arslan2012 commented on 2018-05-11 15:25

@refi.64 I'm having exactly same issue as @frol, changing qldv to qldv-git did not help either

pacman -Qi glibc
Name            : glibc
Version         : 2.27-3
Description     : GNU C Library
Architecture    : x86_64
URL             : http://www.gnu.org/software/libc
Licenses        : GPL  LGPL
Groups          : base
Provides        : None
Depends On      : linux-api-headers>=4.10  tzdata  filesystem
Optional Deps   : gd: for memusagestat [installed]
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 41.40 MiB
Packager        : Bartlomiej Piotrowski <bpiotrowski@archlinux.org>
Build Date      : Thu 03 May 2018 04:09:56 AM CST
Install Date    : Thu 10 May 2018 07:15:49 PM CST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

refi.64 commented on 2018-05-10 20:05

@frol @SeAL80s: I have a hunch these issues are due to the recent qldv upgrade. I'm likely going to switch to the Fedora RPM binaries once Swift 4.2 comes out, since this whole patching-glibc is a huge mess.

Meanwhile, could you post your glibc version? (pacman -Qi glibc)

frol commented on 2018-05-10 19:50

Running swift, swiftc and a few other utils I get the following error:

$ swift --help
swift: symbol lookup error: /usr/lib/libstdc++.so.6: undefined symbol: memcpy, version GCC_3.0

Others, e.g. swift-build, swift-run, swift-test, get another error:

$ swift-run
swift-test: relocation error: /usr/lib/libk5crypto.so.3: symbol __ctype_tolower_loc version GLIBC_2.3.4 not defined in file libc.so.6 with link time reference

I am on the latest Arch Linux x64. I recall recent update of GCC to 8.1.0; could that be the trigger? Is there a workaround?

SeAL80s commented on 2018-05-05 01:45

Failed to local test instruction prior to usage of 21680.

ERROR: A failure occurred in package().

Aborting...

What's this ?

Google find nothing !

refi.64 commented on 2018-05-02 21:47

@tierriminator: Hmm...two questions:

  • What version of glibc are you using? (Try running pacman -Qi glibc.)
  • You're on X64, right?

tierriminator commented on 2018-04-30 13:50

After installation I just get segfaults when trying to run any provided utility

bartekb81 commented on 2018-04-28 08:15

You might get linker warnings when trying to run swift or swift-built binaries after upgrading to glibc 2.27. My patch for the qldv tool (used in PKGBUILD): https://github.com/kirbyfan64/qldv/pull/1

refi.64 commented on 2018-04-22 02:10

maximaman: Sorry about that! It should be fixed now. (I didn't use the patch, though, because I didn't realize it had been attached...)

maximaman commented on 2018-04-21 13:32

Here's a patch which fixes the build of the latest version:

diff --git a/PKGBUILD b/PKGBUILD
index 347027a..0a47d7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,8 @@
 # Maintainer: Ryan Gonzalez <rymg19 at gmail dot com>
 # Contributor: Frederic Bezies <fredbezies at gmail dot com>, youngunix <>

-_version=4.1
 pkgname=swift-bin
-pkgver=${_version//-/.}
+pkgver=4.1
 pkgrel=2
 pkgdesc="Official binary builds of the Swift programming language."
 arch=('x86_64')
@@ -17,8 +16,8 @@ validpgpkeys=('5E4DF843FB065D7F7E24FBA2EF5430F071E1B235')
 provides=('swift-language' 'lldb')
 replaces=('swift-language-bin')
 source=(
-"https://swift.org/builds/swift-${_version}-release/ubuntu1604/swift-${_version}-RELEASE/swift-${_version}-RELEASE-ubuntu16.04.tar.gz"
-"https://swift.org/builds/swift-${_version}-release/ubuntu1604/swift-${_version}-RELEASE/swift-${_version}-RELEASE-ubuntu16.04.tar.gz.sig"
+"https://swift.org/builds/swift-${pkgver}-release/ubuntu1604/swift-${pkgver}-RELEASE/swift-${pkgver}-RELEASE-ubuntu16.04.tar.gz"
+"https://swift.org/builds/swift-${pkgver}-release/ubuntu1604/swift-${pkgver}-RELEASE/swift-${pkgver}-RELEASE-ubuntu16.04.tar.gz.sig"
 )
 sha256sums=('bd11d422d466dc8fc149e52c4a4a94aa56dc5f03520f482fba5cd7e58f15bbc4'
             'SKIP')
@@ -28,7 +27,7 @@ package() {
     mkdir -p "${target}"

     # Copy extracted files
-    cp -Ppr "${srcdir}/swift-${_version}-RELEASE"*/usr/* "$target"
+    cp -Ppr "${srcdir}/swift-${pkgver}-RELEASE"*/usr/* "$target"
     rm -rf "${target}/local"

     # Permission fix
@@ -40,7 +39,7 @@ package() {
         ln -s ../lib/swift/bin/"`basename "$file"`" "${pkgdir}/usr/bin"
     done
     ln -s swift/lib/libsourcekitdInProc.so "${pkgdir}/usr/lib"
-    chmod +x swift/lib/libsourcekitdInProc.so
+    chmod +x ${target}/lib/libsourcekitdInProc.so

     # Yuck! patching libedit and libcurl SONAMEs
     find "${target}/bin" -type f -exec sed -i 's/libedit\.so\.2/libedit\.so\.0/g' {} \;

All comments