positron icon indicating copy to clipboard operation
positron copied to clipboard

Positron does not run on Ubuntu 20 (glibc incompatibility)

Open jmcphers opened this issue 1 year ago • 13 comments

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

jmcphers avatar Jul 03 '24 20:07 jmcphers

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.

lionel- avatar Jul 13 '24 11:07 lionel-

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. 🙂

salim-b avatar Jul 22 '24 22:07 salim-b

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

jmcphers avatar Aug 19 '24 22:08 jmcphers

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

  • Is it possible to provide, or reference, the instructions & requirements on how to build positron from source that one can follow in hope to produce a compatible application for the underlying OS.

  • Or perhaps if possible to try a release that is build with "musl" instead of glibc. Musl builds are statically linked and do not care about glibc. They work nice, but fall short in some functionalities in my limited experience.

caeu avatar Aug 23 '24 09:08 caeu

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.

lionel- avatar Sep 10 '24 09:09 lionel-

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)

jonvanausdeln avatar Sep 12 '24 21:09 jonvanausdeln

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

wesm avatar Sep 12 '24 22:09 wesm

Putting back into Triage for visibility and re-prioritization

jonvanausdeln avatar Sep 13 '24 15:09 jonvanausdeln

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

jmcphers avatar Sep 17 '24 17:09 jmcphers

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.

jmcphers avatar Sep 17 '24 17:09 jmcphers

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

petetronic avatar Sep 18 '24 15:09 petetronic

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?

denis-or avatar Oct 11 '24 14:10 denis-or

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

jonvanausdeln avatar Oct 11 '24 15:10 jonvanausdeln

These platforms should work with the latest release (2025.03.0-74).

jmcphers avatar Feb 22 '25 17:02 jmcphers

These platforms should work with the latest release (2025.03.0-74).

Thanks Jonathan @jmcphers for the update. Will this be released next week? The latest release that I am seeing is 2025.02.0-171

clydeugene avatar Feb 23 '25 07:02 clydeugene

2025.03.0-74 is an internal daily build -- we'll get an updated release out once we're done with testing and validation.

jmcphers avatar Feb 24 '25 00:02 jmcphers

Verified on RHEL8, Ubuntu 20 & Debian 12.

However, see issues #6459 and #6460

jonvanausdeln avatar Feb 24 '25 19:02 jonvanausdeln

Looks great on Linux Mint 20. thks

denis-or avatar Mar 07 '25 20:03 denis-or