Repository navigation
Unbreak Windows builds: scope vendored OpenSSL to Linux - #52
Merged
Merged
Conversation
… Linux
All three Windows release jobs — gateway, endpoint and VPN MSI — fail with:
openssl-sys: configuring OpenSSL build: 'perl' reported failure with exit code: 255
error: failed to run custom build command for `openssl-sys v0.9.117`
Nothing in the crate uses openssl directly. The dependency exists to make
native-tls vendor OpenSSL so Linux builds are static, but as an unconditional
dependency it also forced an OpenSSL source build on Windows, where it is not
needed and does not work under MinGW.
On Windows, native-tls uses SChannel; `cargo tree -i openssl-sys
--target x86_64-pc-windows-gnu` showed the explicit dependency was the only
thing pulling it in. Scoping it to Linux drops it from the Windows tree
entirely and leaves the Linux static build unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Release workflow's three Windows jobs —
build-gateway-windows,build-endpoint-windows,build-vpn-msi— all fail at the same point:This blocks the Windows gateway binary, so the remaining gateways can't be updated.
Cause
openssl = { version = "0.10.81", features = ["vendored"] }was an unconditional dependency. Nothing in the crate usesopenssl::— it's there to makenative-tlsvendor OpenSSL so Linux builds are static and the.debneeds no system libssl.But unconditionally, it also forces a from-source OpenSSL build on Windows, where it is neither needed nor buildable under MinGW.
native-tlsuses SChannel on Windows:Fix
Move it under
[target.'cfg(target_os = "linux")'.dependencies], with a comment explaining why it exists at all.Verification
Linux builds clean and all 54 tests pass. The Windows compile itself needs CI to confirm — no MinGW here — but the dependency that was failing is no longer in the Windows tree.
Note
This line arrived in #48; it was already in the working tree before that work and I carried it along rather than leaving it dangling, flagging it in that PR's description. It appears to have been added for the Linux static build without the Windows consequence being noticed.