Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross-compilation to the static Linux SDK #510

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

leinelissen
Copy link
Contributor

When cross-compiling a Vapor app with the Swift Static Linux SDK, postgres-nio will throw error: no such module 'Glibc'. This fix imports Musl instead of Glibc when it is available to fix cross-compilation.

Note: given other errors with the Static Linux SDK and Swift toolchain, you'll need to run at least the swift-6.0-DEVELOPMENT-SNAPSHOT-2024-09-17-a Swift development toolchain and corresponding Linux SDK. Also, there's an unreleased fix in swift-nio, so it's recommended to run at least the 1b33db2dea6a64d5b619b9e888175133c6d7f410 revision of the package when cross-compiling.

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gwynne we really need to work static Linux SDK into the CI at some point

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.12%. Comparing base (9f84290) to head (8edd91b).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #510   +/-   ##
=======================================
  Coverage   55.12%   55.12%           
=======================================
  Files         127      127           
  Lines       10174    10174           
=======================================
  Hits         5608     5608           
  Misses       4566     4566           
Files with missing lines Coverage Δ
...ources/ConnectionPoolModule/PoolStateMachine.swift 88.31% <ø> (ø)

... and 2 files with indirect coverage changes

@fabianfett fabianfett merged commit 8f7e900 into vapor:main Sep 25, 2024
11 checks passed
@ffried
Copy link

ffried commented Oct 1, 2024

Any chance this could make it into a release soon(-ish)? We're trying to enable multi-platform docker builds for our server side applications and this is one blocker (that can currently be worked around by manually adding postgres-nio as dependency with a fixed commit hash to the current HEAD of main).

@fabianfett fabianfett added the semver-patch No public API change. label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants