mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #1534] Cross compilation fails because of missing system library openssl #695
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#695
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pejobo on GitHub (Aug 13, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1534
Description
Following the wiki for cross compliation (on branch
dev) fails with:Version
Dev branch, commit
c4766ceb996f805ce85c710ddac5fd1533bac3f5How to reproduce
Check out dev + follow the steps outlined here: https://github.com/librespot-org/librespot/wiki/Cross-compiling
Log
@pejobo commented on GitHub (Aug 13, 2025):
Installing
libssl-devto the container (for every arch variants) fixes this.@roderickvd commented on GitHub (Aug 13, 2025):
I'm taking the hopefully popular decision to move away from AWS-LC and back to ring again. This removes the need for OpenSSL entirely, and make cross-platform compilation even simpler.
Did so in
fe7ca0d700. Going to close this when the build passes.Let me know if I'm missing something why we should keep AWS-LC.
@roderickvd commented on GitHub (Aug 13, 2025):
Because it's opinionated hour, I've also moved from native to webpki certificates on all platforms in
056d125.@roderickvd commented on GitHub (Aug 13, 2025):
CI is passing again. Thanks for the report.
@jirutka commented on GitHub (Aug 14, 2025):
Why did you use AWS-LC in the first place? The de-facto standard TLS library on Linux is OpenSSL; AWS-LC is just some corporate fork of OpenSSL.
Do I understand correctly that @pejobo didn’t realise that, when building with native TLS (which is optional, isn’t it?), he needs to install the native libraries (libssl-dev), and that you are using this as a reason to stop supporting native TLS? Or what is this about?
Do you know what this means?! You are bundling all the root certificates with your binary! Do you understand all the implications of this? And why do you even want to do that?
Now I have to patch librespot in all packages that use this library, which is complicated by the rigidity of Cargo. So I would rather remove them from the distribution because I’m really fed up with this approach of Rust community.
@roderickvd commented on GitHub (Aug 14, 2025):
I acknowledge your technical concerns about certificate bundling, and you're right that this deserves better documentation instead of assuming everybody knows what's going on. So let me address both the technical reality and the tone of this discussion.
On this repository, we maintain a collaborative and constructive environment. This is the second time your responses have carried a confrontational tone, including threats to remove packages from distributions. We need future discussions to focus on technical solutions rather than ultimatums.
Regarding the certificate bundling concern: those certificates were already being bundled as transitive dependencies through
hyper-proxy2even when native TLS was enabled and default features disabled. Through the interaction ofreqwestdefault features and this dependency, TLS silently used webpki certificates instead of system certificates, giving users false confidence about their certificate source.The issue is that when cross-compilation was "succeeding" before, it was succeeding incorrectly. The build would complete without OpenSSL libraries because the dependency chain was silently using webpki certificates - meaning you were already shipping with bundled certificates without realizing it.
My recent commits make explicit what was happening implicitly through the dependency chain. Rather than shipping functionality that appears to use system certificates but actually uses bundled ones, we now have an honest implementation.
You're absolutely right that this solution isn't ideal, but the alternative was giving users false confidence about which certificate store they were actually using. This needs improvement in the Rust ecosystem, but that's not a problem we can solve today in librespot.
As referenced in #1158, we remain open to proper, full, cross-platform compatible native TLS solutions. Rather than arguing over the current approach, I encourage contributing to that effort.