posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.6k stars 79 forks source link

Positron does not run on Ubuntu 20 (glibc incompatibility) #3854

Open jmcphers opened 3 months ago

jmcphers commented 3 months ago

via @wesm:

My hunch is that Positron's Linux build environment (https://github.com/posit-dev/positron/blob/main/.github/workflows/build-release-linux.yml) is causing the glibc version requirement to be beyond some older Linux distributions, like Ubuntu 20.04.

based on https://code.visualstudio.com/docs/supporting/FAQ, VSCode itself requires at least Ubuntu 20.04 / glibc >= 2.28

Can I run VS Code on older Linux distributions? Starting with VS Code release 1.86.1 (January 2024), VS Code desktop is only compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, or Ubuntu 20.04. If you are unable to upgrade your Linux distribution, the recommended alternative is to use our web client. If you would like to use the desktop version, then you can download the VS Code release 1.85 from here. Depending on your platform, make sure to disable updates to stay on that version. A good recommendation is to set up the installation with Portable Mode.

We can try fixing this by changing our release builds (including Ark https://github.com/posit-dev/ark/blob/main/.github/workflows/release-linux.yml) to use Ubuntu 20.04 cc @lionel-

Originally posted by @wesm in https://github.com/posit-dev/positron/discussions/3707#discussioncomment-9952211

lionel- commented 3 months ago

I tried to build Ark on Ubuntu 20.04 but had to revert this. On a newer Ubuntu 22.04 this causes load errors about libssl.so.1.1. It turns out that this distribution now uses OpenSSL 3 and no longer supports older versions out of the box: https://discourse.ubuntu.com/t/openssl-3-0-transition-plans/24453

So we could add an older build to our gha matrix but at this point I'm not sure it's worth trying to support more distributions ourselves. I would lean towards publishing on a distribution-agnostic packaging platform like snap and/or flatpak.

salim-b commented 3 months ago

I would lean towards publishing on a distribution-agnostic packaging platform like snap and/or flatpak.

Flatpak would be great!

VSCodium is available as a Flatpak (repo with Flatpak manifest is here). I guess that might serve as kind of a template to create a Positron Flatpak build. 🙂

jmcphers commented 2 months ago

See #4388 which is another glibc incompatibility with a similar cause.

caeu commented 2 months ago

I am stuck working on Centos 7 OS here and I guess many research institutions use servers with older systems.

lionel- commented 1 month ago

The Ark side of this issue is now fixed by https://github.com/posit-dev/ark/pull/486. We use the zig linker to dynamically link against glibc 2.26, which is sufficiently old to support platforms like RHEL8 or OpenSUSE 15.2.

jonvanausdeln commented 1 month ago

I just tried 2024.09.0-33 on Ubuntu 20. It does install, but can't get it to find my R install (installed via rig) nor my python (installed via pyenv). I see this in the "Extension Host" log:

2024-09-12 13:40:36.666 [error] Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/share/positron/resources/app/extensions/jupyter-adapter/prebuilds/linux-x64/node.napi.glibc.node)
wesm commented 1 month ago

It appears we will also need to create portable builds of our zeromq.js fork to work with older glibc

jonvanausdeln commented 1 month ago

Putting back into Triage for visibility and re-prioritization

jmcphers commented 1 month ago

This glibc problem is also an issue on Debian 11 as reported here: https://github.com/posit-dev/positron/issues/3854

jmcphers commented 1 month ago

Spent a bunch of time investigating how we can fix this. I was able to fix the glibc incompatibility issue by forcing a rebuild of the offending linux-x64/node.napi.glibc.node file. This is what the CI step looks like:

      # The ZeroMQ npm package comes with pre-built Node API binaries for
      # linux-x64, but unfortunately their glibc prebuild is made for newer
      # Linux. We need to rebuild it against the older Ubuntu 20 glibc to
      # produce a build that works on older Linux releases.
      - name: Rebuild ZeroMQ node API binaries
        env:
          npm_config_arch: ${{ matrix.arch }}
        run: |
          # Enter the Jupyter Adapter's bundled zeromq node module folder
          cd extensions/jupyter-adapter/node_modules/zeromq

          # Install shelljs types (needed for compiling)
          npm i --no-save --no-package-lock --ignore-scripts @types/shelljs
          rm -rf node_modules/@types/glob

          # Recompile the prebuilds. This replaces the busted prebuild in
          # prebuilds/linux-x64/node.napi.glibc.node with a locally compiled
          # version.
          npm run prebuild

Unfortunately, while this produces a node.napi.glibc.node that has glibc compatibility, it also repeatedly crashes the extension host on Ubuntu 20 (w/o any useful error).

Instead of trying to wrestle the ZeroMQ binaries into submission here (unknown how much additional work that could be), we might defer this in favor of #4579.

petetronic commented 1 month ago

Logged https://github.com/posit-dev/positron/issues/4721 to track requests for Flatpak or Snap installers for Positron

denis-or commented 2 weeks ago

Hi guys. I tried to follow, but I'm not sure I understood. I would like to ask a question. Do the new releases address the issues regarding glibc?

jonvanausdeln commented 2 weeks ago

@denis-or , unfortunately, no the latest release does not address this issue.