Comments (2)
For the record, the following patch fixes the swift-log
build on Arch Linux (tested on Arch Linux 20231112.0.191179 (Docker tag archlinux:latest
) using the swift-bin
AUR package version 5.9.1-2):
diff --git a/Sources/Logging/Logging.swift b/Sources/Logging/Logging.swift
index 5910e73..23ef1ab 100644
--- a/Sources/Logging/Logging.swift
+++ b/Sources/Logging/Logging.swift
@@ -1388,7 +1388,9 @@ public struct StreamLogHandler: LogHandler {
_ = strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", &localTime)
#else
var timestamp = time(nil)
- let localTime = localtime(×tamp)
+ guard let localTime = localtime(×tamp) else {
+ return "<unknown>"
+ }
strftime(&buffer, buffer.count, "%Y-%m-%dT%H:%M:%S%z", localTime)
#endif
return buffer.withUnsafeBufferPointer {
I have opened a PR against the upstream swift-log
repository with this fix, since it also fixes a potential NULL
pointer dereference.
from toolbox.
At this time, the recommended way to build the toolbox is the same way the CI does, by just executing swift build -c release
.
That being said, the problem is that Arch Linux is not currently supported as a host platform by Swift itself. This is not an issue with Vapor. As far as Linux goes, Swift currently officially supports Ubuntu (18.04 Bionic, 20.04 Focal, and 22.04 Jammy), CentOS 7, Amazon Linux 2, and RedHat UBI 9 (see https://www.swift.org/platform-support/ and https://www.swift.org/download/ for more details). Arch Linux, being a BSD-based distribution, is nominally supported by the compiler itself, but there are clearly issues in various packages, in this case swift-log
. (This being said, I'll see if I can't get that particular failure fixed upstream, since there's no reason not to.)
from toolbox.
Related Issues (20)
- Entity Generation HOT 3
- macOS packaging should offer alternatives to HomeBrew HOT 4
- Compiling issue on Centos7 HOT 4
- vapor --version couldn't work correctly HOT 7
- `which` fails on macOS
- Running Docker Image Fails on `git clone` HOT 5
- `vapor run migrate` on macOS 13.0.1 fails HOT 2
- Clone
- `new` fails when `--output` is an existing directory HOT 2
- Support installation as Nix package HOT 3
- Digital ocean issue: Doesn't start app HOT 1
- Logs. HOT 2
- 'vapor new ProjectName --template github/url' does not set 'name:' in Package.swift HOT 3
- Issue building the toolbox on Arch HOT 1
- Compilation fails on Ubuntu 22.04 HOT 11
- Allow cloning local templates HOT 2
- Failed to install with make install HOT 7
- Building from source hangs indefinitely HOT 2
- Stuck in cloning template when vapor new a project in a Linux Docker container HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolbox.