Skip to content

Spurious failure of core install: "platform ... is not available for your OS", despite package index providing tool dependency for OS (Linux) #2778

Closed as not planned
@haydenth

Description

@haydenth

Describe the problem

I've created a packages file visible below. Or you can find here:

https://raw.githubusercontent.com/atmosphericiq/aiq-board-defs/refs/heads/main/package_atmosphericiq_index.json
{
  "packages": [
    {
      "name": "atmosphericiq",
      "maintainer": "Atmospheric IQ",
      "websiteURL": "https://github.com/atmosphericiq/aiq-board-defs",
      "email": "[email protected]",
      "platforms": [
        {
          "name": "AtmosphericIQ CBOT Boards",  
          "architecture": "stm32", 
          "version": "1.0.0", 
          "category": "Contributed",
          "url": "https://github.com/atmosphericiq/aiq-board-defs/archive/refs/tags/v1.0.0.zip",
          "archiveFileName": "v1.0.0.zip", 
          "checksum": "SHA-256:328fcd7a9b3eca5893c3a385cac629ae942eb5afeef353dcd1acc7102e09a155",
          "size": "24638", 
          "boards": [
            {
              "name": "CBOT_V9"
            },
            {
              "name": "CBOT_V11"
            }
          ],
          "toolsDependencies": [
             {
              "packager": "STMicroelectronics",
              "name": "xpack-arm-none-eabi-gcc",
              "version": "13.2.1-1.1"
            }
          ]
        }
      ],
      "tools": [
                {
          "name": "xpack-arm-none-eabi-gcc",
          "version": "13.2.1-1.1",
          "systems":
          [
            {
              "host": "arm-linux-gnueabihf",
              "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-arm.tar.gz",
              "archiveFileName": "xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-arm.tar.gz",
              "checksum": "SHA-256:9a6db147c34f7ea668cc37a139d2667a58f8b2bbee2359f23e48ffd300f8fc2f",
              "size": "257683778"
            },
            {
              "host": "aarch64-linux-gnu",
              "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-arm64.tar.gz",
              "archiveFileName": "xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-arm64.tar.gz",
              "checksum": "SHA-256:ab7f75d95ead0b1efb7432e7f034f9575cc3d23dc1b03d41af1ec253486d19de",
              "size": "265190134"
            },
            {
              "host": "i686-mingw32",
              "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-win32-x64.zip",
              "archiveFileName": "xpack-arm-none-eabi-gcc-13.2.1-1.1-win32-x64.zip",
              "checksum": "SHA-256:56b18ccb0a50f536332ec5de57799342ff0cd005ca2c54288c74759b51929e4f",
              "size": "306340878"
            },
            {
              "host": "x86_64-apple-darwin",
              "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-darwin-x64.tar.gz",
              "archiveFileName": "xpack-arm-none-eabi-gcc-13.2.1-1.1-darwin-x64.tar.gz",
              "checksum": "SHA-256:1ecc0fd6c31020aff702204f51459b4b00ff0d12b9cd95e832399881d819aa57",
              "size": "262217286"
            },
            {
              "host": "x86_64-linux-gnu",
              "url": "https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v13.2.1-1.1/xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz",
              "archiveFileName": "xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz",
              "checksum": "SHA-256:1252a8cafe9237de27a765376697230368eec21db44dc3f1edeb8d838dabd530",
              "size": "268158135"
            }
          ]
        }]
    }
  ]
}

I am on a linux system (Ubuntu)

$ uname -a
Linux stardust 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Yet when I go to install this package, I get the following error

~/.arduino15/packages/STMicroelectronics $ arduino-cli core update-index
Downloading index: package_index.tar.bz2 downloaded
Downloading index: package_atmosphericiq_index.json downloaded

~/.arduino15/packages/STMicroelectronics $ arduino-cli core install atmosphericiq:stm32
Error during install: Platform 'atmosphericiq:stm32' not found: platform is not available for your OS

If I remove the toolsDependencies and set it to just:

 "toolsDependencies": []

I installs fine, but obviously I don't have the tool I need installed.

To reproduce

  1. On a linux system, use the packages file specified above
  2. Try to install arduino-cli core install atmosphericiq:stm32
  3. See error message

