Issue building the toolbox on Arch
bx2 opened this issue · 1 comments
bx2 commented
I am following the tutorial available on https://www.swift.org/getting-started/vapor-web-server/. In order to install Vapor it asks me to follow build steps here: https://docs.vapor.codes/install/linux/#install-toolbox.
After cloning the repo and running make, the installation fails with the following error:
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1392:64: error: value of optional type 'UnsafeMutablePointer<tm>?' must be unwrapped to a value of type 'UnsafeMutablePointer<tm>'
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
^
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1391:13: note: short-circuit using 'guard' to exit this function early if the optional value contains 'nil'
let localTime = localtime(×tamp)
^
guard else { return <#default value#> }
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1391:25: note: coalesce using '??' to provide a default when the optional value contains 'nil'
let localTime = localtime(×tamp)
^
?? <#default value#>
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1391:25: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
let localTime = localtime(×tamp)
^
!
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1392:64: note: coalesce using '??' to provide a default when the optional value contains 'nil'
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
^
?? <#default value#>
/home/bx2/Projects/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1392:64: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
^
!
error: fatalError
[6/15] Compiling Logging Locks.swift
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: build.ShellError(terminationStatus: 1)
Current stack trace:
0 libswiftCore.so 0x00007f0a2d4a8000 _swift_stdlib_reportFatalErrorInFile + 109
1 libswiftCore.so 0x00007f0a2d16cb35 <unavailable> + 1493813
2 libswiftCore.so 0x00007f0a2d16c957 <unavailable> + 1493335
3 libswiftCore.so 0x00007f0a2d16b8c0 _assertionFailure(_:_:file:line:flags:) + 342
4 libswiftCore.so 0x00007f0a2d1d2a0c <unavailable> + 1911308
5 build 0x00005583fa937167 <unavailable> + 8551
6 libc.so.6 0x00007f0a2ba45cd0 <unavailable> + 163024
7 libc.so.6 0x00007f0a2ba45d00 __libc_start_main + 138
8 build 0x00005583fa936e55 <unavailable> + 7765
💣 Program crashed: Illegal instruction at 0x00007f0a2d16ba22
Thread 0 "build" crashed:
0 0x00007f0a2d16ba22 _assertionFailure(_:_:file:line:flags:) + 354 in libswiftCore.so
1 0x00007f0a2d1d2a0c swift_errorInMain + 619 in libswiftCore.so
2 0x00005583fa937167 main + 54 in build
To Reproduce
- git clone ...
- cd toolbox
- git checkout 18.7.4
- make install
The error appears after:
$ make install
swiftc ./scripts/build.swift
./build
$ swift build --disable-sandbox --configuration release -Xswiftc -cross-module-optimization
Building for production...
(error)
Expected behavior
I would expect it to build.
Environment
- Swift version: Swift version 5.9.1 (swift-5.9.1-RELEASE) (x86_64-unknown-linux-gnu)
- Vapor Framework version: n/a
- Vapor Toolbox version: 18.7.4
- OS version: Linux bx2mba 6.6.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 29 Nov 2023 00:37:40 +0000 x86_64 GNU/Linux