Hi,
I use vscode in pantherx-extra from my Guix OS.
It works great except for its “Live Share” feature.
Upon examination, it looks like it fails due to missing libraries for vsls-agent. (I am not too familiar with Linux though…)
$ ldd -d /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent
linux-vdso.so.1 (0x00007ffce05e8000)
libpthread.so.0 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0 (0x00007facb7848000)
libdl.so.2 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libdl.so.2 (0x00007facb7843000)
libstdc++.so.6 => not found
libm.so.6 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libm.so.6 (0x00007facb7702000)
libgcc_s.so.1 => not found
libc.so.6 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6 (0x00007facb753e000)
/lib64/ld-linux-x86-64.so.2 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2 (0x00007facb786a000)
undefined symbol: _ZTVN10__cxxabiv116__enum_type_infoE, version CXXABI_1.3 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZTTSt18basic_stringstreamIcSt11char_traitsIcESaIcEE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZNSt8ios_base4InitD1Ev, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZNSs4_Rep11_S_terminalE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZTTSt13basic_fstreamIcSt11char_traitsIcEE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZTVSt15basic_streambufIcSt11char_traitsIcEE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
undefined symbol: _ZNSs4_Rep20_S_empty_rep_storageE, version GLIBCXX_3.4 (/home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent)
Upon looking at a few pages, I found:
So I copied a section of it that didn’t seem to depend on Nix.
~$ cat a.sh
# patch ELF loaders where needed
GCCLIB=$(dirname $(gcc -print-file-name=libstdc++.so.6))
LOADER=$(dirname $(gcc -print-file-name=ld-linux-x86-64.so.2))
find ~/.vscode/extensions/ ~/.config/Code -type f -perm -100 -print0 | xargs -0 file \
| grep 'interpreter /lib' | cut -d: -f1 | while read f; do
echo "Patching $f" >&2
patchelf --set-interpreter "$LOADER" "$f"
RPATH=$(patchelf --print-rpath "$f")
patchelf --set-rpath "${RPATH+RPATH:}$GCCLIB" "$f"
done
It did something, but it still doesn’t work - I get ‘Permission denied’ error.
~$ bash a.sh
Patching /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/node_modules/clipboardy/fallbacks/linux/xsel
Patching /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent
Patching /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/Microsoft.VisualStudio.LiveShare.Debugger.VSCodeAdapter
Patching /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/Microsoft.VisualStudio.LiveShare.Debugger.VSCodeHostAdapter
Patching /home/yasu/.config/Code/User/globalStorage/ms-vsliveshare.vsliveshare/dotnet-3.1.14/dotnet
Patching /home/yasu/.config/Code/User/globalStorage/ms-vsliveshare.vsliveshare/dotnet-3.1.14/shared/Microsoft.NETCore.App/3.1.14/createdump
~$ ldd -d /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent
linux-vdso.so.1 (0x00007ffdac9a2000)
libpthread.so.0 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0 (0x00007f06d110a000)
libdl.so.2 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libdl.so.2 (0x00007f06d1105000)
libstdc++.so.6 => /gnu/store/sz3yhray6kzgp7d0k4pvxmpnzdpd69rk-gcc-11.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../libstdc++.so.6 (0x00007f06d0ef1000)
libm.so.6 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libm.so.6 (0x00007f06d0db0000)
libgcc_s.so.1 => /gnu/store/sz3yhray6kzgp7d0k4pvxmpnzdpd69rk-gcc-11.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.2.0/../../../libgcc_s.so.1 (0x00007f06d0d96000)
libc.so.6 => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6 (0x00007f06d0bd2000)
/home/yasu/.guix-profile/lib => /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2 (0x00007f06d112c000)
~$ /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent
bash: /home/yasu/.vscode/extensions/ms-vsliveshare.vsliveshare-1.0.5273/dotnet_modules/vsls-agent: Permission denied
Does anyone know how to make this work?