Skip to content

Setting PATH In "cmake.environment" Causes ENOENT Failures #2855

Open

Description

@vindicatorr

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

Activity

  1. added this to the Backlog milestone on Nov 18, 2022
  2. elahehrashedi commented on Nov 18, 2022

    @elahehrashedi
    Contributor

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

  3. moved this from Triage Needed to Pending Prioritization in CMake Toolson Nov 29, 2023
  4. moved this from Pending Prioritization to To Do in CMake Toolson Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions