Nixpkgs: vscode cpptools extensions not working

Created on 18 Feb 2018  路  4Comments  路  Source: NixOS/nixpkgs

Issue description

The vscode cpptools extension is linked to /lib64/ld-linux-x86-64.so.2.

$ file ~/.vscode/extensions/ms-vscode.cpptools-0.15.0/bin/Microsoft.VSCode.CPP.Extension.linux 
/home/dehos/.vscode/extensions/ms-vscode.cpptools-0.15.0/bin/Microsoft.VSCode.CPP.Extension.linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=4ab2b1c13cd195245e581b35901048f97acd1dda, not stripped

So the extension fails when editing a C++ file with vscode:

[Error - 10:41:56 AM] Starting client failed Launching server using command /home/.../.vscode/extensions/ms-vscode.cpptools-0.15.0/bin/Microsoft.VSCode.CPP.Extension.linux failed.

This issue has been reported in the vscode repo (https://github.com/Microsoft/vscode-cpptools/issues/1345) but I think it is more a packaging problem.

stale

All 4 comments

I had this problem on Raspbian Desktop and, I solved it by installing AMD64 version of libc (sudo apt-get install libc6-dev:amd64), because uname -r returned 4.9.0-4-amd64, but libc was i386, VS Code was i386 and cpptools extension is amd64.

Before I only had /lib/ld-linux.so.2 and now I have /lib64/ld-linux-x85-64.so.2

If you use vscode-with-extensions and https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vscode-extensions/cpptools/default.nix then you can get it to work. Still haven't figured out if this means that I need to manage all my vscode extensions in nix tho.

I have this in my packageOverrides (pinnedPkgs is my thing):

      vscodeCpp = pinnedPkgs.vscode-with-extensions.override {
        vscodeExtensions = with vscode-extensions; [ ms-vscode.cpptools ];
      };

Alternative solution - https://discourse.nixos.org/t/vscode-extensions-setup/1801

This issue should be closed, as cpptools works in NixOS

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

samueldr picture samueldr  路  88Comments

danykey picture danykey  路  64Comments

purefn picture purefn  路  68Comments

timokau picture timokau  路  66Comments

thoughtpolice picture thoughtpolice  路  71Comments