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.006411
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 .. 15 Next › Last »

KyleYe commented on 2023-05-13 15:37 (UTC) (edited on 2023-05-13 17:04 (UTC) by KyleYe)

  1. Looks like the last commit does not update the .SRCINFO file. Maybe we should do it for the next commit. makepkg --printsrcinfo > .SRCINFO

  2. I failed to build it for the "$pkgdir" folder permission issue. I need to solve it by moving the logic from build() to package(). It makes sense for me since we only "Entering fakeroot environment..." after build() and before package()

-- Install configuration: "Release"
CMake Error at cmake_install.cmake:46 (file):
  file cannot create directory:
  /home/kyle/.cache/yay/swift-language/pkg/swift-language/usr/lib/swift-git/bin.
  Maybe need administrative privileges.
  1. After it, I still failed to build it for a include issue. And it is tracked upstream by https://github.com/apple/swift/issues/65028. We can apply the patch here to workaround it https://github.com/stephank/swift/commit/112681f7f5927588569b225d926ca9f5f9ec98b3

  2. Even after apply this patch, I will still fail to build it in the final link stage. ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. And got thousands of link error message saying undefined reference to xx. eg. /usr/sbin/ld: Optimizer.o:(.text+0x77ec): undefined reference toswift_retain'`

soloturn commented on 2023-05-12 13:04 (UTC) (edited on 2023-05-12 13:05 (UTC) by soloturn)

go ahead kyleye, made you co maintainer.

for 5.8 am getting this one: error: unknown type name 'uintptr_t'; https://github.com/apple/llvm-project/issues/6847

KyleYe commented on 2023-05-12 11:29 (UTC)

Can we add arm64 arch support? Thanks

soloturn commented on 2023-02-25 11:00 (UTC)

compnerd answered like this: ld.bfd is unsupported, ld should be set to gold, I thought we did flag that in the configure phase

uetcis commented on 2023-02-21 22:27 (UTC)

Got thousands lines of errors when trying to build this on Asahi-Linux (based on ALARM). 😢

soloturn commented on 2022-07-27 17:11 (UTC) (edited on 2022-07-27 17:11 (UTC) by soloturn)

@tecnotercio, done.

tecnotercio commented on 2022-06-20 18:03 (UTC)

Regarding the problem exposed by @ExperiBassMusic, please change the URL of the "swift-cmark-gfm" library in PKGBUILD to the value below:

"swift-cmark-gfm::git+https://github.com/apple/swift-cmark#branch=release/5.6-gfm"

ExperiBassMusic commented on 2022-06-19 14:00 (UTC) (edited on 2022-06-19 14:01 (UTC) by ExperiBassMusic)

Install fails when cloning swift-cmark:

-> Creating working copy of swift-cmark-gfm git repo...
Cloning into 'swift-cmark-gfm'...
done.
fatal: invalid reference: origin/5.6-gfm

noticing the repo only has a gfm branch, and 5.6-gfm redirects to that branch when visiting the url from a browser.

soloturn commented on 2022-05-23 07:20 (UTC) (edited on 2022-05-23 07:25 (UTC) by soloturn)

medzik, spacecowgirl, added you as co-maintainer. updated bith, this, and swift-language-git to newest versions.