vscode-cmake-tools icon indicating copy to clipboard operation
vscode-cmake-tools copied to clipboard

Setting PATH In "cmake.environment" Causes ENOENT Failures

Open vindicatorr opened this issue 2 years ago • 1 comments

Type: Bug Settings.json:

    "cmake.environment": {
        "PATH": "/home/<pathTo>/riscv32-esp-elf/bin/:/usr/bin/",
...

Select kit:

[driver] Switching to kit: GCC Espressif RISCV
[proc] Executing command: /home/<pathTo>/riscv32-esp-elf/bin/riscv32-esp-elf-gcc -v

Configure:

...
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /home/<pathToProject>/build
[proc] The command: riscv32-esp-elf-gcc -v failed with error: Error: spawn riscv32-esp-elf-gcc ENOENT
[proc] The command: riscv32-esp-elf-g++ -v failed with error: Error: spawn riscv32-esp-elf-g++ ENOENT

But if I comment out that PATH, and add it to the .kit:

...
    "environmentVariables": {
    "PATH": "/home/<pathTo>/riscv32-esp-elf/bin/:/usr/bin/"
    }

... then re-select that kit (so the field gets read), configure, it completes fine:

...
[cmake] -- Configuring done
[cmake] -- Generating done
[cmake] -- Build files have been written to: /home/<pathToProject>/build

Extension version: 1.12.27 VS Code version: Code - OSS 1.72.0 (c4722f1bb292284e0437eb7547808a5788fe6430, 2022-09-02T06:52:06.316Z) OS version: Linux x64 6.0.1-dirty Modes: Sandboxed: No

System Info
Item Value
CPUs Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz (4 x 3392)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 3, 2, 2
Memory (System) 7.23GB (0.90GB free)
Process Argv --ms-enable-electron-run-as-node
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11

vindicatorr avatar Nov 11 '22 09:11 vindicatorr

Thank you for reporting this issue. We were able to repro it in Linux (not windows).

elahehrashedi avatar Nov 18 '22 16:11 elahehrashedi