Skip to content

PyInstaller/Linux binaries are not backward compatible #328

@crwood

Description

@crwood

From the PyInstaller docs:

Under GNU/Linux, PyInstaller does not bundle libc (the C standard library, usually glibc, the Gnu version) with the app. Instead, the app expects to link dynamically to the libc from the local OS where it runs. The interface between any app and libc is forward compatible to newer releases, but it is not backward compatible to older releases.

For this reason, if you bundle your app on the current version of GNU/Linux, it may fail to execute (typically with a runtime dynamic link error) if it is executed on an older version of GNU/Linux.

The solution is to always build your app on the oldest version of GNU/Linux you mean to support. It should continue to work with the libc found on newer versions.

Currently, Gridsync works around this limitation by building and deploying releases via a dedicated CentOS 7 virtual machine, thereby ensuring compatibility with very old versions of glibc. For users wishing to build and distribute the application locally, however, it may be frustrating to need to spin up and provision or otherwise maintain a CentOS 7 VM (or equivalent).

In order to facilitate building the application in a way that is maximally compatible with different GNU/Linux distributions, the Gridsync build process should offer the option of building the application inside a CentOS 7-based OCI container so as to allow, e.g., users of newer versions of Ubuntu with docker or podman installed to easily "compile" a Gridsync AppImage that is backward-compatible with other, older Linux distributions.

As an added bonus, having a common, more "standardized" build environment will assist in providing -- but may not be entirely sufficient in actually achieving -- reproducible/deterministic builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions