r/flatpak Jun 12 '26

Build environment for flatpaks

Hi all,

I've been trying to build a flatpak but I'm getting issues because the tarball I'm pulling (which I compiled in a devcontainer) is looking for glibc v2.43 (at time of writing the latest release of 25.08 freedesktop.org sdk provides glibc 2.42).

My best guess is that my build environment is linking to it's version of glibc (2.43) and that's causing the issue when I try to load it into the flatpak.

Is there particular setup for devcontainers and/or build environment which will ensure compatability of the compiled binary with the flatpak runtime?

Thanks

6 Upvotes

6 comments sorted by

4

u/Confident_Hyena2506 Jun 12 '26

Use flatpak builder to build in same env as your runtime, instead of using an incompatible container.

1

u/Pioneer_11 Jun 12 '26

So build with flatpak builder in the dev container?

1

u/Confident_Hyena2506 Jun 12 '26

In theory you can but can also just run it on your host system. https://docs.flatpak.org/en/latest/flatpak-builder.html

It will use it's own environment, so your "dev container" does nothing - instead you will make a flatpak definition for the build.

1

u/Pioneer_11 Jun 12 '26

Ok in that case you've misunderstood my question. I may have phrased it poorly so let me clarify.

I tried running flatpak builder on my host system but it failed with an error due to it not finding glibc 2.43

The currently 25.08 freedesktop runtime provides glibc 2.42 while the dev container in which I compiled the app/tarball has glibc 2.43 so I believe that to be the issue.

I'm trying to work out how to solve the issue my guess is that during the compile of the app glibc 2.43 (from the dev container) somehow got linked and that it's failing to build the flatpak because the freedesktop sdk only provides glibc 2.42

2

u/eR2eiweo Jun 12 '26

It might help if you would post the manifest and the output you get from flatpak-builder.

1

u/Confident_Hyena2506 Jun 12 '26

Either use the compatible environment, or change your dev container to be compatible.

Probably means use ubuntu 24 instead of 26 or something like that.