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

Update rpm dependencies file for newer CXXABI requirement #115784

Closed
tazerdev opened this issue Feb 4, 2021 · 108 comments · Fixed by #117994 or #129360
Closed

Update rpm dependencies file for newer CXXABI requirement #115784

tazerdev opened this issue Feb 4, 2021 · 108 comments · Fixed by #117994 or #129360
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux verified Verification succeeded
Milestone

Comments

@tazerdev
Copy link

tazerdev commented Feb 4, 2021

VS Code Version: 1.53.0
OS: RHEL7.9

Error:
The terminal process failed to launch: A native exception occurred during launch (/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/node-pty/build/Release/pty.node)).

$ strings /lib64/libstdc++.so.6 | grep CXXABI
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_TM_1
@vscodebot
Copy link

vscodebot bot commented Feb 4, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@gjsjohnmurray
Copy link
Contributor

See Breaking Change section at https://code.visualstudio.com/updates/v1_53#_performance-improvements

@gjsjohnmurray
Copy link
Contributor

@dcourtois
Copy link

Same issue here. Unfortunately CentOS 7 is still wildly use in some areas, and the links pointed to by @gjsjohnmurray explains the cause, but unfortunately doesn't provide any workaround.
Is there any workaround known at this point ? This is a pretty important issue, right now VSCode is just not usable: git doesn't work nor the terminal and most of the extensions like C/C++, CMake Tools, etc. It's reverted to a simple text editor)

@tazerdev
Copy link
Author

tazerdev commented Feb 5, 2021

From the changelog:

With these changes, 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

Note: Our remote development components continue to use GLIBCXX 3.4.19, so there is no change in supported platforms.

So I guess my next question would be why, if it's no longer a supported platform, is CentOS7 being given an RPM that's meant for CentOS8?

@gjsjohnmurray
Copy link
Contributor

Is there any workaround known at this point ?

@dcourtois previous versions can be downloaded by going to https://code.visualstudio.com/updates and choosing the version from the sidebar, then using the download link on its release notes.

I assume you are using CentOS 7 as your desktop, right? And can't use any of the workarounds offered in the 1.53 release notes?

A workaround for the other distros would be to install gcc-5 or higher toolchain to avoid the GLIBCXX error with native modules, but there is no guarantee that all components of the runtime will work fine. There is also the option of using our remote development suite to work with the older distros.

@RudiFueller
Copy link

If you are affected by this issue, let me tell you what I did:

  • Download a recent gcc-tarball from a GNU mirror + compile
  • Take the content of x86_64-pc-linux-gnu/libstdc++-v3/src/.libs and copy to a dir of your choice (eg. ~/lib64/libstdc++-v3)
  • Write a start wrapper for vscode, put your extended LD_LIBRARY_PATH in the wrapper
  • Open vscode with the wrapper -> done.

@Tyriar
Copy link
Member

Tyriar commented Feb 5, 2021

Sorry but we needed to move forward to support the new version of Electron. Here are your options:

  • Upgrade your OS
  • If you're remoting into the machine you can use the remote development extensions or codespaces because this only affects Electron (desktop), not node (remote server)
  • Try install the compatible binaries as suggested above Update rpm dependencies file for newer CXXABI requirement #115784 (comment), YMMV with this approach
  • Use an older version of VS Code - not only will you miss out on new updates but also security updates so this isn't recommended

@Tyriar Tyriar closed this as completed Feb 5, 2021
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Feb 5, 2021
@tazerdev
Copy link
Author

tazerdev commented Feb 5, 2021

@Tyriar

Understood but the 1.53 RPM shouldn't install on a RHEL7/CentOS7 based system in the first place because RHEL7 has a standardized GLIBC that will be maintained throughout its lifecycle. The rpmspec should include a requires statement based on GLIBC version and the rpms should be provided in an EL compatible repository (i.e., RHEL7 and RHEL8 rpms are maintained in separate locations.)

As it stands VS Code is breaking the packaging standards of the platform and causing problems for users. If you can direct me to the appropriate area I'll gladly open a bug request there.

@Tyriar
Copy link
Member

Tyriar commented Feb 5, 2021

@tazerdev good point, @deepak1556 we need to update the deps in https://github.com/microsoft/vscode/blob/master/resources/linux/rpm/dependencies.json. Historically I just pull in whatever Chromium targets in their spec.

@Tyriar Tyriar reopened this Feb 5, 2021
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux and removed *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Feb 5, 2021
@deepak1556 deepak1556 added the candidate Issue identified as probable candidate for fixing in the next release label Feb 5, 2021
@deepak1556 deepak1556 added this to the January 2021 Recovery milestone Feb 5, 2021
@deepak1556 deepak1556 removed the candidate Issue identified as probable candidate for fixing in the next release label Feb 5, 2021
@hardik-singhal
Copy link

Unable to open vscode debugg console and terminal after vs code update. Is there any solution yet.
I am using centos 7 and can't install any library mention in the error**

@elulcao
Copy link

elulcao commented Feb 6, 2021

Not only Centos has been affected, but also other flavors like OL7 which is a variant of the RH7, etc...
Some env cannot be upgraded/updated for different reasons, so I guess VSCode needs to evaluate how to
make compatible again this new Drop of code1.53
Sharing the stack trace for tracking purpose.

cat /etc/*release
Oracle Linux Server release 7.9
NAME="Oracle Linux Server"
VERSION="7.9"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Oracle Linux Server 7.9"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:9:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.9
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.9
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Oracle Linux Server release 7.9
[16111:0206/123246.162480:INFO:CONSOLE(618)] "%c  ERR color: #f33 /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/vscode-sqlite3/build/Release/sqlite.node): Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/vscode-sqlite3/build/Release/sqlite.node)
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1812)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1250:18)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5:2039)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at v (/usr/share/code/resources/app/out/vs/loader.js:3:12287)
    at Object.<anonymous> (/usr/share/code/resources/app/node_modules.asar/vscode-sqlite3/lib/sqlite3.js:1:77)
    at Module.u._compile (/usr/share/code/resources/app/out/vs/loader.js:3:12841)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1039:32)
    at Module._load (internal/modules/cjs/loader.js:932:14)
    at Function.f._load (electron/js2c/asar_bundle.js:5:12738)
    at Module.require (internal/modules/cjs/loader.js:1079:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at t (/usr/share/code/resources/app/out/vs/loader.js:4:101)
    at r.load (/usr/share/code/resources/app/out/vs/loader.js:3:13249)
    at r.load (/usr/share/code/resources/app/out/vs/loader.js:3:10262)
    at c (/usr/share/code/resources/app/out/vs/loader.js:4:10314)
    at Object.errorback (/usr/share/code/resources/app/out/vs/loader.js:4:10435)
    at r.triggerErrorback (/usr/share/code/resources/app/out/vs/loader.js:3:10626)
    at /usr/share/code/resources/app/out/vs/loader.js:3:10332
    at r.load (/usr/share/code/resources/app/out/vs/loader.js:3:13266)
    at r.load (/usr/share/code/resources/app/out/vs/loader.js:3:10262)
    at c (/usr/share/code/resources/app/out/vs/loader.js:4:10314)
    at r._loadModule (/usr/share/code/resources/app/out/vs/loader.js:4:10444)
    at r._resolve (/usr/share/code/resources/app/out/vs/loader.js:5:452)
    at r.defineModule (/usr/share/code/resources/app/out/vs/loader.js:4:6145)
    at r._relativeRequire (/usr/share/code/resources/app/out/vs/loader.js:4:6831)
    at n (/usr/share/code/resources/app/out/vs/loader.js:4:9420)
    at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:21:31382
    at new Promise (<anonymous>)
    at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:21:31362
    at new Promise (<anonymous>)
    at n.doConnect (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:21:31342)
    at n.connect (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:21:30812)
    at new n (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:21:28194)
    at Ot.doInitialize (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:29:16863)
    at Ot.initialize (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:29:16753)
    at M.init (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:47:2577)
    at new M (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:47:2523)
    at lt.openFirstWindow (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:55:82995)
    at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:55:77462
    at E.invokeFunction (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:26:25463)
    at lt.startup (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:55:77438)
    at async Y.startup (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:57:1448)", source: file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js (618)

@markusdd
Copy link

markusdd commented Feb 8, 2021

In my view this change is not acceptable. Especially RHEL7 and derivatives are very widely used in enterprise environments and there is no way just 'to upgrade' as usually other commercial tools (in our case EDA simulators) do not even exist yet for RHEL8.

This drops a bomb into the workflow of many I would suggest.

At least there should be a very clear documentation on how to work around this and this should also be tested continuously for new releases in my view.

The recommended remote server workflows are not compatbile with all IT setups where VS Code is being used.

@arthurspa
Copy link

If you are affected by this issue, let me tell you what I did:

  • Download a recent gcc-tarball from a GNU mirror + compile
  • Take the content of x86_64-pc-linux-gnu/libstdc++-v3/src/.libs and copy to a dir of your choice (eg. ~/lib64/libstdc++-v3)
  • Write a start wrapper for vscode, put your extended LD_LIBRARY_PATH in the wrapper
  • Open vscode with the wrapper -> done.

This worked like a charm!

@truatpasteurdotfr
Copy link

the same electon excuse has been raised for teams end of support on centos7...

@iostrym
Copy link

iostrym commented Jun 23, 2021

affected by this issue, let me tell you what I did:

* Download a recent gcc-tarball from a GNU mirror + compile

* Take the content of x86_64-pc-linux-gnu/libstdc++-v3/src/.libs and copy to a dir of your choice (eg. ~/lib64/libstdc++-v3)

* Write a start wrapper for vscode, put your extended LD_LIBRARY_PATH in the wrapper

* Open vscode with the wrapper -> done.

this is the workaround to have 1.53 working without CPU problem, right ?

could you provide a zip of the package that we need to place in LD_LIBRARY_PATH + example of wrapper for vscode ? because i'm not familiar with this :/

@arthurspa
Copy link

arthurspa commented Jun 23, 2021

affected by this issue, let me tell you what I did:

* Download a recent gcc-tarball from a GNU mirror + compile

* Take the content of x86_64-pc-linux-gnu/libstdc++-v3/src/.libs and copy to a dir of your choice (eg. ~/lib64/libstdc++-v3)

* Write a start wrapper for vscode, put your extended LD_LIBRARY_PATH in the wrapper

* Open vscode with the wrapper -> done.

this is the workaround to have 1.53 working without CPU problem, right ?

could you provide a zip of the package that we need to place in LD_LIBRARY_PATH + example of wrapper for vscode ? because i'm not familiar with this :/

I had the library already in my work environment, so I didn't need to download. I just exported the variable before running VSCode, e.g:

export LD_LIBRARY_PATH=/app/vbuild/RHEL7-x86_64/gcc/10.2.0/lib64/:$LD_LIBRARY_PATH
code ~/project_folder/

And this worked. I think you'd have to compile for your own environment. Here is where you can find the source code: http://ftp.gnu.org/gnu/gcc/gcc-10.2.0/

@kurt-cb
Copy link

kurt-cb commented Jul 1, 2021

IMHO, the correct solution to this problem is to provide a version of vscode that runs on centos 7 native. This can easily be done using the softwarecollections project (www.softwarecollections.org).

I was able to build the vscode open source using DevToolset-10 C++ compiler toolchain. This allows it to run native on centos-7
This is the docker file I used, and is on docker hub at kurtgo/vscode-centos7.

Devtoolset-10 is allows the entire thing to be built with compatible with centos7, using the latest gcc compiler.

Steps I used:

docker run -it -v /vsbuild:/home/kurtgo/vsbuild kurtgo/vscode-centos7 bash
# #git pull latest cpython, configure --prefix /user;make -j8 install
# cd /vsbuild;git clone  git@github.com:microsoft/vscode.git;cd vscode
# yarn
# yarn run gulp vscode-linux-x64
# cd ..
# tar cjf centos7-vscode.tar.bz2 vscode-linux-x64

Dockerfile I used to get dependencies:

from centos:7

run yum -y install curl; \
    curl -sL https://rpm.nodesource.com/setup_14.x | bash - ; \
    curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo; \
    rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg; \
    yum install -y yarn git zlib zlib-devel

run yum -y groupinstall "Development Tools"; \
    yum -y install libxkb*; \
    yum -y install libsecret-devel; \
    yum -y install libX11-devel.x86_64


run yum -y install centos-release-scl; \
    yum -y install devtoolset-10

run yum -y install libssl-devel zlib1g-devel libncurses5-devel \
  libncursesw5-devel libreadline-devel libsqlite3-devel libgdbm-devel \
  libdb5.3-devel libbz2-devel libexpat1-devel liblzma-devel libffi-devel
copy .bashrc /root/.bashrc

run yum -y install ncurses-devel openssl-devel readline-devel sqlite-devel

@keegandent
Copy link

IMHO, the correct solution to this problem is to provide a version of vscode that runs on centos 7 native. This can easily be done using the softwarecollections project (www.softwarecollections.org).

I was able to build the vscode open source using DevToolset-10 C++ compiler toolchain. This allows it to run native on centos-7
This is the docker file I used, and is on docker hub at kurtgo/vscode-centos7.

Devtoolset-10 is allows the entire thing to be built with compatible with centos7, using the latest gcc compiler.

I would suggest Devtoolset-7 considering the Ubuntu 18.04 CI they are treating as the primary linux target is GCC 7.4, but yes I absolutely agree that having an additional build route to maintain compatibility for Enterprise Linux 7 is not a big ask.

@kvnlmr
Copy link

kvnlmr commented Jul 20, 2021

We have a n easy workaround on our side with:

  • CentOS Linux release 7.9.2009 (Core)
  • Visual Studio Code 1.58.2

Instead of installing it with yum package manager, we install it through snapcraft.io

First, install Snap on CentOS:

sudo yum install epel-release -y
sudo yum install snapd -y
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

And then, install Visual Studio Code through Snap:

sudo snap install code --classic

@mati-o
Copy link

mati-o commented Aug 10, 2021

/verified

I am more than happy to confirm that 1.60.0-insider version works on CentOS 7! Many thanks!

@deepak1556 deepak1556 added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels Aug 10, 2021
@iostrym
Copy link

iostrym commented Aug 20, 2021

thanks. just to be sure, now we must also wait that stable version of vscode will get the correction. right ?

@tazerdev
Copy link
Author

Apologies that I missed the update. I won't be able to verify until Monday, but it's sufficient for me that others have been able to do so. I'll chime in once I am able to confirm.

@tazerdev
Copy link
Author

/verified

Thanks for fixing this issue.

@sskamesh
Copy link

/verified

working now with 1.60

@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2021
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders linux Issues with VS Code on Linux verified Verification succeeded
Projects
None yet