-
Notifications
You must be signed in to change notification settings - Fork 706
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
[REQUEST] Provide prebuilt static binaries on Linux #4555
Comments
Your compiler is too old to build Kakoune. As described in the README, Kakoune requires GCC 10.3 or above, or Clang 11 or above. If your Linux distro does not include a sufficiently new C++ compiler, I suspect (but would love to be proven wrong) that it also wouldn't be able to run statically-linked Kakoune binaries either. |
why? |
Yes you can. As mentioned in the description, a statically-linked Kakoune built with Alpine runs on CentOS 7. |
Just as newer versions of libc add new and updated functions, so you can't reliably run software dynamically linked with a modern libc on an old libc, so newer versions of Linux add new syscalls for libc to use, so you can't reliably run a statically-linked modern libc on an old kernel. However, musl libc in particular apparently promises compatibility with Linux 2.6.39 from 2011. I don't know how they picked that particular version or how likely they are to change, but apparently at least right now it's not too difficult to build a Kakoune binary on a modern system that stands a good chance of working on RHEL 6. |
thats very cool, but in my case, my distro packages gcc 10.2, so i am not very much behind in compiler version and naturally, i have no problems running statically linked kakoune built with another disto's toolchain. |
Building static binaries with Alpine Linux's musl libc-based toolchain should make them work on any distros with Linux kernel 2.6.39 and newer. Fixes mawww#4555 References: - https://wiki.musl-libc.org/supported-platforms.html Signed-off-by: Masanori Ogino <masanori.ogino@gmail.com>
Feature
A tarball of statically linked Kakoune installation of each release, preferably built on Alpine Linux automatically by GitHub Action, would be great to have, as Kakoune requires modern C++ that may not be implemented in the distributions' default compiler.
Building the binary itself is trivial due to Kakoune's minimal library dependencies. My quick experiment with Alpine Linux 3.15 resulted in a 2.7 MB executable after
strip
-ing, and it runs on Ubuntu 20.04 and CentOS 7.The phrase on Linux might be unnecessary, but I wonder if portable static builds across versions are that easy on other platforms.
Usecase
A pre-built binary for each release will help newcomers try Kakoune without building it. Preparing a recent toolchain on older platforms is sometimes difficult even for veterans.
The text was updated successfully, but these errors were encountered: