vapor/vapor

vapor and toolbox compile error on arch linux

asielcabrera opened this issue · 1 comments

reviving an old iMac that they stopped updating from macos el capitan, I just installed arch linux and I already have swift 5.9 installed and when doing make install in the toolbox and when doing swift build in a vapor 4 project it gives me the same error:

shiroe@iarch ~/D/toolbox (main)> make install
swiftc ./scripts/build.swift
./build
$ swift build --disable-sandbox --configuration release -Xswiftc -cross-module-optimization
Building for production...
/home/shiroe/Developer/toolbox/.build/checkouts/swift-log/Sources/Logging/Logging.swift:1392:64: error: value of optional type 'UnsafeMutablePointer?' must be unwrapped to a value of type 'UnsafeMutablePointer'
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
^
/home/shiroe/Developer/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(&timestamp)
^
guard else { return <#default value#> }
/home/shiroe/Developer/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(&timestamp)
^
?? <#default value#>
/home/shiroe/Developer/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(&timestamp)
^
!
/home/shiroe/Developer/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/shiroe/Developer/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
[1/5] Compiling Logging Locks.swift
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: build.ShellError(terminationStatus: 1)

💣 Program crashed: Illegal instruction at 0x0000770640363d12

Thread 0 "build" crashed:

0 0x0000770640363d12 assertionFailure(:_:file:line🎏) + 354 in libswiftCore.so
1 0x00007706403cacfc swift_errorInMain + 619 in libswiftCore.so
2 0x00005813a9c43147 main + 54 in build

Backtrace took 0.02s

exit
make: *** [Makefile:5: build] Illegal instruction (core dumped)
make: *** Deleting file 'build'

This is an issue in swift-log, not Vapor.