The verbose flag doesn't help very much:

INFO[0000] Loaded tool                                   tool="STMicroelectronics:[email protected]"
INFO[0000] Loaded tool                                   tool="STMicroelectronics:[email protected]"
INFO[0000] Loaded tool                                   tool="STMicroelectronics:[email protected]"
INFO[0000] Loaded tool                                   tool="STMicroelectronics:[email protected]"
INFO[0000] Loaded tool                                   tool="STMicroelectronics:[email protected]"
INFO[0000] Loading package arduino from: /home/tom/.arduino15/packages/arduino/hardware
INFO[0000] Missing signature file                        index=/home/tom/.arduino15/packages/arduino/hardware/avr/1.8.6/installed.json
INFO[0000] Adding monitor tool                           protocol=serial tool="builtin:serial-monitor"
INFO[0000] Loaded platform                               platform="arduino:[email protected]"
INFO[0000] Checking existence of 'tools' path: /home/tom/.arduino15/packages/arduino/tools
INFO[0000] Loading tools from dir: /home/tom/.arduino15/packages/arduino/tools
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loaded tool                                   tool="arduino:[email protected]"
INFO[0000] Loading package atmosphericiq from: /home/tom/.arduino15/packages/atmosphericiq/hardware
INFO[0000] Loading package builtin from: /home/tom/.arduino15/packages/builtin
INFO[0000] Checking existence of 'tools' path: /home/tom/.arduino15/packages/builtin/tools
INFO[0000] Loading tools from dir: /home/tom/.arduino15/packages/builtin/tools
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loaded tool                                   tool="builtin:[email protected]"
INFO[0000] Loading package esp32 from: /home/tom/.arduino15/packages/esp32/hardware
INFO[0000] Missing signature file                        index=/home/tom/.arduino15/packages/esp32/hardware/esp32/3.0.7/installed.json
INFO[0000] Adding monitor tool                           protocol=serial tool="builtin:serial-monitor"
INFO[0000] Loaded platform                               platform="esp32:[email protected]"
INFO[0000] Checking existence of 'tools' path: /home/tom/.arduino15/packages/esp32/tools
INFO[0000] Loading tools from dir: /home/tom/.arduino15/packages/esp32/tools
INFO[0000] Loaded tool                                   tool="esp32:esp-rv32@2302"
INFO[0000] Loaded tool                                   tool="esp32:esp-x32@2302"
INFO[0000] Loaded tool                                   tool="esp32:esp-xs2@2302"
INFO[0000] Loaded tool                                   tool="esp32:esp-xs3@2302"
INFO[0000] Loaded tool                                   tool="esp32:esp32-arduino-libs@idf-release_v5.1-632e0c2a"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]_20231023"
INFO[0000] Loaded tool                                   tool="esp32:[email protected]_20231023"
INFO[0000] Adding libraries dir                          dir=/home/tom/.arduino15/packages/arduino/hardware/avr/1.8.6/libraries isSingleLibrary=false location=platform
INFO[0000] Adding libraries dir                          dir=/home/tom/.arduino15/packages/STMicroelectronics/hardware/stm32/2.8.1/libraries isSingleLibrary=false location=platform
INFO[0000] Adding libraries dir                          dir=/home/tom/.arduino15/packages/esp32/hardware/esp32/3.0.7/libraries isSingleLibrary=false location=platform
INFO[0000] Loading libraries index file                  index=/home/tom/.arduino15/library_index.json
INFO[0000] Adding libraries dir                          dir=/home/tom/Arduino/libraries isSingleLibrary=false location=user
INFO[0000] Running from console, will run post-install by default
INFO[0000] Running from console, will run pre-uninstall by default
Error during install: Platform 'atmosphericiq:stm32' not found: platform is not available for your OS

Expected behavior

I would expect it to install both the xpack-arm-none-eabi-gcc-13.2.1-1.1-linux-x64.tar.gz and the package itself.

Arduino CLI version

arduino-cli Version: nightly-20241207 Commit: 6dbff9f Date: 2024-12-07T01:34:43Z

Operating system

Linux

Operating system version

Linux stardust 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

conclusion: invalidIssue/PR not validtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions