Package Details: swift-language 5.9.2-2

Git Clone URL: https://aur.archlinux.org/swift-language.git (read-only, click to copy)
Package Base: swift-language
Description: The Swift programming language and debugger
Upstream URL: https://github.com/apple/swift
Licenses: Apache-2.0
Submitter: Zrax
Maintainer: soloturn (fanjiang, refi.64, spacecowgirl, medzik, KyleYe, xiota)
Last Packager: xiota
Votes: 45
Popularity: 0.003554
First Submitted: 2016-01-08 23:39 (UTC)
Last Updated: 2024-01-01 08:14 (UTC)

Sources (35)

Pinned Comments

xiota commented on 2023-12-31 14:56 (UTC) (edited on 2024-01-01 08:28 (UTC) by xiota)

While I was able to build this in a clean chroot, consider this package to be a wip.

  • According to this comment, swift does need swift to build. So if you haven't previously built this package, you'll need aur/swift-bin.

  • This package attempts to install only swift to /usr/lib/swift. Building takes about 15GB. Package is 650MB. Installed size is 2GB.

    • cmark and llvm are built, but not installed. If they are installed, space requirement increases to 20GB, package is 2GB, and installed size 7GB.
    • Above space requirements count only the build tree. Does not include space needed to download and install depends. Does not include temporary files that may have been created and deleted by the build system.
  • This package does not make debug symbols. With debugging enabled, over 70GB would be required to build. I don't know package or install size because I hadn't figured out how to install at that time.

soloturn commented on 2020-09-06 22:25 (UTC) (edited on 2023-02-05 07:39 (UTC) by soloturn)

to speed up check out of the repositories, use shallow or sparse clone, e.g.:

  GITFLAGS="--depth=1" paru -S swift-language

other options to install swift are currently:

  • swift-bin, which repackages tachoknights official released centos8 build: https://aur.archlinux.org/packages/swift-bin/. the install is quick, no hours of waiting until everything is compiled.

  • latest from git, in swift-language-git. there is a binary built with github actions, but this build is not particularly stable, sometimes it uses more resources than github allows, sometimes it fails for a change upstream. the version number is taken out of the official tag on apple/swift main branch: e.g. swift-language-git-swift.DEVELOPMENT.SNAPSHOT.2020.09.28.a.r208.g6651f6e55d4-1-x86_64.pkg.tar.zst. so this one is the development tag from sep 28 + 208 commits, the commit hash is g6651f: aur - https://aur.archlinux.org/packages/swift-language-git. gh-actions: https://github.com/soloturn/swift-aur/releases/tag/latest

there was an 5.4.1 binary build, native arch, by fanjiang, built on GCE: https://github.com/ProfFan/swift-aur/releases

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 12 .. 15 Next › Last »

calin commented on 2019-09-29 10:29 (UTC)

I get a compilation failure:

/home/user/.cache/yay/swift-language/src/swift/docs/ABI/Mangling.rst:708:Unknown target name: "0". [296/992][ 29%][58.189s] Building CXX object lib/AST/CMakeFiles/swiftAST.dir/Decl.cpp.o ninja: build stopped: subcommand failed. ./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting ==> ERROR: A failure occurred in build(). Aborting... Error making: swift-language (swift)

Tabsc commented on 2019-08-14 07:52 (UTC)

Many thanks for the feedback. But there are so many packages depending on python-sphinx that it is difficult for me to remove it. Maybe we should post an issue somewhere else if this is not directly related to Arch. In your opinion where is the problem lying ? In the swift build, in python-sphinx incompatibility or in the Arch packages incompatibility ?

joekiller commented on 2019-08-09 23:41 (UTC)

@Tabsc sphinx version 2.X+ is actually the python-sphinx version (the python 3 version). So if you want this to work, you need to remove python-sphinx. Yes it is confusing that sphinx 2.X+ is for python 3 and version sphinx <2.X ie version 1.X is for python 2.

Tabsc commented on 2019-08-06 08:22 (UTC)

Comfirm @joekiller error occurs for me as well.

I was not able to remove python2-sphinx since it is installed as a dependency of the package (it thus reinstall itself at each pkgbuild). I tried to put python 3 sphinx as a dep in the PKGBUILD instead of python2-sphinx but it did not work.

joekiller commented on 2019-07-29 20:59 (UTC)

So I kept getting

Warning, treated as error:
/home/jlawson/.cache/yay/swift-language/src/swift/docs/ARCOptimization.rst:100:Pygments lexer name 'sil' is not known
[907/950] Compiling /home/jlawson/.cache/yay/swift-...inux-x86_64/stdlib/public/core/linux/x86_64/Swift.o
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
==> ERROR: A failure occurred in build().
    Aborting...

Again and finally traced it down to having both python-sphinx and python2-sphinx installed. Once I got rid of sphinx 2+ it went fine.

I had to move into my cache directory (~/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64) and run ninja -d explain to see what the heck was going on. Frustrating but finally it is working again.

Zrax commented on 2019-06-05 22:12 (UTC)

It looks like lldb hasn't been updated to work with swig 4 yet, so I created a swig3 AUR package which can be installed side-by-side with swig, and updated swift to use it for now until a better fix can be made.

I've also re-enabled the sourcekit (libsourcekitdInProc.so) build.

torpesco commented on 2019-06-04 16:56 (UTC)

I ran strace on the command that fails. Python can't find swig_runtime_data4. It tries various suffixes on it of .so, module.so, .py, .pyc in the library path. Has anyone reported this (or found an existing report for this) at bugs.swift.org? I can't find one, myself.

MarcinWieczorek commented on 2019-06-03 13:33 (UTC)

I confirm.

felix990302 commented on 2019-06-03 04:30 (UTC) (edited on 2019-06-03 04:35 (UTC) by felix990302)

@imkerberos can confirm getting same error, looks like the system installed swig 4 package conflicted with the version provided by the swift bois