Please provide fully statically linked binaries of CMake

Dear CMake team,
The CMake binaries for linux provided on the website have no dependencies except on GLIBC, which is linked dynamically… Is it possible to instead provide linux binaries that are fully statically linked to MUSL? Such binaries will work out of the box on both GLIBC and MUSL distros, and also work on distros with a GLIBC that is too old/new.
Note: this goes for all binaries except cmake-gui which has other dependencies.
Thank you.

1 Like

This sounds reasonable to me, though I don’t know when it’d get some time invested in it. I assume a Qt-less build is sufficient for these packages?

1 Like

This sounds reasonable to me, though I don’t know when it’d get some time invested in it

Thank you, and take all the time you need. FWIW you could cross-compile static musl binaries from any OS using Zig’s portable Clang wrapper:

zig cc -target x86_64-linux-musl [COMPILER_OPTIONS] [FILES] ...
zig c++ -target x86_64-linux-musl [COMPILER_OPTIONS] [FILES] ...

I assume a Qt-less build is sufficient for these packages?

Sure. I don’t know if Qt can be statically linked anyway.

1 Like

We do build our Qt statically, but I’m not sure how much it relies on glibc-isms (probably few if any given its portability story, but worth a quick investigation by someone on a musl-based deployment).

1 Like

Void Linux (musl version) does offer working copies of Qt 5 and Qt 6, with patches:

void-packages/tree/master/srcpkgs/qt5 (see also: /qt6-base)

There are multiple packages for both versions, the links above are only for the “base” package. Other qt5-* and qt6-* packages are available on the Void packages page.

Thanks. Can you please submit an issue. I don’t know when it’d get worked on, but the issue tracker is a better place for the request now that we’ve hashed it out a bit here.

1 Like

please submit an issue

Done.

https://gitlab.kitware.com/cmake/cmake/-/issues/25387