Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not install adafruit:samd, no path to remediation articulated in message? #1626

Closed
jakimfett opened this issue Jan 17, 2022 · 2 comments · Fixed by #2092
Closed

Could not install adafruit:samd, no path to remediation articulated in message? #1626

jakimfett opened this issue Jan 17, 2022 · 2 comments · Fixed by #2092
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@jakimfett
Copy link

[shell:~/dev/feather]$ grep https /home/user/.arduino15/arduino-cli.yaml 
      https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

[shell:~/dev/feather]$ arduino-cli core search samd
Updating index: package_index.json downloaded                                                                                                                                                               
Updating index: package_index.json.sig downloaded                                                                                                                                                           
Updating index: package_adafruit_index.json downloaded                                                                                                                                                      
ID               Version Name                                            
Arrow:samd       2.1.0   Arrow Boards                                    
adafruit:samd    1.7.6   Adafruit SAMD Boards                            
arduino:samd     1.8.12  Arduino SAMD Boards (32-bits ARM Cortex-M0+)    
industruino:samd 1.0.1   Industruino SAMD Boards (32-bits ARM Cortex-M0+)


[shell:~/dev/feather]$ arduino-cli core install adafruit:samd
Downloading packages...
adafruit:arm-none-eabi-gcc@9-2019q4 already downloaded
arduino:bossac@1.7.0-arduino3 already downloaded
Error during install: tool arduino:bossac@1.8.0-48-gb176eee not available for the current OS

[shell:~/dev/feather]$ 

Bug Report

Current behavior

[shell:~/dev/feather]$ arduino-cli core install adafruit:samd
Downloading packages...
adafruit:arm-none-eabi-gcc@9-2019q4 already downloaded
arduino:bossac@1.7.0-arduino3 already downloaded
Error during install: tool arduino:bossac@1.8.0-48-gb176eee not available for the current OS

When attempting to install a new core, the install process fails with an unavailable dependency error.

Expected behavior

When attempting to install a new core, and the install process fails on a dependency, contextual information regarding how to take steps towards remediating the failure (Eg, who to contact regarding the dependency, how to compile said dependency, or even a link to where dependencies (and updates to them) get defined...something actionable).

Are dependencies like bossa(c) an arduino issue, even? Would I be better off taking this up with Adafruit?

Even just printing the program version, OS, and dependency link would be useful...because I have no idea how arduino-cli sees my homelab OS, but if it printed that I could a least search "update bossac for <OS_NAME>" and find something.

Environment

  • CLI version (output of arduino-cli version):

  • arduino-cli alpha Version: 0.18.1

  • OS and platform:

  • NixOS 21.11 (modified)

  • raspberry pi 4B (4gb)

Additional context

I'm more than willing to jump through the necessary hoops to get this working.

There's just not a lot of info to go on, and my attempts to discern the proper way from the docs have...not produced results.

@per1234
Copy link
Contributor

per1234 commented Jan 17, 2022

HI @jakimfett

contextual information regarding how to take steps towards remediating the failure (Eg, who to contact regarding the dependency, how to compile said dependency, or even a link to where dependencies (and updates to them) get defined...something actionable).

I think it is a reasonable request. Of course, there is nothing Arduino CLI can do to fix the problem of a package maintainer not having provided a tool compiled for your host architecture, but we might be able to enhance the error message using the metadata from the package that provides the tool.

In addition to benefiting the users, it could pay off in reducing the maintenance load for Arduino CLI since it does seem that people tend to think this error is caused by a problem in Arduino CLI rather than a deficiency in the platform they are attempting to install:

Are dependencies like bossa(c) an arduino issue, even? Would I be better off taking this up with Adafruit?

It is the responsibility of the maintainer of the package that provides the specific tool. Some of the packages are maintained by Arduino:
https://downloads.arduino.cc/packages/package_index.json
(this file contains packages maintained by partners in addition to the official ones)
and many others are maintained by 3rd parties with no direct involvement by Arduino.

In some cases, it is also the responsibility of the platform maintainer in that some platforms are specifying outdated toolsDependencies while the package maintainer has provided builds for the additional hosts in the newer versions of their tools. In that case, it would be better for the platform maintainer to make a new release for the updated tools rather than expecting the package maintainer to make additional builds of old tool releases.

In this particular case, the adafruit:samd@1.7.6 platform specifies a dependency on the arduino:bossac@1.8.0-48-gb176eee tool:
https://github.com/adafruit/arduino-board-index/blob/31a7ef719aee604b746d2692569d7072316462b1/package_adafruit_index.json#L8437-L8441

{
  "packager": "arduino",
  "name": "bossac",
  "version": "1.8.0-48-gb176eee"
}

You can see here that tool version is not provided for the aarch64 host architecture by the arduino package:
https://downloads.arduino.cc/packages/package_index.json

