Package Details: swift-language 5.6.2-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://swift.org/
Licenses: Apache2
Provides: swift-language
Submitter: Zrax
Maintainer: soloturn (fanjiang, refi.64, spacecowgirl, medzik)
Last Packager: soloturn
Votes: 42
Popularity: 0.81
First Submitted: 2016-01-08 23:39 (UTC)
Last Updated: 2022-07-05 06:56 (UTC)

Pinned Comments

soloturn commented on 2020-09-06 22:25 (UTC) (edited on 2021-06-12 17:51 (UTC) by soloturn)

options to install a binary swift are currently two flavors of swift-5.4.1, and one latest from git:

Latest Comments

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.

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.

fanjiang commented on 2021-06-10 03:51 (UTC)

@soloturn Could you add me as maintainer here? I don't have push access to the repo (or I can put the diff here)

fanjiang commented on 2021-06-10 03:48 (UTC)

I compiled the latest release on GCE. Here is the prebuilt binary:

https://github.com/ProfFan/swift-aur/releases/download/5.4.1/swift-language-5.4-1-x86_64.pkg.tar.zst

I will also push some changes to make the build go through here.

soloturn commented on 2021-02-04 15:16 (UTC)

hi fanjiang, did so, and granted you access as well to commit, one package is uploaded already: https://github.com/soloturn/swift-aur/releases/tag/latest

hope it will not hit the 6h build timeout too often fingers crossed

fanjiang commented on 2021-01-03 21:03 (UTC)

Hi soloturn,

I tried your builds on GitHub actions today and I found out that the REPL does not work.

This is due to makepkg stripping out the symbols: https://forums.swift.org/t/failed-to-resolve-repl-breakpoint/761

Could you change the PKGBUILD to skip stripping?

Best,

soloturn commented on 2020-09-19 09:18 (UTC) (edited on 2020-09-19 09:34 (UTC) by soloturn)

thanks for the hint! i copied now the dependencies from https://aur.archlinux.org/packages/swift-language-git and no diagnostics any more.

freswa commented on 2020-09-17 21:59 (UTC)

Please use python-diagnostics as a depend/makedepend and remove L49. Thank you

elgs commented on 2020-09-15 09:20 (UTC)

Why does Swift have so many Python dependencies?

soloturn commented on 2020-09-06 22:25 (UTC) (edited on 2021-06-12 17:51 (UTC) by soloturn)

options to install a binary swift are currently two flavors of swift-5.4.1, and one latest from git:

soloturn commented on 2020-08-14 02:37 (UTC) (edited on 2020-08-14 05:13 (UTC) by soloturn)

i did create one at llvm: https://bugs.llvm.org/show_bug.cgi?id=47163

it is not considered a bug in swift: https://bugs.swift.org/browse/SR-13082

it happens when compiling compiler-rt with llvm, at least on arch linux, but it is not considered a bug in arch: https://bugs.archlinux.org/task/67518

fanjiang commented on 2020-08-11 17:14 (UTC)

Hi @soloturn,

did you try to submit the issue to the Arch bug tracker for compiler_rt and stuff?

fanjiang commented on 2020-07-06 21:01 (UTC)

That is great :)

soloturn commented on 2020-07-06 19:29 (UTC)

i created a continues build now on github which should build it once a day: https://github.com/soloturn/swift-aur/actions

fanjiang commented on 2020-07-06 16:40 (UTC) (edited on 2020-07-06 18:43 (UTC) by fanjiang)

@soloturn I managed to go pass SR-13083 with the following patch:

