wails
wails copied to clipboard
Missing glibc on certain distributions
Description
When running my Wails app executables on certain Linux distributions, they fail to run due to not having an up-to-date c runtime library. In the example case, I am building on Mint 21.2 and testing on Mint 20.3. I get the following.
/myapp: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./myapp)
./myapp: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./myapp)
Not all systems are always up-to-date and I want my app to run on as many as possible.
I had the same problem with WebView and CGO but resolved it by linking against the musl-gcc library instead. This worked quite well. But I can't get wails to accept that.
To Reproduce
Build the wails example and try running it on not-quite-current distributions.
Expected behaviour
/myapp: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./myapp)
./myapp: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./myapp)
Screenshots
No response
Attempted Fixes
No response
System Details
# Wails
Version | v2.6.0
Package Manager | apt
# System
┌───────────────────────────┐
| OS | Linux Mint |
| Version | 21.2 |
| ID | linuxmint |
| Go Version | go1.21.1 |
| Platform | linux |
| Architecture | amd64 |
└───────────────────────────┘
# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| *docker | docker.io | Installed | 24.0.5-0ubuntu1~22.04.1 |
| gcc | build-essential | Installed | 12.9ubuntu3 |
| libgtk-3 | libgtk-3-dev | Installed | 3.24.33-1ubuntu2 |
| libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.42.1-0ubuntu0.22.04.1 |
| npm | npm | Installed | 10.1.0 |
| *nsis | nsis | Installed | v3.08-2 |
| pkg-config | pkg-config | Installed | 0.29.2-1ubuntu3 |
└──────────────────────── * - Optional Dependency ─────────────────────────┘
# Diagnosis
SUCCESS Your system is ready for Wails development!
♥ If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
Additional context
No response
I'm in a somewhat similar situation, I'm running Zorin OS 16.2 (which is based on Ubuntu 18.04)
Building the app locally works fine both for wails dev
and wails build
, but running the binary generated by Github Actions CI results in the same GLIBC version error, because the ubuntu runner on GHA is using Ubuntu 22.04
Unfortunately, this is a symptom of the Linux ecosystem, regardless of code or language. I believe this should help you: https://stackoverflow.com/questions/55450061/go-build-with-another-glibc#55455448
As well as this: https://wails.io/docs/guides/manual-builds