-
Looks like the last commit does not update the .SRCINFO file. Maybe we should do it for the next commit.
makepkg --printsrcinfo > .SRCINFO
-
I failed to build it for the "$pkgdir" folder permission issue. I need to solve it by moving the logic from
build()
topackage()
. It makes sense for me since we only "Entering fakeroot environment..." afterbuild()
and beforepackage()
-- 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.
-
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
-
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 to
swift_retain'`
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
andllvm
are built, but not installed. If they are installed, space requirement increases to 20GB, package is 2GB, and installed size 7GB.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.:
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