FrenchGithubUser / Hatt

DDL/Streaming meta search engine
GNU General Public License v3.0
653 stars 17 forks source link

Cannot start on Ubuntu 20.04 #11

Open ahobsonsayers opened 1 year ago

ahobsonsayers commented 1 year ago

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?

FrenchGithubUser commented 1 year ago

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

FrenchGithubUser commented 1 year ago

Could you try installing glibc6 as mentionned here ?

ahobsonsayers commented 1 year ago

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 commented 1 year ago

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

FrenchGithubUser commented 1 year ago

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

ahobsonsayers commented 1 year ago

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

FrenchGithubUser commented 1 year ago

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

ahobsonsayers commented 1 year ago

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!

FrenchGithubUser commented 1 year ago

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 !