{
  "name": "bossac",
  "version": "1.8.0-48-gb176eee",
  "systems": [
    {
      "host": "i686-mingw32",
      "url": "http://downloads.arduino.cc/tools/bossac-1.8-48-gb176eee-i686-w64-mingw32.tar.gz",
      "archiveFileName": "bossac-1.8-48-gb176eee-i686-w64-mingw32.tar.gz",
      "checksum": "SHA-256:4523a6897f3dfd673fe821c5cfbac8d6a12782e7a36b312b9ee7d41deec2a10a",
      "size": "91219"
    },
    {
      "host": "x86_64-apple-darwin",
      "url": "http://downloads.arduino.cc/tools/bossac-1.8-48-gb176eee-i386-apple-darwin16.1.0.tar.gz",
      "archiveFileName": "bossac-1.8-48-gb176eee-i386-apple-darwin16.1.0.tar.gz",
      "checksum": "SHA-256:581ecc16021de36638ae14e9e064ffb4a1d532a11502f4252da8bcdf5ce1d649",
      "size": "39150"
    },
    {
      "host": "x86_64-pc-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/bossac-1.8-48-gb176eee-x86_64-linux-gnu.tar.gz",
      "archiveFileName": "bossac-1.8-48-gb176eee-x86_64-linux-gnu.tar.gz",
      "checksum": "SHA-256:1347eec67f5b90b785abdf6c8a8aa59129d0c016de7ff9b5ac1690378eacca3c",
      "size": "37798"
    },
    {
      "host": "i686-pc-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/bossac-1.8-48-gb176eee-i486-linux-gnu.tar.gz",
      "archiveFileName": "bossac-1.8-48-gb176eee-i486-linux-gnu.tar.gz",
      "checksum": "SHA-256:4c7492f876b8269aa9d8bcaad3aeda31acf1a0292383093b6d9f5f1d23fdafc3",
      "size": "37374"
    },
    {
      "host": "arm-linux-gnueabihf",
      "url": "http://downloads.arduino.cc/tools/bossac-1.8-48-gb176eee-arm-linux-gnueabihf.tar.gz",
      "archiveFileName": "bossac-1.8-48-gb176eee-arm-linux-gnueabihf.tar.gz",
      "checksum": "SHA-256:2001e4a592f3aefd22f213b1ddd6f5d8d5e74bd04080cf1b97c24cbaa81b10ed",
      "size": "34825"
    }
  ]
}

However, the arduino package does provide other versions of arduino:bossac for that architecture:
https://downloads.arduino.cc/packages/package_index.json

{
  "name": "bossac",
  "version": "1.9.1-arduino2",
  "systems": [
    {
      "host": "i686-mingw32",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-windows.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-windows.tar.gz",
      "checksum": "SHA-256:5c994d04354f0db8e4bea136f49866d2ba537f0af74b2e78026f2d4fc75e3e39",
      "size": "1260628"
    },
    {
      "host": "x86_64-apple-darwin",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-osx.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-osx.tar.gz",
      "checksum": "SHA-256:b7732129364a378676604db6579c9b8dab50dd965fb50d7a3afff1839c97ff80",
      "size": "47870"
    },
    {
      "host": "x86_64-pc-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-linux64.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-linux64.tar.gz",
      "checksum": "SHA-256:9eb549874391521999cee13dc823a2cfc8866b8246945339a281808d99c72d2c",
      "size": "399532"
    },
    {
      "host": "i686-pc-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-linux32.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-linux32.tar.gz",
      "checksum": "SHA-256:10d69f53f169f25afee2dd583dfd9dc803c10543e6c5260d106725cb0d174900",
      "size": "384951"
    },
    {
      "host": "arm-linux-gnueabihf",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-linuxarm.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-linuxarm.tar.gz",
      "checksum": "SHA-256:c9539d161d23231b5beb1d09a71829744216c7f5bc2857a491999c3e567f5b19",
      "size": "361915"
    },
    {
      "host": "aarch64-linux-gnu",
      "url": "http://downloads.arduino.cc/tools/bossac-1.9.1-arduino2-linuxaarch64.tar.gz",
      "archiveFileName": "bossac-1.9.1-arduino2-linuxaarch64.tar.gz",
      "checksum": "SHA-256:c167fa0ea223966f4d21f5592da3888bcbfbae385be6c5c4e41f8abff35f5cb1",
      "size": "442853"
    }
  ]
}

I'm more than willing to jump through the necessary hoops to get this working.

You are welcome to make a specific proposal for improvements to the Arduino CLI error message.

You can also check with Adafruit about updating the version of arduino:bossac they are using.

@NetworkAndSoftware
Copy link

Just ran into the same issue when trying to download the arduino-cli core for the SAMD21 Seeeduino Xiao on a Raspberry Pi 4 with Ubuntu 22.04 LTS. https://forum.seeedstudio.com/t/unable-to-install-xiao-tools-on-ubuntu-22-04-lts-on-raspberry-pi-4/267815

Why such insistence upon this odd version of BOSSA 1.8 ? I have a working version of 1.9.1 running on the system installed from an apt package that comes with Jammy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
4 participants