Skip to content

Running task reports "need to run as root or suid" issure #178100

@wanghaiqiangk

Description

@wanghaiqiangk

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: Version: 1.76.2
  • OS Version: Ubuntu 16.04 | Linux x64 4.15.0-142-generic

There is a similar issue #105403, which was locked leaving no explanation or solution.

In my case, I have a tasks.json

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build Project",
            "type": "shell",
            "command": "catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=ON install",
            "options": {
                "cwd": "${workspaceFolder}"
            },  
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": false,
                "panel": "shared",
                "showReuseMessage": true,
                "clear": false
            },
            "problemMatcher": "$gcc"
        }
    ]
}

It does not always fail, but once it happens, it outputs the following message:

*  Executing task: catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=ON install 

Base path: /home/wang/myproj/proj
Source space: /home/wang/myproj/proj/src
Build space: /home/wang/myproj/proj/build
Devel space: /home/wang/myproj/proj/devel
Install space: /home/wang/myproj/proj/install
####
#### Running command: "cmake /home/wang/myproj/proj/src -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCATKIN_DEVEL_PREFIX=/home/wang/myproj/proj/devel -DCMAKE_INSTALL_PREFIX=/home/wang/myproj/proj/install -G Unix Makefiles" in "/home/wang/myproj/proj/build"
####
need to run as root or suid
Invoking "cmake" failed

 *  The terminal process "/usr/bin/zsh '-c', 'catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=ON install'" terminated with exit code: 1.

As the echoed command says, I didn't require root privilege. When this happens, another invocation may succeed to running the task without any problem.

Steps to Reproduce:

This is uncontrollable and I don't know how to reproduce.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions