Package Details: swift-language 5.10.1-1

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.000237
First Submitted: 2016-01-08 23:39 (UTC)
Last Updated: 2024-07-02 17:33 (UTC)

Sources (35)

Pinned Comments

xiota commented on 2023-12-31 14:56 (UTC) (edited on 2024-07-13 07:31 (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 (5.9.2) 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.
    • I don't know if everything actually works correctly. Someone who knows better would have to check. (I would use swift-bin, especially since it's already needed to build this.)
  • 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 .. 15 Next › Last »

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.

spacecowgirl commented on 2022-04-27 20:07 (UTC)

Problem with the AURs you listed is they are all old builds and swift-bin's REPL is broken. I would like to build from source and am still unable to build because of the issue with being unable to install the files during package because of Arch's security. I'd really appreciate a fix so I can use a newer version of Swift instead of the one's in the AURs you listed.

spacecowgirl commented on 2022-04-23 23:55 (UTC) (edited on 2022-04-24 01:58 (UTC) by spacecowgirl)

Trying the build again thanks for the patches, hopefully it will work. Can you take a look at the issue with your package here? https://github.com/chaotic-aur/packages/issues/799#issuecomment-1080554798

The owner of the repo says Is building swift and moving the files to $pkgdir -- Arch disallows writing to $pkgdir outside the package() function. That's a security measure.

The issue is with the line:

python swift/utils/build-script --preset=buildbot_linux,no_test install_destdir="$pkgdir"

The fix is to get the compiled files copied inside the package function and not build.

Apparently it's preventing their buildbot from doing get automatic builds of both this and swift-language-git. If you can fix this issue we can get automatic builds of the package in the chaotic-aur repo and that'd be much appreciated!!

Update: I cannot get it to build even though it looks succesfull, maybe this is related to the above issue:

[977/977][100%][455.744s] Linking CXX executable bin/lldb
--- Installing llvm ---
+ env DESTDIR=/home/chloe/.cache/paru/clone/swift-language/pkg/swift-language/ /usr/bin/cmake --build /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64 -- install-llvm-cov install-llvm-profdata install-IndexStore install-clang install-clang-resource-headers install-compiler-rt install-clangd install-lld install-LTO
[0/12][  0%][0.000s] cd /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linu...che/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/cmake_install.cmake
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:46 (file):
  file cannot create directory:                                                                                                                                                             
  /home/chloe/.cache/paru/clone/swift-language/pkg/swift-language/usr/bin.                                                                                                                  
  Maybe need administrative privileges.                                                                                                                                                     
Call Stack (most recent call first):                                                                                                                                                        
  /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/tools/cmake_install.cmake:66 (include)                                                            
  /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/cmake_install.cmake:77 (include)                                                                  


FAILED: tools/llvm-cov/CMakeFiles/install-llvm-cov /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/tools/llvm-cov/CMakeFiles/install-llvm-cov 
cd /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/tools/llvm-cov && /usr/bin/cmake -DCMAKE_INSTALL_COMPONENT="llvm-cov" -P /home/chloe/.cache/paru/clone/swift-language/src/build/buildbot_linux/llvm-linux-x86_64/cmake_install.cmake
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting

ERROR: command terminated with a non-zero exit status 1, aborting

==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'swift-language-5.6.0-1': 
error: packages failed to build: swift-language-5.6.0-1
Press any key to continue...

medzik commented on 2022-04-03 16:09 (UTC) (edited on 2022-04-03 16:09 (UTC) by medzik)

I want to build on github actions but I have a problem, it seems that some dependencies are missing. full CI log

soloturn commented on 2022-04-02 11:54 (UTC)

thanks for the hint, fixed the patches.

spacecowgirl commented on 2022-03-25 05:14 (UTC)

I am unable to build it.

-> Creating working copy of swift-nio-ssl git repo...
Cloning into 'swift-nio-ssl'...
done.
Switched to a new branch 'makepkg'
-> Creating working copy of swift-tools-support-core git repo...
Reset branch 'makepkg'
-> Creating working copy of swift-xcode-playground-support git repo...
Cloning into 'swift-xcode-playground-support'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
patching file utils/build-presets.ini
Hunk #1 FAILED at 726.
Hunk #2 succeeded at 830 with fuzz 1 (offset 93 lines).
Hunk #3 succeeded at 843 with fuzz 2 (offset 94 lines).
1 out of 3 hunks FAILED -- saving rejects to file utils/build-presets.ini.rej
==> ERROR: A failure occurred in prepare().
Aborting...
error: failed to build 'swift-language-5.6.0-1':

fanjiang commented on 2021-07-17 20:04 (UTC)

Hi @soloturn,

That is due to an issue in Arch GLIBC that prevents it from being run in containers like Docker. I think it's not relevant anymore :)

soloturn commented on 2021-07-06 03:04 (UTC)

fanjiang, when building the binaries, why did you nail down the arch version to a feb version in the docker image, and use a patched glibc from archlinuxcn.org : https://github.com/ProfFan/build-aur-action/commit/9054ea6b5895b8a811edaca26933f7330933a0e4 ?

soloturn commented on 2021-06-12 17:26 (UTC) (edited on 2021-06-12 17:27 (UTC) by soloturn)

hey cool thank you fanjiang! done, for maintainer.