Hatt icon indicating copy to clipboard operation
Hatt copied to clipboard

Cannot start on Ubuntu 20.04

Open ahobsonsayers opened this issue 3 years ago • 9 comments

When attempting to launch on my PC i get the following error

./Hatt: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./Hatt)

I have glibc already installed, but it seems to be the wrong version (maybe because it was compiled on another version of Ubuntu or different distribution all together)

Im wondering if it might be better to statically compile the binary?

ahobsonsayers avatar Apr 13 '23 14:04 ahobsonsayers

This might be related to wails, and not to Hatt itself. I'll have a closer look

FrenchGithubUser avatar Apr 13 '23 14:04 FrenchGithubUser

Could you try installing glibc6 as mentionned here ?

FrenchGithubUser avatar Apr 13 '23 14:04 FrenchGithubUser

Already have it installed sadly

$ sudo apt install libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.9).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Note glibc6 is installed via the libc6 pacakge

ahobsonsayers avatar Apr 13 '23 14:04 ahobsonsayers

It does indeed look like a Wails issue however. As such im not sure this is up to Hatt to solve, unless statically compiling it is a possibility. Feel free to close if not.

Also worth noting these related golang issues: https://github.com/golang/go/issues/58550 https://github.com/golang/go/issues/57328

ahobsonsayers avatar Apr 13 '23 14:04 ahobsonsayers

Thanks for the references. I'll have a look at static compilation

FrenchGithubUser avatar Apr 13 '23 14:04 FrenchGithubUser

Possibly another helpful link, I see that sqlc has managed to solve this issue. FYI sqlc works on my machine.

https://github.com/kyleconroy/sqlc/issues/2124

ahobsonsayers avatar Apr 13 '23 14:04 ahobsonsayers

sqlc used static builds to fix the issue, right ? I could create static builds but it feels like a "dirty" solution...

FrenchGithubUser avatar Apr 13 '23 15:04 FrenchGithubUser

sqlc did do that as far as i can see! I can't attest to whether it is "dirty" or not, but i do often find static binaries not being prone to issues like is a huge benefit.

Maybe a better, less "dirty" solution to this problem is to think about using an alternative method of distributing the app, such as a flatpak (my personal favourite), AppImage or snap pacakge.

I have been interested learning to build flatpak images, so might be able to find some time to look into this myself if you don't have time. I cant promise when this will be though!

ahobsonsayers avatar Apr 13 '23 16:04 ahobsonsayers

Yea, AppImage or faltpak seem more interesting (as it is clearer that the binary comes with external libs that could be already installed). Please don't hesitate to let me know if you look into this !

FrenchGithubUser avatar Apr 13 '23 16:04 FrenchGithubUser