-
-
Notifications
You must be signed in to change notification settings - Fork 92
[18.7.4] Code does not compile using make. #430
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When cloning toolbox, and running make install, I get the following error:
Building for production...
~/src/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)
^
~/src/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#> }
~/src/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#>
~/src/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)
^
!
~/src/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#>
~/src/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
[12/22] Compiling c-atomics.c
Swift/ErrorType.swift:200: Fatal error: Error raised at top level: build.ShellError(terminationStatus: 1)
Current stack trace:
0 libswiftCore.so 0x00007fa53dc986d0 _swift_stdlib_reportFatalErrorInFile + 109
1 libswiftCore.so 0x00007fa53d964d85 <unavailable> + 1461637
2 libswiftCore.so 0x00007fa53d964ba7 <unavailable> + 1461159
3 libswiftCore.so 0x00007fa53d963b10 _assertionFailure(_:_:file:line:flags:) + 342
4 libswiftCore.so 0x00007fa53d9cac5c <unavailable> + 1879132
5 build 0x00005611330b8177 <unavailable> + 8567
6 libc.so.6 0x00007fa53c827cd0 <unavailable> + 163024
7 libc.so.6 0x00007fa53c827d00 __libc_start_main + 138
8 build 0x00005611330b7e65 <unavailable> + 7781
💣 Program crashed: Illegal instruction at 0x00007fa53d963c72
Thread 0 "build" crashed:
0 0x00007fa53d963c72 _assertionFailure(_:_:file:line:flags:) + 354 in libswiftCore.so
1 0x00007fa53d9cac5c swift_errorInMain + 619 in libswiftCore.so
2 0x00005611330b8177 main + 54 in build
As one would expect from the reported error, if you go to the Logging.swift file, line 1392 (timestamp() function), and add an if let clause, you can build normally.
if let localTime {
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
}
To Reproduce
Simply follow the steps from the Vapor guide on linux.
The last part is cloning toolbox and running make install.
There. That's where it fails.
Expected behavior
Toolbox builds and one is able to use cli commands such as vapor -h.
Environment
- Vapor Framework version: N/A
- Vapor Toolbox version: 18.7.4
- OS version: Arch Linux
Note; I wasn't too specific in my computer specs since I consider this issue to be very straight forward in itself.
However, if needed, I can still provide them. just let me know.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working