Dygmalab / Bazecor

Graphical configurator for Dygma Products
https://dygma.com/
GNU General Public License v3.0
391 stars 85 forks source link

1.3.2 appimage won't start on Ubuntu 20.04 (GLIBC_2.34 not found) #486

Closed mclemme closed 11 months ago

mclemme commented 1 year ago

Describe the bug When launching Bazecor 1.3.2 the following error is shown (terminal):

$ ./Bazecor-1.3.2-x64.AppImage 
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/.mount_BazecodzBCUb/usr/lib/bazecor/resources/app/node_modules/uiohook-napi/prebuilds/linux-x64/node.napi.node)
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1354:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:1822)
    at Module.load (node:internal/modules/cjs/loader:1124:32)
    at Module._load (node:internal/modules/cjs/loader:965:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1148:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at load (/tmp/.mount_BazecodzBCUb/usr/lib/bazecor/resources/app/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/tmp/.mount_BazecodzBCUb/usr/lib/bazecor/resources/app/node_modules/uiohook-napi/dist/index.js:6:38)
mesa: for the --simplifycfg-sink-common option: may only occur zero or one times!
mesa: for the --global-isel-abort option: may only occur zero or one times!
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!

To Reproduce Steps to reproduce the behavior:

  1. Run Ubuntu 20.04 (Dygma raise plugged directly into USB port on laptop)
  2. Download https://github.com/Dygmalab/Bazecor/releases/download/bazecor-1.3.2/Bazecor-1.3.2-x64.AppImage
  3. run chmod +x Bazecor-1.3.2-x64.AppImage
  4. run ./Bazecor-1.3.2-x64.AppImage
  5. Error occurs
javierguzman commented 1 year ago

Hello @mclemme! Thanks for reporting; Have you tried installing/updating libc? On Ubuntu I believe it is something like this:

sudo apt update
sudo apt install libc6
mclemme commented 1 year ago

@javierguzman I'm guessing it is because Ubuntu 20.04 has an older version of libc, see below:

$ 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).

My guess is it's related to this.

javierguzman commented 1 year ago

I am a bit puzzled, our pipeline builds using ubuntu 20.04 i.e.

      matrix:
        include:
          - os: macos-12
          - os: windows-2019
          - os: ubuntu-20.04

We should be on the same page. When we tested this @AlexDygma used Zorin and had the same exact problem though we carried on because on Zorin, official repos did not update to a higher version than 2.31 and 2.34 is from 2021 so it is not that new.

While checking on Zorin we thought about building using ubuntu 18.04 on the CI/CD but Github deprecated the use of that version on 2022, so the minimum version we can build is the one we are using right now.

mclemme commented 1 year ago

@javierguzman

That is indeed a bit strange, I just checked the libc version on an Ubuntu 20.04 server I have access to, it says the same:

# apt-get install libc6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version (2.31-0ubuntu9.9).

In Ubuntu packages libc 2.31 is shown as the newest available version for 20.04, I can try this from a live USB boot of 20.04 in the weekend just to make 100% sure I can reproduce it there.

javierguzman commented 1 year ago

My bet is that your live USB boot will have the same problem. I would say the real question is why when we build on Github using Ubuntu 20.04 it uses a different libc different than normal 20.04.

mclemme commented 1 year ago

From the stack trace it looks like something in the uiohook-napi package requires a newer version of libc.

It seems like the uiohook-napi dependency ships with a prebuild binary, which was compiled with a newer version of glibc. I'm guessing that Bazecor builds just fine with 20.04 because that particular binary is only ever used at runtime.

Maybe this is the culprit?

  prebuild-linux:
    runs-on: ubuntu-latest
javierguzman commented 1 year ago

Good one @mclemme! I think that might be as well. I have just created a PR on the uiohook-napi repository to use ubuntu-20.04 like we have. Let's see if they react accordingly. If they do not merge that change I am not sure what options we would have. We could try an older version to see if that works ok but maybe it introduces some side effects. In any case I will speak with @AlexDygma to see if we can use something else because this library is used only for macro recording and maybe we can avoid it somehow. Last resort could be to make a fork locally and build it at the same time as Bazecor.

stiray commented 1 year ago

This is still not fixed after 1 month. Should I remind you that 20.04 is LTS version that most users that are not using linux for fun are still using?

A workaround is to:

marlonstoops commented 11 months ago

Looks like the PR on uiohook-napi by @AlexDygma was merged. I guess we just need a new release? Any eta on that?

marlonstoops commented 11 months ago

1.3.4 fixed the issue for me on Ubuntu 20.04.

mclemme commented 11 months ago

Can confirm that Bazecor-1.3.4-x64.AppImage also works fine on my Ubuntu 20.04 install, closing this issue as fixed.