build() {
     cd "$srcdir/swift"


     # By default in /etc/makepkg.conf this is "-D_FORTIFY_SOURCE=2"
     # Which will break `compiler-rt`
     unset CPPFLAGS
     unset CFLAGS
     unset CXXFLAGS
     unset LDFLAGS

     export SWIFT_SOURCE_ROOT="$srcdir"
     export PATH="$PATH:/usr/bin/core_perl"
     utils/build-script -R "${_common_build_params[@]}"

EDIT: I got it to compile, but it still failed at building SwiftPM.

soloturn commented on 2020-07-05 10:07 (UTC) (edited on 2020-07-05 10:19 (UTC) by soloturn)

thanks for testing this fanjiang, i added you as contributor to swift, and swift-language-git. i do not get this error with the git version and do report bugs in the hope we get a working version in a couple of months.

with 5.3-DEVELOPMENT i get: https://bugs.swift.org/browse/SR-13083

fanjiang commented on 2020-07-04 21:50 (UTC)

Failed in:

/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:14:19: error: unknown type name 'uint8_t'
enum Qualifiers : uint8_t {
                  ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:25:27: error: unknown type name 'uint8_t'
enum class StorageClass : uint8_t {
                          ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:38:26: error: unknown type name 'uint8_t'
enum class CallingConv : uint8_t {
                         ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:51:28: error: unknown type name 'uint8_t'
enum class ReferenceKind : uint8_t { None, LValueRef, RValueRef };
                           ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:90:36: error: unknown type name 'uint8_t'
enum class IntrinsicFunctionKind : uint8_t {
                                   ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:181:18: error: unknown type name 'uint16_t'
enum FuncClass : uint16_t {
                 ^
/home/fan/AUR/swift-language/src/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h:239:8: error: no type named 'string' in namespace 'std'

No idea what is happening...

gwpl commented on 2020-06-22 22:43 (UTC)

swig3 dependency not available

fanjiang commented on 2020-05-03 17:15 (UTC)

Anybody here with the error in libdispatch?

/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:121:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case DISPATCH_TIME_NOW:
        ^
/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:121:2: note: insert '__attribute__((fallthrough));' to silence this warning
        case DISPATCH_TIME_NOW:
        ^
        __attribute__((fallthrough));
/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:121:2: note: insert 'break;' to avoid fall-through
        case DISPATCH_TIME_NOW:
        ^
        break;
/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:131:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
        case DISPATCH_TIME_FOREVER:
        ^
/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:131:2: note: insert '__attribute__((fallthrough));' to silence this warning
        case DISPATCH_TIME_FOREVER:
        ^
        __attribute__((fallthrough));
/home/fan/AUR/swift-language/src/swift-corelibs-libdispatch/src/semaphore.c:131:2: note: insert 'break;' to avoid fall-through
        case DISPATCH_TIME_FOREVER:
        ^
        break;

varagrawal commented on 2020-04-21 01:15 (UTC)

Can we please update the package with the correct checksum?

LaberLu commented on 2020-03-28 10:05 (UTC)

The checksum for the swift-package-manager-5.1.5 is incorrect. sed -i s/24384389af1edba64b2abc08e3a19f949b95ac2ece3099da1d8bda89ffe780fb/073df9514e7ae9a4226af00b79ce8a79ab068ad491b46f7cae4bd23fbd72bb24/ PKGBUILD fixes it.

jamesth commented on 2020-03-17 19:42 (UTC)

I'm no expert, but it seems that the downstream fedora package has been updated to v 5.1.5, so the PKGBUILD is not working. Can you update the PKGBUILD file when you have a few mins please?

yurikoles commented on 2019-12-06 14:15 (UTC)

Warning, treated as error:
/home/yurikoles/.cache/yay/swift-language/src/swift/docs/ABI/Mangling.rst:708:Unknown target name: "0".
[949/993][ 95%][199.394s] Compiling /home/yurikoles/.cache/yay/s...ssert/swift-linux-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

FirstAirBender commented on 2019-12-05 07:19 (UTC)

@Zrax Thanks for the patch. I have finally been able to install it

Zrax commented on 2019-12-03 01:12 (UTC)

Thanks, I've added the Python 3.8 fix

joekiller commented on 2019-12-02 15:45 (UTC)

The problem is that the normalize test doesn't support python3.8.

See https://github.com/commonmark/cmark/commit/68c3a91166347a32a57fb81223750a63cfd92105

FirstAirBender commented on 2019-12-02 01:35 (UTC) (edited on 2019-12-02 01:36 (UTC) by FirstAirBender)

Keeps failing at the test stage:

[0/1][  0%][0.000s] Running tests...
Test project /home/chigozirim/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/cmark-linux-x86_64
    Start 1: api_test
1/9 Test #1: api_test .........................   Passed    0.00 sec
    Start 2: html_normalization
2/9 Test #2: html_normalization ...............***Failed    0.12 sec
    Start 3: spectest_library
3/9 Test #3: spectest_library .................   Passed    0.11 sec
    Start 4: pathological_tests_library
4/9 Test #4: pathological_tests_library .......   Passed    0.75 sec
    Start 5: roundtriptest_library
5/9 Test #5: roundtriptest_library ............***Failed    0.12 sec
    Start 6: entity_library
6/9 Test #6: entity_library ...................   Passed    0.09 sec
    Start 7: spectest_executable
7/9 Test #7: spectest_executable ..............   Passed    0.62 sec
    Start 8: smartpuncttest_executable
8/9 Test #8: smartpuncttest_executable ........   Passed    0.11 sec
    Start 9: regressiontest_executable
9/9 Test #9: regressiontest_executable ........   Passed    0.10 sec

78% tests passed, 2 tests failed out of 9

Total Test time (real) =   2.03 sec

The following tests FAILED:
      2 - html_normalization (Failed)
      5 - roundtriptest_library (Failed)
Errors while running CTest
FAILED: CMakeFiles/test.util 
cd /home/chigozirim/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/cmark-linux-x86_64 && /usr/bin/ctest --force-new-ctest-process
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 check().
    Aborting...
Error making: swift-language (swift)

Any suggestions?

Zrax commented on 2019-12-01 19:14 (UTC)

@eagleflo Not sure what happened, but a fresh build confirms your checksum, so I've updated it to match... Thanks

eagleflo commented on 2019-12-01 14:08 (UTC)

The SHA sum for swift-5.1.2-RELEASE.tar.gz was off for me.

$ shasum -a 256 swift-5.1.2-RELEASE.tar.gz 
ad7f569ca505f349b4e499ed781f53030afe068644c72e76a5d6fbb7b5b80b86  swift-5.1.2-RELEASE.tar.gz

cparrott73 commented on 2019-10-08 19:32 (UTC) (edited on 2019-10-09 06:23 (UTC) by cparrott73)

Just tried to build swift 5.1-1, and I ran into a different error:

--- bootstrap: note: building stage1
Compiling libc.c
Compiling Swift Module 'PackageDescription4' (10 sources)
clang-8: warning: argument unused during compilation: '-fmodules-cache-path=/home/pacman/aur/swift-language/src/build/Ninja-ReleaseAssert/swiftpm-linux-x86_64/.bootstrap/ModuleCache' [-Wunused-command-line-argument]
Linking clibc
Compiling Swift Module 'SPMLibc' (1 sources)
Linking SPMLibc
Compiling Swift Module 'Basic' (40 sources)
Linking PackageDescription4
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:328:59: error: value of optional type 'UnsafeMutablePointer<Int8>?' must be unwrapped to a value of type 'UnsafeMutablePointer<Int8>'
        posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
                                                          ^
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:328:59: note: coalesce using '??' to provide a default when the optional value contains 'nil'
        posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
                                                          ^
                                                                  ?? <#default value#>
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:328:59: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
        posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
                                                          ^
                                                                 !
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:351:54: error: value of optional type 'UnsafeMutablePointer<Int8>?' must be unwrapped to a value of type 'UnsafeMutablePointer<Int8>'
        let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
                                                     ^
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:351:54: note: coalesce using '??' to provide a default when the optional value contains 'nil'
        let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
                                                     ^
                                                         ?? <#default value#>
/home/pacman/aur/swift-language/src/swiftpm/Sources/Basic/Process.swift:351:54: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
        let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
                                                     ^
                                                        !
--- bootstrap: error: build failed with exit status 1
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
==> ERROR: A failure occurred in build().
    Aborting...

Any ideas?

EDIT: I seem to have fixed the compile error by modifying src/swiftpm/Sources/Basic/Process.swift:

--- Process.swift.orig  2019-10-08 13:36:31.053125481 -0700
+++ Process.swift       2019-10-08 13:26:17.278207101 -0700
@@ -325,7 +325,7 @@
         let devNull = strdup("/dev/null")
         defer { free(devNull) }
         // Open /dev/null as stdin.
-        posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
+        posix_spawn_file_actions_addopen(&fileActions, 0, devNull!, O_RDONLY, 0)

         var outputPipe: [Int32] = [0, 0]
         var stderrPipe: [Int32] = [0, 0]
@@ -348,7 +348,7 @@

         let argv = CStringArray(arguments)
         let env = CStringArray(environment.map({ "\($0.0)=\($0.1)" }))
-        let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
+        let rv = posix_spawnp(&processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray)

         guard rv == 0 else {
             throw SystemError.posix_spawn(rv, arguments)

Not sure if this is the correct/preferred solution, but it worked for me.

EDIT 2: similar fix for failing test in src/swift/test/stdlib/POSIX.swift:

--- POSIX.swift.orig    2019-10-08 13:45:28.987050875 -0700
+++ POSIX.swift 2019-10-08 13:39:31.728895278 -0700
@@ -69,7 +69,7 @@
   let sem = sem_open(semaphoreName, O_CREAT, 0o777, 1)
   expectNotEqual(SEM_FAILED, sem)

-  let res = sem_close(sem)
+  let res = sem_close(sem!)
   expectEqual(0, res)

   let res2 = sem_unlink(semaphoreName)
@@ -83,7 +83,7 @@
   let sem = sem_open(semaphoreName, O_CREAT | O_EXCL, 0o777, 1)
   expectNotEqual(SEM_FAILED, sem)

-  let res = sem_close(sem)
+  let res = sem_close(sem!)
   expectEqual(0, res)

   let res2 = sem_unlink(semaphoreName)
@@ -102,7 +102,7 @@
   // difficult.
   expectNotEqual(SEM_FAILED, sem2)

-  let res = sem_close(sem)
+  let res = sem_close(sem!)
   expectEqual(0, res)

   let res2 = sem_unlink(semaphoreName)
@@ -120,7 +120,7 @@
   expectEqual(SEM_FAILED, sem2)
   expectEqual(EEXIST, errno)

-  let res = sem_close(sem)
+  let res = sem_close(sem!)
   expectEqual(0, res)

   let res2 = sem_unlink(semaphoreName)

n00b3 commented on 2019-09-29 18:39 (UTC)

any suggestions how to trace back this error. Issued command in swift-language dir: makepkg -si

Warning, treated as error: /home/adones/tarballs/swift-language/src/swift/docs/ABI/Mangling.rst:708:Unknown target name: "0". [934/979][ 95%][1835.321s] Compiling /home/adones/tarballs/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-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...

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

imkerberos commented on 2019-05-21 06:47 (UTC) (edited on 2019-05-21 11:52 (UTC) by imkerberos)

AIL: Swift(linux-x86_64) :: Runtime/linux-fatal-backtrace.swift (2736 of 4876)
******************** TEST 'Swift(linux-x86_64) :: Runtime/linux-fatal-backtrace.swift' FAILED ********************
Script:
--
: 'RUN: at line 1';   rm -rf "/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/Runtime/Output/linux-fatal-backtrace.swift.tmp" && mkdir -p "/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/Runtime/Output/linux-fatal-backtrace.swift.tmp"
: 'RUN: at line 2';   /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc -target x86_64-unknown-linux-gnu  -module-cache-path '/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -swift-version 4   /home/kerberos/.cache/yay/swift-language/src/swift/test/Runtime/linux-fatal-backtrace.swift -o /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/Runtime/Output/linux-fatal-backtrace.swift.tmp/a.out
: 'RUN: at line 3';   not --crash /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/Runtime/Output/linux-fatal-backtrace.swift.tmp/a.out 2>&1 | PYTHONPATH=/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/lldb-linux-x86_64/lib/python2.7/site-packages /home/kerberos/.cache/yay/swift-language/src/swift/utils/symbolicate-linux-fatal /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64/Runtime/Output/linux-fatal-backtrace.swift.tmp/a.out - | /home/kerberos/.cache/yay/swift-language/src/swift/utils/backtrace-check -u
--
Exit Code: 1

Command Output (stderr):
--
Traceback (most recent call last):
  File "/home/kerberos/.cache/yay/swift-language/src/swift/utils/symbolicate-linux-fatal", line 32, in <module>
    import lldb
  File "/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/lldb-linux-x86_64/lib/python2.7/site-packages/lldb/__init__.py", line 1499, in <module>
    class SBAddress(object):
  File "/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/lldb-linux-x86_64/lib/python2.7/site-packages/lldb/__init__.py", line 1665, in SBAddress
    __swig_getmethods__["module"] = GetModule
NameError: name '__swig_getmethods__' is not defined
Traceback (most recent call last):
  File "/home/kerberos/.cache/yay/swift-language/src/swift/utils/backtrace-check", line 84, in <module>
    main()
  File "/home/kerberos/.cache/yay/swift-language/src/swift/utils/backtrace-check", line 80, in main
    assert(found_stack_trace_entry)
AssertionError

--

********************
Testing Time: 645.13s
********************
Failing Tests (1):
    Swift(linux-x86_64) :: Runtime/linux-fatal-backtrace.swift

  Expected Passes    : 3613
  Expected Failures  : 43
  Unsupported Tests  : 1219
  Unexpected Failures: 1

4 warning(s) in tests.
FAILED: test/CMakeFiles/check-swift-linux-x86_64 
cd /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test && /usr/bin/cmake -E remove_directory /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu && /usr/bin/cmake -E make_directory /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu && /usr/bin/python2.7 /home/kerberos/.cache/yay/swift-language/src/llvm/utils/lit/lit.py --incremental -sv --xunit-xml-output=/home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu/lit-tests.xml --param swift_test_subset=primary --param swift_test_mode=optimize_none /home/kerberos/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64
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 check().
    Aborting...
Error making: swift-language (swift swift-lldb)

adsun commented on 2019-05-16 13:06 (UTC)

I tested with version 5.0.1 and can confirm sourcekit (libsourcekitdInProc.so) now builds successfully.

kirillbobyrev commented on 2019-04-05 18:56 (UTC) (edited on 2019-04-05 18:56 (UTC) by kirillbobyrev)

diffutils should be included in the dependencies: I tried building Swift without it and the build caught a fatal error:

FAILED: test/CMakeFiles/check-swift-linux-x86_64
cd /home/kirillbobyrev/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test && /usr/bin/cmake -E remove_directory /home/kirillbobyrev/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./s
wift-test-results/x86_64-unknown-linux-gnu && /usr/bin/cmake -E make_directory /home/kirillbobyrev/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unknown-linux-gnu && /usr/bin/python2
.7 /home/kirillbobyrev/.cache/yay/swift-language/src/llvm/utils/lit/lit.py --incremental -sv --xunit-xml-output=/home/kirillbobyrev/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/./swift-test-results/x86_64-unkn
own-linux-gnu/lit-tests.xml --param swift_test_subset=primary --param swift_test_mode=optimize_none /home/kirillbobyrev/.cache/yay/swift-language/src/build/Ninja-ReleaseAssert/swift-linux-x86_64/test-linux-x86_64
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 check().
    Aborting...

Zrax commented on 2019-03-14 15:45 (UTC)

@cipi1965: pkgconf is already part of base-devel. See https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites .

cipi1965 commented on 2019-03-14 09:49 (UTC)

Please add pkg-config to make dependencies

Zrax commented on 2018-11-28 02:13 (UTC)

@zaytoven: libblocksruntime is another AUR package (https://aur.archlinux.org/packages/libblocksruntime), so you'll need to build/install it first, before building swift.

commented on 2018-11-28 02:10 (UTC)

@Zrax fair enough... I'm new so I will need some guidance... I see another error.. ERROR: 'pacman' failed to install missing dependencies. happens after not finding libblocksruntime. Steps to reproduce 1. git clone <https://aur.archlinux.org/swift-language.git> && cd swift-language && makepkg -sic.

EDIT: fix: git clone path/to/libblocksruntime.git libblockruntime-repo && cd $_ && makepkg -sic && cd ../ then git clone <https://aur.archlinux.org/swift-language.git> && cd swift-language && makepkg -sic

segabor commented on 2018-11-19 09:33 (UTC)

@zaytoven What you posted is a CPP compilation error that has nothing to do with Swift. I suppose you're trying to build Trolltech QT with Swift support. The error itself shows a QT / CPP specific build error.

Zrax commented on 2018-11-19 01:09 (UTC)

@zaytoven: I believe you're looking for https://aur.archlinux.org/packages/swift-im/ (this package is for the Swift programming language compiler)

commented on 2018-11-18 02:18 (UTC)

I cannot build and action aborts due to some file in Swift/QtUI/UserSearch folder. I get

In file included from Swift/QtUI/UserSearch/moc_QtUserSearchWindow.cc:9:
Swift/QtUI/UserSearch/QtUserSearchWindow.h:94:13: error: 'QAbstractItemModel' does not name a type; did you mean 'QAbstractButton'?
             QAbstractItemModel* model_;
             ^~~~~~~~~~~~~~~~~~
             QAbstractButton
  MOC Swift/QtUI/moc_QtContactEditWidget.cc
  MOC Swift/QtUI/moc_QtContactEditWindow.cc
  MOC Swift/QtUI/moc_QtEditBookmarkWindow.cc
  CXX Swift/QtUI/moc_QtContactEditWidget.o
In file included from Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:7:
./Swift/QtUI/UserSearch/QtUserSearchWindow.h:94:13: error: 'QAbstractItemModel' does not name a type; did you mean 'QAbstractButton'?
             QAbstractItemModel* model_;
             ^~~~~~~~~~~~~~~~~~
             QAbstractButton
  CXX Swift/QtUI/moc_QtContactEditWindow.o
scons: *** [Swift/QtUI/UserSearch/moc_QtUserSearchWindow.o] Error 1
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In constructor 'Swift::QtUserSearchWindow::QtUserSearchWindow(Swift::UIEventStream*, Swift::UserSearchWindow::Type, const std::set<std::__cxx11::basic_string<char> >&, Swift::SettingsProvider*)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:37:212: error: class 'Swift::QtUserSearchWindow' does not have any field named 'model_'
 e type, const std::set<std::string>& groups, SettingsProvider* settingsProvider) : eventStream_(eventStream), type_(type), model_(nullptr), firstPage_(nullptr), firstMultiJIDPage_(nullptr), settings_(settingsProvider), searchNext_(false), supportsImpromptu_(false) {
                                                                                                                            ^~~~~~

Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In destructor 'virtual Swift::QtUserSearchWindow::~QtUserSearchWindow()':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:75:12: error: 'model_' was not declared in this scope
     delete model_;
            ^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:75:12: note: suggested alternative: 'mode_t'
     delete model_;
            ^~~~~~
            mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'Swift::JID Swift::QtUserSearchWindow::getContactJID() const':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:282:44: error: 'model_' was not declared in this scope
         if (dynamic_cast<UserSearchModel*>(model_)) {
                                            ^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:282:44: note: suggested alternative: 'mode_t'
         if (dynamic_cast<UserSearchModel*>(model_)) {
                                            ^~~~~~
                                            mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:287:63: error: cannot dynamic_cast 'model_' (of type '<type error>') to type 'class Swift::QtFormResultItemModel*' (source is not a pointer)
         } else if (dynamic_cast<QtFormResultItemModel*>(model_)) {
                                                               ^
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:290:78: error: cannot dynamic_cast 'model_' (of type '<type error>') to type 'class Swift::QtFormResultItemModel*' (source is not a pointer)
             Form::FormItem item = dynamic_cast<QtFormResultItemModel*>(model_)->getForm()->getItems().at(row);
                                                                              ^
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::setResults(const std::vector<Swift::UserSearchResult>&)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:488:12: error: 'model_' was not declared in this scope
     delete model_;
            ^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:488:12: note: suggested alternative: 'mode_t'
     delete model_;
            ^~~~~~
            mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::setResultsForm(Swift::Form::ref)':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:505:12: error: 'model_' was not declared in this scope
     delete model_;
            ^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:505:12: note: suggested alternative: 'mode_t'
     delete model_;
            ^~~~~~
            mode_t
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp: In member function 'virtual void Swift::QtUserSearchWindow::clear()':
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:613:12: error: 'model_' was not declared in this scope
     delete model_;
            ^~~~~~
Swift/QtUI/UserSearch/QtUserSearchWindow.cpp:613:12: note: suggested alternative: 'mode_t'
     delete model_;
            ^~~~~~

any idea how to fix this? thx

segabor commented on 2018-11-13 11:16 (UTC) (edited on 2018-11-13 11:39 (UTC) by segabor)

Build is broken since the advent of Clang 7.0.

Bug ticket: https://bugs.swift.org/browse/SR-8958 Official patch: https://github.com/apple/swift/pull/16372

So either package must stick to Clang 6.0 or source must be patched.

Tidinho commented on 2018-11-03 14:39 (UTC)

Swift 4.2.1 was released the October 30, 2018.

segabor commented on 2018-09-07 07:31 (UTC)

adsun: compiler-rt project must be patched because ustat.h was removed by a recent GCC release. It has nothing to do with libsourcekit lib. Patch can be found here: https://github.com/llvm-mirror/compiler-rt/commit/521935db9de17ad08748fd050137ac83b7734835#diff-20ab94538eaf37f6c17b98229dfa7d7c

I slightly updated Swift build for Arch Linux, now I have a working 4.2-dev binary set. Steps are detailed here: https://gist.github.com/segabor/cd08eae2ce8717a1e4f8476687d98221

fenuks commented on 2018-09-06 23:36 (UTC)

I think package is missing libsourcekitdInProc.so. swift-bin has it, and it's required by sourcekitten.

adsun commented on 2018-08-09 10:50 (UTC)

Swift now fails to build because it currently requires the /usr/include/sys/ustat.h header, which was removed with glibc 2.28.

fennectech commented on 2018-03-01 18:31 (UTC)

Package fills the temp partition.

trustin commented on 2018-02-28 12:05 (UTC) (edited on 2018-02-28 13:16 (UTC) by trustin)

Builds just fine for me. Looking forward to the sourcekit support! (.. and maybe sourcekiten as well?)

adsun commented on 2018-02-23 12:49 (UTC)

@RemoteAdmin: That's unexpected. I successfully built swift in a clean chroot without any problems. Are you building in a clean chroot? If not, try that to see if the check function succeeds.

RemoteAdmin commented on 2018-02-23 07:55 (UTC)

Does the build still work for you @Zrax

For me, it currently fails in the check function saying

/builds/aur-archlinux/swift-language/src/swift-swift-4.0.3-RELEASE/utils/build-script-impl: line 2917: /bin/sh: Argument list too long
*** Failed while running tests for swift (check-swift-linux-x86_64)
./utils/build-script: fatal error: command terminated with a non-zero exit status 126, aborting
==> ERROR: A failure occurred in check().
    Aborting...

I had a look at the mentioned line but it doesn't make sense to me. https://github.com/apple/swift/blob/master/utils/build-script-impl#L2917

tierriminator commented on 2017-12-27 21:30 (UTC)

My issue below seemed to be a issue of apacman, not of this package. The package builds and installs fine without a helper.

tierriminator commented on 2017-12-15 03:35 (UTC)

Thanks for the upgrade. However for me it doesn't seem to install properly. Everything builds fine and no error is thrown, but after installation, it does not seem that the swift package is installed. Therefore when swift-lldb tries to install, it fails, because the dependencies are not resolved.

Zrax commented on 2017-10-31 00:50 (UTC)

Yeah, I'm aware it needs an update... I've had some difficulty getting sourcekit linking correctly since this build, so I may end up disabling it for now. But I also haven't had much time to work on it recently. Sorry for the delay.

tierriminator commented on 2017-10-30 22:20 (UTC)

Swift 4 is now out since over a month, it would be great if this package got an upgrade.

skela commented on 2017-09-20 06:58 (UTC)

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

Zrax commented on 2017-09-19 18:21 (UTC)

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

skela commented on 2017-09-18 06:42 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

@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 (UTC) (edited on 2017-09-11 11:06 (UTC) by FredBezies)

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 (UTC)

@adsun: Should be fixed now, thanks.

adsun commented on 2017-07-18 01:43 (UTC)

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 (UTC)

Thanks @Ahti333, it should be fixed now.

lllf commented on 2017-06-11 05:23 (UTC)

@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 (UTC)

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 (UTC)

@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 (UTC) (edited on 2017-04-09 09:07 (UTC) by lf-araujo)

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 (UTC)

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 (UTC)

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 (UTC) (edited on 2017-01-30 20:52 (UTC) by MatejLach)

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 (UTC) (edited on 2017-01-29 22:28 (UTC) by Ahti333)

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 (UTC)

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 (UTC)

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 (UTC)

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

Tuetuopay commented on 2017-01-18 09:53 (UTC)

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 (UTC)

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

Zrax commented on 2016-12-06 16:52 (UTC)

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

tarasis commented on 2016-12-06 14:44 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

Got this error: not found: clang=3.8.1 any ideas?

Zrax commented on 2016-11-08 16:28 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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

walkindude commented on 2016-09-14 23:07 (UTC) (edited on 2016-09-14 23:07 (UTC) by walkindude)

/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 (UTC)

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 (UTC) (edited on 2016-09-14 12:08 (UTC) by axs)

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 (UTC)

> 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 (UTC)

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 (UTC)

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 (UTC)

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 (UTC)

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

rainbyte commented on 2016-04-21 05:49 (UTC)

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

walkindude commented on 2016-04-19 23:21 (UTC)

@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 (UTC)

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 (UTC) (edited on 2016-03-01 13:15 (UTC) by nlamirault)

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 (UTC)

Ok, added

Ahti333 commented on 2016-01-18 16:16 (UTC)

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