Open MahdiBM opened 5 months ago
(Reworked the issue to better point out the actual issue with the compilation)
Most people are not going to try building first. Cut and paste your error into the original post, which will help others searching for similar errors too.
The error is in just that "compile failed with signal 9", nothing more. It just randomly prints that when building and stops the process.
OK, try building with swift build -v
and see if that gives you any more info.
Here is the docker log from the build:
Any thoughts?
Hi everyone,
Just wanted to let you know that I was able to resolve my issue. I used SwiftLint to review my code and one of the things it flagged was "files with too many lines." I never thought this would be an issue, as some of my files had up to 4k lines. I tried creating new files as extensions and limiting the size to no more than 500 lines per file. And like magic, the build went from 4 hours to 12 minutes on Linux. Thanks to everyone for the help!
Description
Project fails to build on linux.
Reproduction
Try to compile this project anyhow you want, on any Swift version.
project-manager-cms-server.zip
The compilation seems to consistently fail with:
Multiple people have tried compiling or cross-compiling the same project and no one has had success. See this thread in Vapor's Discord server for the full discussion.
Expected behavior
Compilation should go successfully.
Environment
Tested with on different environments. On EC2 instances or swift:5.10 image (not cross-compiling) and on a few different environments cross-compiling from Apple Silicon to amd.
I personally tried cross-compiling with Swift 5.10, on macOS 14.3 (or was it 14.2?) and Docker 4.27.1. Those seem to pretty much the latest as of writing this issue. Docker 4.28 seems to be out as well.
Additional information
No response