Can't compile code in vscode

Hello,
when i try to build or upload the project from the vscode (even the new projects) i get this error

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103C8.html
PLATFORM: ST STM32 (16.1.0) > STM32F103C8 (20k RAM. 64k Flash)
HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES: 
 - framework-arduinoststm32 @ 4.20500.230714 (2.5.0) 
 - framework-cmsis @ 2.50700.210515 (5.7.0) 
 - toolchain-gccarmnoneeabi @ 1.100301.220327 (10.3.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 14 compatible libraries
Scanning dependencies...
Dependency Graph
|-- LiquidCrystal @ 1.0.7
|-- HCSR04 @ 2.0.0
|-- Wire @ 1.0.0
Building in release mode
Compiling .pio/build/genericSTM32F103C8/FrameworkArduinoVariant/PeripheralPins.c.o
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by arm-none-eabi-gcc)
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by arm-none-eabi-gcc)
Compiling .pio/build/genericSTM32F103C8/FrameworkArduinoVariant/PeripheralPins_MALYANM200_F103CB.c.o
Compiling .pio/build/genericSTM32F103C8/FrameworkArduinoVariant/generic_clock.c.o
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by arm-none-eabi-gcc)
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by arm-none-eabi-gcc)
Compiling .pio/build/genericSTM32F103C8/FrameworkArduinoVariant/startup_M200_f103xb.S.o
*** [.pio/build/genericSTM32F103C8/FrameworkArduinoVariant/PeripheralPins.c.o] Error 1
*** [.pio/build/genericSTM32F103C8/FrameworkArduinoVariant/PeripheralPins_MALYANM200_F103CB.c.o] Error 1
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by arm-none-eabi-gcc)
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by arm-none-eabi-gcc)
*** [.pio/build/genericSTM32F103C8/FrameworkArduinoVariant/generic_clock.c.o] Error 1
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by arm-none-eabi-gcc)
arm-none-eabi-gcc: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by arm-none-eabi-gcc)
*** [.pio/build/genericSTM32F103C8/FrameworkArduinoVariant/startup_M200_f103xb.S.o] Error 1

but i can easily build and upload the project from the CLI but when i try to do it from the ide it can’t compile.
i think the problem is from the toolchain installed with the pio but i don’t know how to change it.

Well that’s weird. pio run on the CLI works but not in inside the IDE? I thought that if the compiler binary complains about wrong GLIBC versions, the problem is at the operating system / installed packages level and neither should work.

Are you running VSCode as a Flatpak or in some other sort of virtualized / containerized environment?