Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users can accidentaly install non-functional Codium due missing dependency information on older enterprise distributions e.g.CentOS7 #644

Closed
Sinihopea opened this issue Feb 17, 2021 · 16 comments
Labels
bug Something isn't working

Comments

@Sinihopea
Copy link

Updating into the latest Codium RPM will leave program in partially non-functional state due changed CXXABI requirements in upstream. These dependencies haven't been properly specified in the RPM .spec file and so doing e.g. "yum upgrade" will suddenly cause Codium to have some major unexpected issues. I just encountered this problem yesterday having updated my workstation.

RHEL7 and CentOS7 do not and will not offer the newer CXXABI newer Codium requires. This stems from upstream change in VSCode itself where they moved to Electron Framework 11 which has a dependency to newer C++ libraries. The lack of these newer libraries leads to for example non-functional terminal within Codium and several extensions breaking.

Their changelog notice about this: https://code.visualstudio.com/updates/v1_53#_electron-11-update

Upstream has had several issues about this which are closed because it's "won't fix" issue. Only thing users can do is to upgrade into newer C++ toolchain or downgrade the editor itself. For example some of these threads:

I downgraded and added lock into Codium and things work now. I fully understand and do not expect Codium to receive any longer updates which will work on CentOS7. However it would be nice if you could add into RPM .spec file that Codium now requires this specific level of CXXABI to fully function.

Like mentioned by this user: microsoft/vscode#115784 (comment)

Thank you.

@Sinihopea Sinihopea added the bug Something isn't working label Feb 17, 2021
@daiyam
Copy link
Member

daiyam commented Feb 17, 2021

Can you do a PR?

@Sinihopea
Copy link
Author

Sinihopea commented Feb 18, 2021

Eh? No. I'm an end-user of Codium who stumbled into this issue. I don't know if they've updated the RPM .spec in VSCode upstream. I mostly just wanted to bring this bug to your attention because current Codium "el7" package isn't actually compatible with el7 because of this dependency problem. Without beforehand information about this issue users who update Codium to latest version will break their editor in el7 distros such as CentOS7.

@paulcarroty
Copy link
Collaborator

paulcarroty commented Feb 18, 2021

The workaround

VSCode (and VSCcodium too) now use Electron 11 & Ubuntu 18.04, so old distros will get problems sooner or later. Solution: upgrade to new OS release or use/create the backports.

@Sinihopea
Copy link
Author

The workaround

VSCode (and VSCcodium too) now use Electron 11 & Ubuntu 18.04, so old distros will get problems sooner or later. Solution: upgrade to new release or use/create the backports.

You probably didn't read what I wrote. I don't mind using old version of Codium. What I am concerned is that suddenly out of blue my editor broke one morning because somewhere, somebody, pushed a button and released new EL7 Codium package into software repository which wasn't actually EL7 compatible. Fix is very simply just adding something like (I don't precisely know the format):

Requires: libstdc++.so.6(CXXABI_1.3.9)

...into the RPM .spec file which is used to build the Codium package. Package manager then knows it cannot install this into the system just straight. But because of poorly defined dependencies this non EL7 compatible package can just flow straight through when updating the system.

Furthermore that suggested "workaround" wouldn't be an acceptable solution if I cared about staying on the latest version of Codium. What that person suggested is compiling and installing a rogue out-of-package-system install of GCC and it's libraries into OS to be used only with the Codium. There are better solutions for this kind of fix such as AppImage, Flatpak, etc.

The whole point of Enterprise Linux Platform is that it provides and delivers a stability and continuity which won't be broken during its lifecycle. Since VSCode (Codium) need to break it, they should stop releasing updates which claim to be EL7 and not release a broken update that won't work on EL7 platform. And that's fully understandable. It's natural cycle of things since EL7 is nearing end of its life.

Also yes, the real solution is upgrading to a newer EL8 platform. However there are tons of software out there which still need to be maintained for customers running EL7 whom aren't willing to invest into upgrade yet.

@paulcarroty
Copy link
Collaborator

What I am concerned is that suddenly out of blue my editor broke one morning because somewhere

This commit switched the VSCodium build agent to Bionic. As you can see, Centos 7 image isn't even around. The .spec you're talking about used only for compressing compiled binaries to rpm.

The main problem - Centos 7 doesn't provide CXXABI_1.3.9 'cause his GCC is too old. It's why upgrading to v9 and recompiling works.

@Sinihopea
Copy link
Author

The main problem - Centos 7 doesn't provide CXXABI_1.3.9 'cause his GCC is too old. It's why upgrading to v9 and recompiling works.

No, the main problem is that a package marked as EL7 compatible, isn't EL7 compatible. In this case Codium and Code. There is no RHEL7, CentOS7, Scientific Linux 7, Oracle Linux 7, etc. which ships with GCC 5.1 or newer which would have the CXXABI_1.3.9. EL7 is based around GCC 4.8.x and it is not going to change.

https://access.redhat.com/solutions/19458

In my opinion there are few options here, such as either the .spec is adjusted and non-compatible RPM packages drop the claim that they're EL7, or switch to EL8 base, or adjust dependencies so that it's again el7 compatible (which isn't going to happen according to Code devs). The fact that it's repackaged is not the point. I don't quite follow what you're trying to say.

@paulcarroty
Copy link
Collaborator

paulcarroty commented Mar 2, 2021

No, the main problem is that a package marked as EL7 compatible

Do you have any proof of Centos 7 (RHEL 7, OL7 etc) compatibility or this is your own fantasy?

@daiyam
Copy link
Member

daiyam commented Mar 2, 2021

@paulcarroty In vscodium/vscode/resources/linux/rpm/code.spec.template, the line 3 is Release: @@RELEASE@@.el7.

@paulcarroty
Copy link
Collaborator

Centos 7 isn't supported by Electron anymore:

the following are the distros known to work for the x64 desktop app:

  • Ubuntu 16.04 and newer
  • Fedora 24 and newer
  • Debian 9 and newer
  • CentOS 8 and newer

@daiyam
Copy link
Member

daiyam commented Mar 2, 2021

Then maybe we should make a patch so the line 3 became Release: @@RELEASE@@.el8? Will it be ok?

@paulcarroty
Copy link
Collaborator

@daiyam yes, absolutely.

@paulcarroty
Copy link
Collaborator

@GitMensch can you add the list to #649?

@daiyam
Copy link
Member

daiyam commented Mar 2, 2021

I've done the PR #660 with the mentioned change.

@GitMensch
Copy link
Collaborator

@paulcarroty wrote

@GitMensch can you add the list to #649?

No because it got merged in the meantime. If @stripedpajamas wants that I'll create a new PR adding this as a sub-item (I did not do this myself because the list is never complete giving the number of distros...

... and shouldn't CentOS7 still work when using the AppImage?

@paulcarroty
Copy link
Collaborator

and shouldn't CentOS7 still work when using the AppImage?

Rendering issues, and VSC contributor suggests to use remote development flow on Centos 7. So it will be completely broken sooner or later.

Since CentOS 7 is no longer on the supported distro in upstream, I don't think its worth spending time to narrow down a minimal repro.

@Sinihopea
Copy link
Author

Sinihopea commented Mar 4, 2021

Then maybe we should make a patch so the line 3 became Release: @@RELEASE@@.el8? Will it be ok?

Yes, thank you. And while you're at it, please add Requires: libstdc++.so.6(CXXABI_1.3.9) so that package managers like yum, dnf, zypper, etc. can tell what this package requires to run at minimum as well and resolve the dependencies on their own. And in the case of CentOS7 and EL7 distributions in-general block the install process since EL7 distros do not support that newer ABI. This is why this issue exists.

@GitMensch GitMensch mentioned this issue Jul 29, 2021
2 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants