[PR #1457] [MERGED] Fix cross compilation for armv6hf (Raspberry Pi 1) #1403

Closed
opened 2026-02-27 20:02:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/1457
Author: @starypatyk
Created: 1/24/2025
Status: Merged
Merged: 2/3/2025
Merged by: @photovoltex

Base: devHead: fix_rp1_build


📝 Commits (6)

  • faeaf50 Use ring instead of aws-lc as the default backend for hyper-rustls
  • 0f497cc Cross-compile with libmdns
  • 3026d03 Simplify Docker image to cross-compile for armv6hf (RPi 1)
  • 6bb009a Revert "Use ring instead of aws-lc as the default backend for hyper-rustls"
  • 765f1f2 Fix bindgen issues (aws-lc-rs) when cross-compiling for armv6hf
  • ab1102a Add git to the Docker image for cross-compiling

📊 Changes

4 files changed (+22 additions, -23 deletions)

View changed files

📝 contrib/Dockerfile (+5 -4)
📝 contrib/cross-compile-armv6hf/Dockerfile (+5 -10)
📝 contrib/cross-compile-armv6hf/docker-build.sh (+8 -5)
📝 contrib/docker-build.sh (+4 -4)

📄 Description

The Docker image intended to cross-compile librespot for armv6hf (i.e. Raspberry Pi 1) did not work for some time.

Changes proposed here attempt to fix this:

With these changes in place I have been able to cross-compile librespot for armv6hf and verify that it runs as expected on a Raspberry Pi 1.

I have also verified builds using Docker for aarch64 and x86_64.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/1457 **Author:** [@starypatyk](https://github.com/starypatyk) **Created:** 1/24/2025 **Status:** ✅ Merged **Merged:** 2/3/2025 **Merged by:** [@photovoltex](https://github.com/photovoltex) **Base:** `dev` ← **Head:** `fix_rp1_build` --- ### 📝 Commits (6) - [`faeaf50`](https://github.com/librespot-org/librespot/commit/faeaf506d64ab988d6cc950b58dbe22c0eed9386) Use ring instead of aws-lc as the default backend for hyper-rustls - [`0f497cc`](https://github.com/librespot-org/librespot/commit/0f497cc690e4fefef83686864155d6d68ab2977f) Cross-compile with libmdns - [`3026d03`](https://github.com/librespot-org/librespot/commit/3026d030b552e5fa4cb2c7d8f4981a7d2f069fc7) Simplify Docker image to cross-compile for armv6hf (RPi 1) - [`6bb009a`](https://github.com/librespot-org/librespot/commit/6bb009af83ac737c60c99efbf5d8598f6debd3d8) Revert "Use ring instead of aws-lc as the default backend for hyper-rustls" - [`765f1f2`](https://github.com/librespot-org/librespot/commit/765f1f2246ba0cd7f8776e983a4dfffd539e4395) Fix bindgen issues (aws-lc-rs) when cross-compiling for armv6hf - [`ab1102a`](https://github.com/librespot-org/librespot/commit/ab1102a0aa36d44dbca253de7819b0db844bf0f7) Add git to the Docker image for cross-compiling ### 📊 Changes **4 files changed** (+22 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `contrib/Dockerfile` (+5 -4) 📝 `contrib/cross-compile-armv6hf/Dockerfile` (+5 -10) 📝 `contrib/cross-compile-armv6hf/docker-build.sh` (+8 -5) 📝 `contrib/docker-build.sh` (+4 -4) </details> ### 📄 Description The Docker image intended to cross-compile librespot for armv6hf (i.e. Raspberry Pi 1) did not work for some time. Changes proposed here attempt to fix this: - ~~Commit https://github.com/librespot-org/librespot/commit/faeaf506d64ab988d6cc950b58dbe22c0eed9386 changes the default tls library from **aws-lc-rs** to **ring** as suggested by @kingosticks in #1382 (commit: https://github.com/kingosticks/librespot/commit/24bbc6314c991c64d1846162f739f223c44e5779). I tried to compile **aws-lc-rs** for armv6hf, but did not succeed. :disappointed: I understand that this change might be controversial - I am open to discuss this.~~ Reverted in https://github.com/librespot-org/librespot/pull/1457/commits/6bb009af83ac737c60c99efbf5d8598f6debd3d8 - Commit https://github.com/librespot-org/librespot/commit/0f497cc690e4fefef83686864155d6d68ab2977f adds **with-libmdns** to the list of features - to compensate for the changes made in #1347. - Commit https://github.com/librespot-org/librespot/commit/3026d030b552e5fa4cb2c7d8f4981a7d2f069fc7 is just a small clean-up of the Docker image and the script used to build librespot. - Commit https://github.com/librespot-org/librespot/pull/1457/commits/765f1f2246ba0cd7f8776e983a4dfffd539e4395 fixes build of the **aws-lc-rs** library. - Commit https://github.com/librespot-org/librespot/pull/1457/commits/ab1102a0aa36d44dbca253de7819b0db844bf0f7 fixes a minor issue in binaries generated via Docker for other platforms (VERGEN_IDEMPOTENT_OUTPUT instead of actual git commit hash) With these changes in place I have been able to cross-compile librespot for armv6hf and verify that it runs as expected on a Raspberry Pi 1. I have also verified builds using Docker for aarch64 and x86_64. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:02:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1403
No description provided.