Skip to content

Apple Silicon: PlatformIO fails with "Unknown system error -86" due to prebuilt Ninja #5290

@italocjs

Description

@italocjs

On macOS (Apple Silicon M4), building ESP32 projects fails when PlatformIO tries to run its prebuilt tool-ninja package. The error is:

CMake Error at .../project.cmake:381 (__project):
  Running
   '/Users/username/.platformio/packages/tool-ninja/ninja' '--version'
  failed with:
   Unknown system error -86

This happens even after:

  • Installing PlatformIO via Homebrew
  • Installing system-native Ninja and CMake
  • Removing ~/.platformio/packages/tool-ninja and other caches

Steps to Reproduce:

  1. On macOS, install VSCode.
  2. Install PlatformIO via Homebrew: brew install platformio.
  3. Create a new ESP32 project using ESP-IDF + Arduino framework.
  4. Attempt to build: platformio run --environment esp32dev -v.

Expected behavior:

  • PlatformIO should use system-native Ninja or properly install an Apple Silicon-compatible Ninja.
  • The project should build without error -86.

Actual behavior:

  • PlatformIO downloads its prebuilt tool-ninja (x86_64) and fails to execute on Apple Silicon, giving Unknown system error -86.

System info:

macOS Version: 26.0.1 (Build 25A362)
Architecture: arm64 (Apple Silicon)
PlatformIO Core: 6.1.18
VSCode: 1.105.1 (Universal)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions