microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.87k stars 29.15k forks source link

version `GLIBCXX_3.4.29' not found #180629

Open Android789515 opened 1 year ago

Android789515 commented 1 year ago

Type: Bug

Unsure if it's reproducible. All I needed to do was launch VS Code, no project, without extensions, and open the integrated terminal and I see this message:

/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib64/libproxy.so.1)

Failed to load module: /home/untitled1/snap/code/common/.cache/gio-modules/libgiolibproxy.so

I just upgraded to Fedora 38 and I keep my OS, Flatpaks, Snaps, and other software up to date daily.

VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:52.732Z) OS version: Linux x64 6.2.11-300.fc38.x86_64 snap Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 3999)| |GPU Status|2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off| |Load (avg)|2, 1, 1| |Memory (System)|15.50GB (9.75GB free)| |Process Argv|--no-sandbox --force-user-env --unity-launch| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|gnome-xorg| |XDG_CURRENT_DESKTOP|GNOME| |XDG_SESSION_DESKTOP|gnome-xorg| |XDG_SESSION_TYPE|x11|
Extensions (39) Extension|Author (truncated)|Version ---|---|--- spaces-inside-braces|Air|0.4.0 vscode-zipfs|arc|3.0.0 npm-intellisense|chr|1.4.4 path-intellisense|chr|2.8.4 vscode-css-modules|cli|0.5.1 vscode-eslint|dba|2.4.0 es7-react-js-snippets|dsz|4.4.3 vscode-html-css|ecm|1.13.1 vscode-firefox-debug|fir|2.9.8 haskell|has|2.2.4 haskell-linter|hoo|0.0.6 batch-rename-extension|Jan|0.0.6 react-context-menu|jef|0.0.7 language-haskell|jus|3.6.0 vscode-format-context-menu|lac|1.0.4 git-graph|mhu|1.30.0 vscode-docker|ms-|1.25.0 vscode-dotnet-pack|ms-|1.0.12 jupyter-keymap|ms-|1.1.0 jupyter-renderers|ms-|1.0.15 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.288.1 live-server|ms-|0.4.7 vscode-typescript-next|ms-|5.1.20230422 vsliveshare|ms-|1.0.5862 ocaml-platform|oca|1.12.2 vscode-jest|Ort|5.2.3 vscode-css-peek|pra|4.2.0 rust-analyzer|rus|0.3.1481 html5-boilerplate|sid|1.1.1 svg-preview|Sim|2.8.3 autoimport|ste|1.5.4 svelte-vscode|sve|107.3.0 sass-indented|syl|1.8.26 icons|tal|3.6.3 even-better-toml|tam|0.19.0 vscode-npm-scripts|tra|0.2.1 vscode-conventional-commits|viv|1.25.0 (4 theme extensions excluded)
milovangudelj commented 1 year ago

I have the same issue. Same scenario too. I upgraded to Fedora 38 a couple of weeks ago and VS Code got a massive performance hit. I struggle to use it sometimes, it takes too long to save files and prettify them especially when working on web projects (like Next.js websites) where I have a local development server constantly running.

Running strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX in my terminal shows me this

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_3.4.31
GLIBCXX_3.4.32
GLIBCXX_TUNABLES
GLIBCXX_DEBUG_MESSAGE_LENGTH

While this command strings /snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX outputs

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_DEBUG_MESSAGE_LENGTH

It looks like snap stops at GLIBCXX_3.4.28 while my system went further to GLIBCXX_3.4.32

rejahn commented 1 year ago

I can reproduce after upgrading to fedora 38 and updating the vs code with snap. Getting exact same output as @milovangudelj

@mjbvz @deepak1556 any tips?

milovangudelj commented 1 year ago

After updating everything to the latest version and installing VS Code through the official repo I still have performance issues with file creation, saving, git operations and intellisense...

TanukiSharp commented 1 year ago

I have the exact same problem, on Fedora 38 too, though it happens when I try to attach debugger.

/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib64/libproxy.so.1)

In the /snap/ directory I have core18, core20 and core22. Here are the strings telling:

$ strings /snap/core18/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4

...
GLIBCXX_3.4.24
GLIBCXX_3.4.25
$ strings /snap/core20/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4

...
GLIBCXX_3.4.27
GLIBCXX_3.4.28
$ strings /snap/core22/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4

...
GLIBCXX_3.4.29
GLIBCXX_3.4.30

The non-snap one also has the required version:

$ strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

...
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_3.4.31
GLIBCXX_3.4.32
...

EDIT: I'm on a clean install of Fedora 38, not an upgrade from older versions.

Dennyfentow commented 1 year ago

this same error occurs in the RPM version of VScode, however it does not print anything in the console as in the snap version, to resolve it was returned to version 1.78.2, versions 1.79.0, 1.79.1 and 1.79.2 still have this problem. to return to version 1.78.2 of vscode in fedora just run the following code below:

sudo dnf remove code -y && sudo dnf install code-1.78.2 -y

milovangudelj commented 1 year ago

Reverting back to v1.78.2 didn't work for me. It still hangs on save/pretty printing/git actions/file creation/intellisense and possibly more stuff I haven't used recently.

dpeger commented 1 year ago

Same problem here on Ubuntu 22.04 jammy.

dpeger@jammy ~ % snap list code --all
Name  Version   Rev  Tracking       Publisher  Notes
code  695af097  132  latest/stable  vscode✓    disabled,classic
code  660393de  133  latest/stable  vscode✓    classic

I installed the vscode snap and get this error on all git related actions in the terminal

/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/dpeger/snap/code/common/.cache/gio-modules/libgiolibproxy.so

It however looks like the actual git command (e.g. git pull or git checkout) succeeds.

If I trigger a failing action - like git pull on a missing remote - from the UI. The above error message is also shown. But I think it's "just" shadowing the actual error message returned from git.

image

/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/dpeger/snap/code/common/.cache/gio-modules/libgiolibproxy.so
/snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /home/dpeger/snap/code/common/.cache/gio-modules/libgiolibproxy.so
fatal: couldn't find remote ref branches/main/no-remote

I already tried to revert the snap to 695af097 but I get the same errors with this version.

lukebrichey commented 1 year ago

I encountered this problem when using the VSCode snap on Ubuntu 22.04 and running an Electron app. The app was failing because it couldn't find the GLIBCXX_3.4.29 version.

The problem seems to be that snaps are sandboxed and don't have access to system libraries in /usr/lib, which is where the required GLIBCXX_3.4.29 version was located on my system.

I solved this problem by removing the VSCode snap and installing VSCode from a .deb package downloaded directly from the VSCode website. Here's what I did:

  1. Removed the snap: sudo snap remove code
  2. Downloaded the .deb package from the VSCode website.
  3. Installed the .deb package: sudo apt install ./<downloaded-file.deb>

After switching to the .deb version of VSCode, my Electron app was able to find the GLIBCXX_3.4.29 version and ran without any problems. I hope this helps in some form.

rejahn commented 1 year ago

I encountered this problem when using the VSCode snap on Ubuntu 22.04 and running an Electron app. The app was failing because it couldn't find the GLIBCXX_3.4.29 version.

The problem seems to be that snaps are sandboxed and don't have access to system libraries in /usr/lib, which is where the required GLIBCXX_3.4.29 version was located on my system.

I solved this problem by removing the VSCode snap and installing VSCode from a .deb package downloaded directly from the VSCode website. Here's what I did:

1. Removed the snap: `sudo snap remove code`

2. Downloaded the .deb package from the VSCode website.

3. Installed the .deb package: `sudo apt install ./<downloaded-file.deb>`

After switching to the .deb version of VSCode, my Electron app was able to find the GLIBCXX_3.4.29 version and ran without any problems. I hope this helps in some form.

I guess it is a workaround but not really the solution to the problem related to snap. In my case vscode works propely, but the error messages in every integrated shell just annoy me.

prechy123 commented 11 months ago

I have the same issue. Same scenario too. I upgraded to Fedora 38 a couple of weeks ago and VS Code got a massive performance hit. I struggle to use it sometimes, it takes too long to save files and prettify them especially when working on web projects (like Next.js websites) where I have a local development server constantly running.

Running strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX in my terminal shows me this

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30
GLIBCXX_3.4.31
GLIBCXX_3.4.32
GLIBCXX_TUNABLES
GLIBCXX_DEBUG_MESSAGE_LENGTH

While this command strings /snap/core20/current/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX outputs

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_DEBUG_MESSAGE_LENGTH

It looks like snap stops at GLIBCXX_3.4.28 while my system went further to GLIBCXX_3.4.32

currently with this issue too, any fix now?

dbarnett commented 8 months ago

Can someone summarize knowns & unknowns on this issue?

Seems like it's specific to vscode installed via snap and that it's due to a dependency version mismatch where a newer "code" snap depends on the "core20" base snap to provide a newer libstdc++ than it's providing?

For impact, seems like it's mostly performance issues but nothing outright breaks?

And as a user there's no real workaround to get a working snap because the bug is in VS Code's snap build, relying on GLIBCXX_3.4.29 while configuring its snapcraft.yaml for base: core20 which can't satisfy the dependency?

petriggg commented 6 months ago

Can someone summarize knowns & unknowns on this issue?

Seems like it's specific to vscode installed via snap and that it's due to a dependency version mismatch where a newer "code" snap depends on the "core20" base snap to provide a newer libstdc++ than it's providing?

For impact, seems like it's mostly performance issues but nothing outright breaks?

And as a user there's no real workaround to get a working snap because the bug is in VS Code's snap build, relying on GLIBCXX_3.4.29 while configuring its snapcraft.yaml for base: core20 which can't satisfy the dependency?

How I fixed it: Uninstall snap version of VSCode (Ubuntu Software > Installed > code > uninstall) Install .deb or .rpm (depend on your OS) from VSC official site https://code.visualstudio.com/download

Next steps can work for you if you also use Intel Integrated Graphic Card (reference: https://www.reddit.com/r/Ubuntu/comments/1ah7ifo/comment/kqh4sd1/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)

Try removing intel-i915-dkms and install intel-i915 drivers, it worked for me

sudo apt remove intel-i915-dkms  
sudo add-apt-repository ppa:oibaf/graphics-drivers  
sudo apt update  
sudo apt dist-upgrade  
sudo reboot  

sudo lshw -c video | grep 'configuration'

This should show

driver=i915

ihmpartners commented 5 months ago

A year on and I have exactly the same issue. I have tried just about everything including building VM's on other machines but once I get a piece of code running it crashes because it can't find the GLIBCXX_3.4.29. The library is present in core 22 but not in core 20. In my case it's a piece of code developed using GLIB which crashes at runtime trying to open a web socket.

Running from VScode ( either snap version or .Deb install ) gets a similar segmentation issue. vscode installed from snap however gives more verbose info.

AmruthGudigar111 commented 3 months ago

Try this Thread https://askubuntu.com/a/786944