Package Details: swift 3.1.1-5

Git Clone URL: https://aur.archlinux.org/swift-language.git (read-only)
Package Base: swift-language
Description: The Swift programming language compiler and tools
Upstream URL: http://swift.org/
Licenses: Apache
Conflicts: swift-bin, swift-git, swift-language-git
Provides: swift-language
Submitter: Zrax
Maintainer: Zrax
Last Packager: Zrax
Votes: 22
Popularity: 0.858475
First Submitted: 2016-01-08 23:39
Last Updated: 2017-09-19 18:21

Latest Comments

skela commented on 2017-09-20 06:58

@Zrax: That builds and works for me now, thanks so much for the help!

Zrax commented on 2017-09-19 18:21

@skela: Thanks, I've added another patch to make it build with clang 5.

skela commented on 2017-09-18 06:42

Thanks, that now comes a long way further when I try to install, except it stops with a different error:

[287/652] Building CXX object lib/Serialization/CMakeFiles/swiftSerialization.dir/Serialization.cpp.o
[288/652] Building CXX object lib/SIL/CMakeFiles/swiftSIL.dir/SILDeclRef.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...

Zrax commented on 2017-09-17 17:18

It looks like github made a change that affects how some tarballs are generated (affecting much more than just swift). I've updated the checksums to match.

skela commented on 2017-09-17 06:49

This doesn't install for me at the moment, any idea what is going on ?

==> Validating source files with sha256sums...
swift-3.1.1-RELEASE.tar.gz ... FAILED
swift-llvm-3.1.1-RELEASE.tar.gz ... FAILED
swift-clang-3.1.1-RELEASE.tar.gz ... FAILED
swift-lldb-3.1.1-RELEASE.tar.gz ... FAILED
swift-cmark-3.1.1-RELEASE.tar.gz ... Passed
swift-llbuild-3.1.1-RELEASE.tar.gz ... FAILED
swift-package-manager-3.1.1-RELEASE.tar.gz ... FAILED
swift-corelibs-xctest-3.1.1-RELEASE.tar.gz ... Passed
swift-corelibs-foundation-3.1.1-RELEASE.tar.gz ... FAILED
swift-corelibs-libdispatch-3.1.1-RELEASE.tar.gz ... Passed
swift-integration-tests-3.1.1-RELEASE.tar.gz ... Passed
sourcekit_link_order.patch ... Passed
icu59.patch ... Passed
sphinx1.6.patch ... Passed
lldb_missing_include.patch ... Passed
glibc-2.26.patch ... Passed
==> ERROR: One or more files did not pass the validity check!

Zrax commented on 2017-09-12 16:47

@FredBezies: I've added some fixes for building with glibc 2.26 (including the error you encountered).

FredBezies commented on 2017-09-11 08:25

Cannot get it build :(

/home/fred/swift-language/src/swift/stdlib/public/stubs/Stubs.cpp:64:10: fatal error: 'xlocale.h' file not found
#include <xlocale.h>
^
1 error generated.
[579/652] Building CXX object stdlib/p...ection-linux-x86_64.dir/Demangle.cpp.o
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Zrax commented on 2017-07-19 23:17

@adsun: Should be fixed now, thanks.

adsun commented on 2017-07-18 01:43

Got a build error in swift-language/src/build/Ninja-ReleaseAssert/libdispatch-linux-x86_64:

https://gist.github.com/Adsun701/b0be4a5fb7bd9a775476ee80f84b9618

Swift build fails because of this.

Zrax commented on 2017-06-14 22:25

Thanks @Ahti333, it should be fixed now.

lllf commented on 2017-06-11 05:23

@Ahti333

Something like this in prepare() should fix it?

( cd "${srcdir}/lldb" && sed -i '/#include <vector>/a#include <functional>' include/lldb/Utility/TaskPool.h )

Ahti333 commented on 2017-06-10 16:15

The package currently does not build due to https://bugs.swift.org/browse/SR-4838

Until that issue is resolved, this patch https://gist.github.com/7c8723abc3d7fd7b33fedb2824c144a3 makes the package buildable again.

PS: I also think libkqueue is no longer needed as a dependency since Swift now includes its own copy.

RemoteAdmin commented on 2017-04-09 14:38

@lf-araujo

What about the line "/usr/bin/ranlib: lib/libllbuildBuildSystem.a: Not enough space". You're systems may have run out of disk space. Otherwise it might be due to a lack of ram. I'am only able to build it with at least 5 GB.

lf-araujo commented on 2017-04-09 08:51

Hi all,

Not working for me. Similar error to RemoteAdmin, except I had python and rsync fully installed.

Error:

FAILED: lib/libllbuildBuildSystem.a
: && /usr/bin/cmake -E remove lib/libllbuildBuildSystem.a && /usr/bin/ar qc lib/libllbuildBuildSystem.a lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildExecutionQueue.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildFile.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildKey.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildNode.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildSystem.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildSystemFrontend.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/BuildValue.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/ExternalCommand.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/LaneBasedExecutionQueue.cpp.o lib/BuildSystem/CMakeFiles/llbuildBuildSystem.dir/SwiftTools.cpp.o && /usr/bin/ranlib lib/libllbuildBuildSystem.a && :
/usr/bin/ranlib: lib/libllbuildBuildSystem.a: Not enough space.




ninja: build stopped: subcommand failed.

RemoteAdmin commented on 2017-04-08 10:54

The build doesn't work if python and rsync are not installed. Therefore I would recommend changing the makedepends to:

makedepends=('git' 'cmake' 'ninja' 'swig' 'clang>=3.8' 'python2-six' 'perl'
'python2-sphinx' 'python2-requests', 'python', 'rsync')

python is required in the check function which fails with:

src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/sil-passpipeline-dump/Output/basic.test-sh.script: line 2: python: command not found
LLVM ERROR: IO failure on output stream.

rsync is required in package_swift which fails with:

/bin/sh: rsync: command not found
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Zrax commented on 2017-04-07 05:33

Updated to 3.1 with SourceKit. Sorry for the delay; both the 3.1 release and enabling SourceKit created some issues with getting everything built...

Also, the swift REPL has a known bug in this version that I wasn't able to patch yet. There is a workaround described here: https://bugs.swift.org/browse/SR-3794

MatejLach commented on 2017-01-30 18:32

Ready-made packages: https://www.dropbox.com/sh/s4t5gdqtp05391u/AADrWr2XAmuzOhY-q3ewmq_Ia?dl=0

@Zrax Any chance you could incorporate SourceKit (libsourcekitdInProc.so) into the package?:
https://github.com/apple/swift/pull/3594#issuecomment-234169759

Ahti333 commented on 2017-01-29 22:27

You can build swift without downgrading your installation by building in a chroot, like this:

1. Download the required versions of clang and llvm-libs from ALA. Also build libkqueue.
2. Install the devtools package
3. Run extra-x86_64-build in the folder containing the swift PKGBUILD. Append `--` and then `-I packagefile.pkg.tar.gz` to the extra-x86_64-build arguments for every dependency not in your pacman repos. On my system I needed to append `-- -I clang-3.8.1-1-x86_64.pkg.tar.xz -I llvm-libs-3.8.1-1-x86_64.pkg.tar.xz -I ../libkqueue/libkqueue-2.1.0-1-x86_64.pkg.tar.xz`. Your paths may vary.

Zrax commented on 2017-01-26 02:14

In short, to make swift 3.0.x work with clang 3.9, you'd have to backport a number of fixes from Apple's main development branch. I've tried this a couple of times, but unfortunately have yet to produce a successful build. Unfortunately, the developers have not tried to keep the 3.0 branch working with newer clang versions, so the work to fix it has not been backported.

Another option I've considered but haven't tried yet is to make a clang38 package that can be installed alongside the system clang, so you at least don't have to downgrade your existing clang just for compiling swift.

strikr commented on 2017-01-26 00:43

is there a workaround to build the package, without having to downgrade clang to 'clang=3.8.1' ?

Zrax commented on 2017-01-18 20:59

Hi @Tuetuopay: I've incorporated your patch. Thanks.

Tuetuopay commented on 2017-01-18 09:53

Here is a patch that implements commit 09cbffb. Without it, swift fails to compile. Is it possible to integrate it in the package ?
https://github.com/Tuetuopay/swift-language/commit/c8ec1ca310564531793785aea3459f874650a860

SuhairZain commented on 2017-01-16 19:55

Any way to build this package without downgrading clang and the associated tools?

Zrax commented on 2016-12-06 16:52

You can find the older packages in the Arch package archive:
https://archive.archlinux.org/packages/

tarasis commented on 2016-12-06 14:44

For those of us without an old version of clang hanging around, whats the easiest way to get 3.8.1 for building this package?

Zrax commented on 2016-11-23 22:17

Hmm, I had patched the preview releases (https://aur.archlinux.org/packages/swift-preview), but I don't remember encountering it here... Sorry about that; should be fixed now.

papodaca commented on 2016-11-23 21:54

Not sure how this has been working for everyone else but there is a typo in the build script of the 3.0.1 release and it is impossible to build for me.

Added a patch to fix the typo: https://github.com/papodaca/swift-language

Zrax commented on 2016-11-20 18:23

You'll need to downgrade the whole set (clang, llvm, llvm-libs, plus lib32-llvm-libs if you have it installed too). You can re-upgrade them after building swift, since the old version is only needed for building it.

efikarl commented on 2016-11-20 12:58

Help!

:: resolving dependencies...
:: no results found for clang=3.8.1

I can't downgrade to clang=3.8.1 because
:: clang: installing llvm-libs (3.8.1-1) breaks dependency 'llvm-libs=3.9.0-1'

Then, what should i do ?

Zrax commented on 2016-11-08 21:15

The current version of swift does not build successfully with clang 3.9, so you'll need to keep 3.8.1 installed (at least for now).

Xndr commented on 2016-11-08 19:56

Got this error:
not found: clang=3.8.1

any ideas?

Zrax commented on 2016-11-08 16:28

I've never used yaourt, but from looking at it, I believe the command you want is:
$ yaourt -S swift

edoardo849 commented on 2016-11-08 13:31

Hello! So I'm trying to install this package with

yaourt install swift-language

but it just exits and it doesn't seem to be listed anywhere in yaourt: can u pls advice on how to install?

Zrax commented on 2016-10-31 16:49

I'm afraid I've not yet been able to reproduce the Dispatch or SwiftGlibc issues you guys are seeing, but I can say that swift 3.0 doesn't appear to compile successfully with clang/llvm 3.9 yet. So for now the clang dependency is fixed at 3.8.1.

mafe commented on 2016-10-27 22:46

I was able to makepkg -sri once, when I had an old swift-bin AUR (2.1 I guess) installed.

After installation swift-bin package was dropped and I just tried to re-install via git instead of snapshot for update reasons.

Then the same error mentioned by jdarnold occured:
Foundation/NSData.swift:19:8: error: cannot load underlying module for 'Dispatch'
import Dispatch

Uninstalled both swift and swift-lldb via pacman and retried - same issue.

Now I'm building the (outdated) swift-bin AUR and try to reproduce behaviour.

kingtong commented on 2016-09-23 20:04

Got this error :

[546/579] Compiling /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/linux/x86_64/Glibc.o
FAILED: stdlib/public/Platform/linux/x86_64/Glibc.o lib/swift/linux/x86_64/Glibc.swiftmodule lib/swift/linux/x86_64/Glibc.swiftdoc
cd /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform && /usr/bin/cmake -E make_directory /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert
/swift-linux-x86_64/stdlib/public/Platform/linux/x86_64 && /usr/bin/cmake -E make_directory /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/linux/x86_64 && /home/n
icolas/builds/swift-language/src/swift/utils/line-directive /home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/Glibc.swift /home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/Pl
atform.swift /home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/TiocConstants.swift /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/8/
tgmath.swift -- /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/swiftc -c -sdk / -target x86_64-unknown-linux-gnu -resource-dir /home/nicolas/builds/swift-language/src/b
uild/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift -O -D INTERNAL_CHECKS_ENABLED -I /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/linux/x86_64 -module-cache
-path /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./module-cache -no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc -force-single-frontend-invocation
-parse-as-library -emit-module -emit-module-path /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/linux/x86_64/Glibc.swiftmodule -o /home/nicolas/builds/swift-langu
age/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/linux/x86_64/Glibc.o /home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/Glibc.swift /home/nicolas/builds/swift-languag
e/src/swift/stdlib/public/Platform/Platform.swift /home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/TiocConstants.swift /home/nicolas/builds/swift-language/src/build/Ninja-ReleaseAssert/swift-l
inux-x86_64/stdlib/public/Platform/8/tgmath.swift
/home/nicolas/builds/swift-language/src/swift/stdlib/public/Platform/Glibc.swift:13:19: error: no such module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
^
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().

jdarnold commented on 2016-09-21 17:57

yeah, I think I'm getting the same error as aavci:

Foundation/NSData.swift:19:8: error: cannot load underlying module for 'Dispatch'
import Dispatch
^
[125/315] CompileC: CoreFoundation/Parsing.subproj/CFXMLParser.c
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

which is annoying because it takes *forever* to build and then exit at this point.

aavci commented on 2016-09-17 12:07

Please help, I get the following error when trying to build:

+ mkdir -p /tmp/yaourt-tmp-aavci/aur-swift/src/build/Ninja-ReleaseAssert
+ env HOST_VARIABLE_linux_x86_64__SWIFT_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_RUN_BENCHMARK_TARGETS= HOST_VARIABLE_linux_x86_64__SWIFT_SDKS=LINUX HOST_VARIABLE_linux_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-linux-x86_64 HOST_VARIABLE_linux_x86_64__SWIFT_TEST_TARGETS= /tmp/yaourt-tmp-aavci/aur-swift/src/swift/utils/build-script-impl --workspace /tmp/yaourt-tmp-aavci/aur-swift/src --build-dir /tmp/yaourt-tmp-aavci/aur-swift/src/build/Ninja-ReleaseAssert --install-prefix /usr --host-target linux-x86_64 --stdlib-deployment-targets linux-x86_64 --host-cc /usr/bin/clang --host-cxx /usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/bin/cmake --cmark-build-type Release --llvm-build-type Release --swift-build-type Release --swift-stdlib-build-type Release --lldb-build-type Release --foundation-build-type Release --libdispatch-build-type Release --xctest-build-type Release --llvm-enable-assertions true --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/usr/bin/clang++' --build-args=-j4 --build-stdlib-deployment-targets all --ninja-bin=/usr/bin/ninja --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-swift --skip-test-cmark --skip-test-lldb --skip-test-llbuild --skip-test-swiftpm --skip-test-xctest --skip-test-foundation --skip-test-libdispatch --skip-test-playgroundlogger --skip-test-playgroundsupport --skip-test-linux --skip-test-freebsd --skip-test-cygwin --skip-test-osx --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --llvm-lit-args=-sv
the --build-dir option is required
Usage: build-script-impl [--help|-h] [ --SETTING=VALUE | --SETTING VALUE | --SETTING ]*

Available settings. Each setting corresponds to a variable,
obtained by upcasing its name, in this script. A variable
with no default listed here will be unset in the script if
not explicitly specified. A setting passed in the 3rd form
will set its corresponding variable to "1".

Setting Default Description
------- ------- -----------
--dry-run print the commands that would be executed, but do not execute them
--build-args arguments to the build tool; defaults to -j8 when CMake generator is "Unix Makefiles"
--build-dir out-of-tree build directory; default is in-tree. **This argument is required**
--host-cc the path to CC, the 'clang' compiler for the host platform. **This argument is required**
--host-cxx the path to CXX, the 'clang++' compiler for the host platform. **This argument is required**
--darwin-xcrun-toolchain default the name of the toolchain to use on Darwin
--ninja-bin the path to Ninja tool
--cmark-build-type Debug the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug.
--lldb-extra-cmake-args extra command line args to pass to lldb cmake
--lldb-extra-xcodebuild-args extra command line args to pass to lldb xcodebuild
--lldb-test-cc CC to use for building LLDB testsuite test inferiors. Defaults to just-built, in-tree clang. If set to 'host-toolchain', sets it to same as host-cc.
--lldb-test-with-curses run test lldb test runner using curses terminal control
--lldb-no-debugserver delete debugserver after building it, and don't try to codesign it
--lldb-use-system-debugserver don't try to codesign debugserver, and use the system's debugserver instead
--llvm-build-type Debug the CMake build variant for LLVM and Clang (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug.
--llvm-enable-assertions 1 enable assertions in LLVM and Clang
--swift-build-type Debug the CMake build variant for Swift
--swift-enable-assertions 1 enable assertions in Swift
--swift-analyze-code-coverage not-merged Code coverage analysis mode for Swift (false, not-merged, merged). Defaults to false if the argument is not present, and not-merged if the argument is present without a modifier.
--swift-tools-enable-lto enable LTO compilation of Swift tools. *NOTE* This does not include the swift standard library and runtime. Must be set to one of 'thin' or 'full'
--llvm-enable-lto Must be set to one of 'thin' or 'full'
--swift-tools-num-parallel-lto-link-jobs The number of parallel link jobs to use when compiling swift tools
--llvm-num-parallel-lto-link-jobs The number of parallel link jobs to use when compiling llvm
--swift-stdlib-build-type Debug the CMake build variant for Swift
--swift-stdlib-enable-assertions 1 enable assertions in Swift
--swift-stdlib-enable-resilience 0 build the Swift stdlib and overlays with resilience enabled
--swift-stdlib-sil-serialize-all 1 build the Swift stdlib and overlays with all method bodies serialized
--lldb-build-type Debug the CMake build variant for LLDB
--llbuild-build-type Debug the CMake build variant for llbuild
--foundation-build-type Debug the build variant for Foundation
--libdispatch-build-type Debug the build variant for libdispatch
--playgroundlogger-build-type Debug the build variant for PlaygroundLogger
--playgroundsupport-build-type Debug the build variant for PlaygroundSupport
--xctest-build-type Debug the build variant for xctest
--llbuild-enable-assertions 1 enable assertions in llbuild
--enable-asan enable Address Sanitizer
--cmake path to the cmake binary
--distcc use distcc in pump mode
--distcc-pump the path to distcc pump executable. This argument is required if distcc is set.
--build-runtime-with-host-compiler 1 use the host c++ compiler to build everything
--cmake-generator Unix Makefiles kind of build system to generate; see output of 'cmake --help' for choices
--verbose-build print the commands executed during the build
--install-prefix installation prefix
--toolchain-prefix the path to the .xctoolchain directory that houses the install prefix path
--install-destdir the path to use as the filesystem root for the installation
--install-symroot the path to install debug symbols into
--swift-install-components a semicolon-separated list of Swift components to install
--llvm-install-components a semicolon-separated list of LLVM components to install
--installable-package the path to the archive of the installation directory
--test-installable-package whether to run post-packaging tests on the produced package
--reconfigure force a CMake configuration run even if CMakeCache.txt already exists
--swift-primary-variant-sdk default SDK for target binaries
--swift-primary-variant-arch default arch for target binaries
--skip-build-cmark set to skip building CommonMark
--skip-build-llvm set to skip building LLVM/Clang
--skip-build-compiler-rt set to skip building Compiler-RT
--skip-build-swift set to skip building Swift
--skip-build-linux set to skip building Swift stdlibs for Linux
--skip-build-freebsd set to skip building Swift stdlibs for FreeBSD
--skip-build-cygwin set to skip building Swift stdlibs for Cygwin
--skip-build-osx set to skip building Swift stdlibs for OS X
--skip-build-ios-device set to skip building Swift stdlibs for iOS devices (i.e. build simulators only)
--skip-build-ios-simulator set to skip building Swift stdlibs for iOS simulators (i.e. build devices only)
--skip-build-tvos-device set to skip building Swift stdlibs for tvOS devices (i.e. build simulators only)
--skip-build-tvos-simulator set to skip building Swift stdlibs for tvOS simulators (i.e. build devices only)
--skip-build-watchos-device set to skip building Swift stdlibs for Apple watchOS devices (i.e. build simulators only)
--skip-build-watchos-simulator set to skip building Swift stdlibs for Apple watchOS simulators (i.e. build devices only)
--skip-build-android set to skip building Swift stdlibs for Android
--skip-build-lldb set to skip building LLDB
--skip-build-llbuild set to skip building llbuild
--skip-build-swiftpm set to skip building swiftpm
--skip-build-xctest set to skip building xctest
--skip-build-foundation set to skip building foundation
--skip-build-libdispatch set to skip building libdispatch
--skip-build-benchmarks set to skip building Swift Benchmark Suite
--skip-build-playgroundlogger set to skip building PlaygroundLogger
--skip-build-playgroundsupport set to skip building PlaygroundSupport
--skip-test-cmark set to skip testing CommonMark
--skip-test-lldb set to skip testing lldb
--skip-test-swift set to skip testing Swift
--skip-test-llbuild set to skip testing llbuild
--skip-test-swiftpm set to skip testing swiftpm
--skip-test-xctest set to skip testing xctest
--skip-test-foundation set to skip testing foundation
--skip-test-libdispatch set to skip testing libdispatch
--skip-test-playgroundlogger set to skip testing PlaygroundLogger
--skip-test-playgroundsupport set to skip testing PlaygroundSupport
--skip-test-linux set to skip testing Swift stdlibs for Linux
--skip-test-freebsd set to skip testing Swift stdlibs for FreeBSD
--skip-test-cygwin set to skip testing Swift stdlibs for Cygwin
--skip-test-osx set to skip testing Swift stdlibs for OS X
--skip-test-ios-simulator set to skip testing Swift stdlibs for iOS simulators (i.e. test devices only)
--skip-test-ios-host set to skip testing the host parts of the iOS toolchain
--skip-test-tvos-simulator set to skip testing Swift stdlibs for tvOS simulators (i.e. test devices only)
--skip-test-tvos-host set to skip testing the host parts of the tvOS toolchain
--skip-test-watchos-simulator set to skip testing Swift stdlibs for Apple watchOS simulators (i.e. test devices only)
--skip-test-watchos-host set to skip testing the host parts of the watchOS toolchain
--skip-test-android-host set to skip testing the host parts of the Android toolchain
--validation-test 0 set to run the validation test suite
--long-test 0 set to run the long test suite
--skip-test-benchmarks set to skip running Swift Benchmark Suite
--skip-test-optimized set to skip testing the test suite in optimized mode
--stress-test-sourcekit set to run the stress-SourceKit target
--workspace /home/aavci/src source directory containing llvm, clang, swift
--enable-llvm-assertions 1 set to enable llvm assertions
--build-llvm 1 set to 1 to build LLVM and Clang
--build-swift-tools 1 set to 1 to build Swift host tools
--build-swift-dynamic-stdlib set to 1 to build dynamic variants of the Swift standard library
--build-swift-static-stdlib set to 1 to build static variants of the Swift standard library
--build-swift-stdlib-unittest-extra 0 set to 1 to build optional StdlibUnittest components
--build-swift-dynamic-sdk-overlay set to 1 to build dynamic variants of the Swift SDK overlay
--build-swift-static-sdk-overlay set to 1 to build static variants of the Swift SDK overlay
--build-swift-examples 1 set to 1 to build examples
--build-swift-remote-mirror 1 set to 1 to build the Swift Remote Mirror library
--build-serialized-stdlib-unittest 0 set to 1 to build the StdlibUnittest module with -sil-serialize-all
--build-sil-debugging-stdlib 0 set to 1 to build the Swift standard library with -gsil to enable debugging and profiling on SIL level
--check-incremental-compilation 0 set to 1 to compile swift libraries multiple times to check if incremental compilation works
--llvm-include-tests 1 Set to true to generate testing targets for LLVM. Set to true by default.
--swift-include-tests 1 Set to true to generate testing targets for Swift. This allows the build to proceed when 'test' directory is missing (required for B&I builds)
--native-llvm-tools-path directory that contains LLVM tools that are executable on the build machine
--native-clang-tools-path directory that contains Clang tools that are executable on the build machine
--native-swift-tools-path directory that contains Swift tools that are executable on the build machine
--compiler-vendor none compiler vendor name [none,apple]
--clang-user-visible-version 3.8.0 user-visible version of the embedded Clang and LLVM compilers
--swift-user-visible-version 3.0 user-visible version of the Swift language
--swift-compiler-version string that indicates a compiler version for Swift
--clang-compiler-version string that indicates a compiler version for Clang
--embed-bitcode-section 0 embed an LLVM bitcode section in stdlib/overlay binaries for supported platforms
--darwin-crash-reporter-client whether to enable CrashReporter integration
--darwin-stdlib-install-name-dir the directory of the install_name for standard library dylibs
--install-cmark whether to install cmark
--install-swift whether to install Swift
--install-lldb whether to install LLDB
--install-llbuild whether to install llbuild
--install-swiftpm whether to install swiftpm
--install-xctest whether to install xctest
--install-foundation whether to install foundation
--install-libdispatch whether to install libdispatch
--install-playgroundlogger whether to install PlaygroundLogger
--install-playgroundsupport whether to install PlaygroundSupport
--darwin-install-extract-symbols whether to extract symbols with dsymutil during installations
--host-target The host target. LLVM, Clang, and Swift will be built for this target. The built LLVM and Clang will be used to compile Swift for the cross-compilation targets. **This argument is required**
--stdlib-deployment-targets space-separated list of targets to configure the Swift standard library to be compiled or cross-compiled for
--build-stdlib-deployment-targets all space-separated list that filters which of the configured targets to build the Swift standard library for, or 'all'
--cross-compile-hosts space-separated list of targets to cross-compile host Swift tools for
--cross-compile-with-host-tools set to use the clang we build for the host to then build the cross-compile hosts
--cross-compile-install-prefixes semicolon-separated list of install prefixes to use for the cross-compiled hosts. The list expands, so if there are more cross-compile hosts than prefixes, unmatched hosts use the last prefix in the list
--skip-merge-lipo-cross-compile-tools set to skip running merge-lipo after installing cross-compiled host Swift tools
--darwin-deployment-version-osx 10.9 minimum deployment target version for OS X
--darwin-deployment-version-ios 7.0 minimum deployment target version for iOS
--darwin-deployment-version-tvos 9.0 minimum deployment target version for tvOS
--darwin-deployment-version-watchos 2.0 minimum deployment target version for watchOS
--extra-cmake-options Extra options to pass to CMake for all targets
--extra-swift-args Extra arguments to pass to swift modules which match regex. Assumed to be a flattened cmake list consisting of [module_regexp, args, module_regexp, args, ...]
--sil-verify-all 0 If enabled, run the SIL verifier after each transform when building Swift files during this build process
--swift-enable-ast-verifier 1 If enabled, and the assertions are enabled, the built Swift compiler will run the AST verifier every time it is invoked
--swift-runtime-enable-leak-checker 0 Enable leaks checking routines in the runtime
--use-gold-linker Enable using the gold linker
--darwin-toolchain-bundle-identifier CFBundleIdentifier for xctoolchain info plist
--darwin-toolchain-display-name Display Name for xctoolcain info plist
--darwin-toolchain-display-name-short Display Name with out date for xctoolchain info plist
--darwin-toolchain-name Directory name for xctoolchain
--darwin-toolchain-version Version for xctoolchain info plist and installer pkg
--darwin-toolchain-application-cert Application Cert name to codesign xctoolchain
--darwin-toolchain-installer-cert Installer Cert name to create installer pkg
--darwin-toolchain-installer-package The path to installer pkg
--build-jobs The number of parallel build jobs to use
--darwin-toolchain-alias Swift alias for toolchain
--android-ndk An absolute path to the NDK that will be used as a libc implementation for Android builds
--android-api-level The Android API level to target when building for Android. Currently only 21 or above is supported
--android-ndk-gcc-version The GCC version to use when building for Android. Currently only 4.9 is supported
--android-icu-uc Path to a directory containing libicuuc.so
--android-icu-uc-include Path to a directory containing headers for libicuuc
--android-icu-i18n Path to a directory containing libicui18n.so
--android-icu-i18n-include Path to a directory containing headers libicui18n
--android-deploy-device-path Path on an Android device to which built Swift stdlib products will be deployed
--check-args-only set to check all arguments are known. Exit with status 0 if success, non zero otherwise
--common-cmake-options CMake options used for all targets, including LLVM/Clang
--user-config-args **Renamed to --extra-cmake-options**: User-supplied arguments to cmake when used to do configuration.
--only-execute all Only execute the named action (see implementation)
--llvm-lit-args If set, override the lit args passed to LLVM
--llvm-targets-to-build X86;ARM;AArch64;PowerPC;SystemZ The code generators that LLVM should build
--build-toolchain-only If set, only build the necessary tools to build an external toolchain

Note: when using the form --SETTING VALUE, VALUE must not begin
with a hyphen.
Note: the "--release" option creates a pre-packaged combination
of settings used by the buildbot.

Cross-compiling Swift host tools
When building cross-compiled tools, it first builds for the native
build host machine. Then it proceeds to build the specified cross-compile
targets. It currently builds the requested variants of stdlib each
time around, so once for the native build, then again each time for
the cross-compile tool targets.

When installing cross-compiled tools, it first installs each target
arch into a separate subdirectory under install-destdir, since you
can cross-compile for multiple targets at the same time. It then runs
recursive-lipo to produce fat binaries by merging the cross-compiled
targets, installing the merged result into the expected location of
install-destdir. After that, any remaining steps to extract dsyms and
create an installable package operates on install-destdir as normal.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
==> HATA: build() içinde bir hata oluştu.
Çıkılıyor...
==> HATA:makepkg 'i inşa edemedi.
==> swift yeniden inşa edilsin mi ? [e/H]
==> -------------------------------------
==>
::1 chai chai.localdomain localhost localhost.localdomain
s

Zrax commented on 2016-09-15 16:17

@walkindude: I've backported a fix for the XAR_CKSUM_SHA{256,512} issue.

walkindude commented on 2016-09-14 23:07

/home/walkindude/yaourt/yaourt-tmp-walkindude/aur-swift-lldb/src/llvm/tools/llvm-objdump/MachODump.cpp:5777:12: error: use of undeclared identifier 'XAR_CKSUM_SHA256'
case XAR_CKSUM_SHA256:
^
/home/walkindude/yaourt/yaourt-tmp-walkindude/aur-swift-lldb/src/llvm/tools/llvm-objdump/MachODump.cpp:5780:12: error: use of undeclared identifier 'XAR_CKSUM_SHA512'
case XAR_CKSUM_SHA512:
^
2 errors generated.
[2163/2212] Building CXX object tools/llvm-objdump/CMakeFiles/llvm-objdump.dir/llvm-objdump.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: Makepkg was unable to build swift-language.
==> Restart building swift-lldb ? [y/N]
==> -----------------------------------
==>

Zrax commented on 2016-09-14 15:33

It is assumed that base-devel is installed before building any AUR packages:
https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites

Therefore, AUR packages are not required to add any of those to their PKGBUILD

axs commented on 2016-09-14 12:07

Not exactly Swift-specific, but still:

makedepends += autoconf automake patch

May be helpful for those who try to build it on freshly installed systems.
Missing automake results in a particularly confusing error message:

Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.

Zrax commented on 2016-06-08 15:42

> lib/libswiftSema.a: No space left on device

LLVM (and by extension Swift) needs a fairly large amount of disk space available in order to compile... If you have a larger partition, you might try building from there instead, or you might try cleaning up other builds to make more space.

xged commented on 2016-06-08 14:10

lib/libswiftSema.a: No space left on device
[223/509] Building CXX object lib/Serialization/CMakeFiles/swiftSerialization.dir/Deserialization.cpp.o
ninja: build stopped: subcommand failed.

Zrax commented on 2016-05-19 23:03

Those are just warnings; to get the actual error, you may have to scroll back further in the build output / log.

ltorvalds024 commented on 2016-05-19 10:56

cannot install, getting this error:

In file included from /home/edward/Downloads/makepkg/swift-language/src/llvm/utils/unittest/googletest/src/gtest-all.cc:46:
/home/edward/Downloads/makepkg/swift-language/src/llvm/utils/unittest/googletest/src/gtest-printers.cc:348:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if GTEST_HAS_STD_WSTRING
^
/home/edward/Downloads/makepkg/swift-language/src/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h:362:91: note: expanded from macro 'GTEST_HAS_STD_WSTRING'
(!(GTEST_OS_LINUX_ANDROID || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || GTEST_OS_HAIKU || defined(_MINIX)))
^
16 warnings generated.
ninja: build stopped: subcommand failed.
utils/build-script: command terminated with a non-zero exit status 1, aborting

Zrax commented on 2016-04-21 21:07

pod2man should be provided by perl... What version of perl do you have?

rainbyte commented on 2016-04-21 05:49

I've got the same error about pod2man, as described by @nlamirault

walkindude commented on 2016-04-19 23:21

@awerush
https://bugs.swift.org/browse/SR-557
try:

cd "$srcdir/swift"
export LD_LIBRARY_PATH=''
export SWIFT_SOURCE_ROOT="$srcdir"

awerush commented on 2016-04-14 17:39

Build failed due to failed test:

+ /usr/bin/python2.7 /tmp/yaourt-tmp-arash/aur-swift/src/llvm/utils/lit/lit.py -sv --xunit-xml-output=/tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu/lit-tests.xml /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64
lit.py: lit.cfg:209: note: using swift: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift
lit.py: lit.cfg:209: note: using swiftc: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc
lit.py: lit.cfg:209: note: using sil-opt: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/sil-opt
lit.py: lit.cfg:209: note: using sil-extract: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/sil-extract
lit.py: lit.cfg:209: note: using lldb-moduleimport-test: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/lldb-moduleimport-test
lit.py: lit.cfg:209: note: using swift-ide-test: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift-ide-test
lit.py: lit.cfg:209: note: using clang: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/clang
lit.py: lit.cfg:209: note: using llvm-link: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/llvm-link
lit.py: lit.cfg:209: note: using swift-llvm-opt: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift-llvm-opt
lit.py: lit.cfg:249: note: Using resource dir: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/lib/swift
lit.py: lit.cfg:275: note: Using Clang module cache: /tmp/swift-testsuite-clang-module-cachetvQ8IF
lit.py: lit.cfg:279: note: Using code completion cache: /tmp/swift-testsuite-completion-cacheKTrzIR
lit.py: lit.cfg:575: note: Testing Linux x86_64-unknown-linux-gnu
lit.py: lit.cfg:209: note: using swift-autolink-extract: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift-autolink-extract
lit.py: lit.cfg:711: note: Using platform module dir: /tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/lib/swift/%target-sdk-name/x86_64
FAIL: Swift :: Driver/environment.swift (495 of 2464)
******************** TEST 'Swift :: Driver/environment.swift' FAILED ********************
Script:
--
env SDKROOT= '/tmp/yaourt-tmp-arash/aur-swift/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swift' -module-cache-path '/tmp/swift-testsuite-clang-module-cachetvQ8IF' -target x86_64-unknown-gnu-linux -L/foo/ -driver-use-frontend-path /tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/Inputs/print-var.sh /tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/environment.swift LD_LIBRARY_PATH | FileCheck /tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/environment.swift
--
Exit Code: 1

Command Output (stderr):
--
/tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/environment.swift:5:11: error: expected string not found in input
// CHECK: {{^/foo/:[^:]+/lib/swift/linux$}}
^
<stdin>:1:1: note: scanning from here
/foo/:/tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/lib/swift/linux::/home/arash/glc/lib64:/home/arash/glc/lib32
^
<stdin>:1:64: note: possible intended match here
/foo/:/tmp/yaourt-tmp-arash/aur-swift/src/swift-swift-2.2-RELEASE/test/Driver/lib/swift/linux::/home/arash/glc/lib64:/home/arash/glc/lib32
^

--

********************
Testing Time: 112.64s
********************
Failing Tests (1):
Swift :: Driver/environment.swift

Expected Passes : 1778
Expected Failures : 76
Unsupported Tests : 609
Unexpected Failures: 1
*** Failed while running tests for swift (check-swift-linux-x86_64)
utils/build-script: command terminated with a non-zero exit status 1, aborting
==> ERROR: A failure occurred in check().
Aborting...
==> ERROR: Makepkg was unable to build swift-language.
==> Restart building swift ? [y/N]
==> ------------------------------

nlamirault commented on 2016-03-01 12:44

I've got an error during installation :

$ yaourt -Sy swift
[...]
==> swift-language dependencies:
- python2 (already installed)
- libutil-linux (already installed)
- icu (already installed)
- libbsd (already installed)
- libedit (already installed)
- libxml2 (already installed)
- sqlite (already installed)
- ncurses (already installed)
- git (already installed) [makedepend]
- cmake (already installed) [makedepend]
- ninja (already installed) [makedepend]
- swig (already installed) [makedepend]
- clang>=3.6 (already installed) [makedepend]
- python2-six (already installed) [makedepend]
[...]
==> Retrieving sources...
-> Downloading swift-2.2-SNAPSHOT-2016-02-08-a.tar.gz...
[...]
-- Found ICU: /usr/include
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.11")
CMake Error at cmake/modules/SwiftManpage.cmake:23 (message):
Need pod2man installed to generate man page
Call Stack (most recent call first):
docs/tools/CMakeLists.txt:3 (manpage)

==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build swift-language.

Same error trying :

sudo ln -s /usr/bin/core_perl/pod2man /usr/bin/

Zrax commented on 2016-01-18 19:04

Ok, added

Ahti333 commented on 2016-01-18 16:16

It would be nice if this package could also install bin/swift-ide-test, which is built alongside swift.