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

Linux static builds broken on Debian Bookworm #5689

Closed
LHLaurini opened this issue Dec 19, 2024 · 5 comments
Closed

Linux static builds broken on Debian Bookworm #5689

LHLaurini opened this issue Dec 19, 2024 · 5 comments

Comments

@LHLaurini
Copy link
Contributor

Environment

  • OS: Debian 12 (Bookworm)
  • Scrcpy version: 3.1, and future versions
  • Installation method: Linux static build
  • Device model: Irrelevant
  • Android version: Irrelevant

Describe the bug

The release workflow uses ubuntu-latest. That used to be ubuntu-22.04, but is currently being upgraded to ubuntu-24.04. For scrcpy, it seems the change took effect between 3.0.2 and 3.1, so the first was built with 22.04 and the latter with 24.04.

While Ubuntu 22.04 ships with glibc 2.35, Ubuntu 24.04 uses glibc 2.39 (source). Glibc is backward-compatible, but not forward-compatible. That means that version 3.0.2 (and earlier) requires glibc 2.35+ and version 3.1 requires glibc 2.39+.

Therefore, if I try to run version 3.1 on Debian Bookworm (glibc 2.36), I get:

./scrcpy: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./scrcpy)

Debian Bookworm is the latest stable version, so it should probably be supported. I believe building with ubuntu-22.04 should make the binaries compatible with the stable version of the most popular distros.

@rom1v
Copy link
Collaborator

rom1v commented Dec 19, 2024

Here is a binary built by ubuntu-22.04:

diff --git .github/workflows/release.yml .github/workflows/release.yml
index da021c6e1..efe1bac5d 100644
--- .github/workflows/release.yml
+++ .github/workflows/release.yml
@@ -84,7 +84,7 @@ jobs:
         run: release/test_client.sh
 
   build-linux-x86_64:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
     steps:
       - name: Check architecture
         run: |

Does it work better?

@LHLaurini
Copy link
Contributor Author

Does it work better?

Yes, it seems to work normally.

rom1v added a commit to rom1v/scrcpy that referenced this issue Dec 22, 2024
On Github Actions, ubuntu-latest is now ubuntu-24.04, which uses a new
version of glibc (2.39). As a result, the binaries do not work on
systems using an older version of glibc, like Debian Bookworm.

Continue to build the static linux binary on Ubuntu 22.04 (with glibc
2.35) for better compatibility.

Fixes Genymobile#5689 <Genymobile#5689>
rom1v added a commit that referenced this issue Dec 22, 2024
On Github Actions, ubuntu-latest now points to ubuntu-24.04, which uses
a newer version of glibc (2.39). As a result, the binaries fail to work
on systems with older versions of glibc, such as Debian Bookworm.

To ensure better compatibility, continue building the static Linux
binary on Ubuntu 22.04 (with glibc 2.35).

Fixes #5689 <#5689>
@rom1v
Copy link
Collaborator

rom1v commented Dec 22, 2024

Merged into dev: 95c4f03

It will be used for the next release.

@rom1v rom1v closed this as completed Dec 22, 2024
rom1v added a commit to rom1v/scrcpy that referenced this issue Dec 23, 2024
Use the oldest Ubuntu version currently available in GitHub Actions to
ensure maximum compatibility with older systems.

Refs 95c4f03
Refs Genymobile#5689 <Genymobile#5689>
@rom1v
Copy link
Collaborator

rom1v commented Dec 23, 2024

I changed again to use the oldest version available: ubuntu-20.04: 69858c6

That way, it also works on Debian Bullseye (oldstable).

@tarikgraba
Copy link

@rom1v could you trigger a new "release" build with this build pipline? (not urgent)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants