-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Boards manager install of older avr-gcc breaks compilation for all AVR boards in 1.6.10. #142
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
Comments
Also, is there a way for a third-party hardware package to specify dependency on a tool, but not a particular version of it? Or to depend on a range of versions (e.g. some particular version or later)? |
Work around: install 1.11 avr arduino toolchain |
Hi everyone, |
Thanks for confirming this is a bug. |
To overcome https://github.com/arduino/Arduino/issues/5168, find a better way please :)
@per1234 does this means that I can just leave the JSON file as it is, or just upgrade the Tooldependencies field? |
@MCUdude I won't know for sure until there is an hourly build with a fix that I can test. It does possibly offer the option of just letting the issue be fixed in the IDE. The problem with that solution is anyone who has installed Arduino IDE 1.6.10 in the meantime remains vulnerable to having their Arduino AVR Boards core broken by installing any of your cores. I'm glad to see facchinm is working on a fix. |
The
This means that the package
The real issue is that the package_index.json misses the information that A better solution IMHO is to add a new field {
"name": "attiny",
"architecture": "avr",
"version": "1.0.1",
"category": "attiny",
"help": {
"online": ""
},
"url": "https://github.com/damellis/attiny/archive/76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"archiveFileName": "76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"checksum": "SHA-256:49a4dfc3796caf2533050b0b962ae0affb2471b8ded1283936d7b712cc1fdff1",
"size": "5719",
"boards": [
{"name": "ATtiny45"},
{"name": "ATtiny85"},
{"name": "ATtiny44"},
{"name": "ATtiny84"}
],
+ "coreDependencies": [
+ { "packager": "arduino" }
+ ],
"toolsDependencies": [
- {
- "packager": "arduino",
- "name": "avr-gcc",
- "version": "4.8.1-arduino5"
- },
- {
- "packager": "arduino",
- "name": "avrdude",
- "version": "6.0.1-arduino5"
- }
]
} Doing this way we know explicitly that |
... for the arduino IDE. |
@jantje You may be surprised, but I proposesd this change to help 3rd party tool developers, in particular you, to gather all the information needed exclusively from the json package_indexes. |
@cmaglie |
I know, that's why I proposed to remove Look at the
and you know that from package_index.json:
The problem is that this data is not always static, in particular packages that uses cores from another package (like attiny but basically 90% of the packages around) needs the same tools from the referenced package that may change when the referenced package is upgraded! |
@cmaglie |
Version 1.6.11 ?? |
@jantje
@PaulStoffregen |
@cmaglie |
The difference is that MightyCore is a totally independent package because it has this: https://github.com/MCUdude/MightyCore/tree/master/avr/cores/MightyCore in the MightyCore case specifing the tools is the correct thing to do. In the attiny case you won't fint the "core" folder as in the MightyCore, look by yourself: https://github.com/damellis/attiny this is because the attiny package provides only some variants, but uses the core from arduino. That's why you can't write a static set of tool for attiny: it depends on another core that may change tools when upgraded. |
To overcome https://github.com/arduino/Arduino/issues/5168, find a better way please :)
@cmaglie Basically I think the boardsmanager does not handle the preinstalled tools and boards in the same way as "additional tools and boards". A obvious proofs of this are the different folder structures and the lack of a json file. Due to the missing json file the Arduino IDE "has to guess which version of the toolchain and uploader it will use". Which is what OP is pointing at when saying.
In other words: When multiple toolchains are installed for avr, the Arduino IDE is missing the json file of the "pre installed boards" to be able to pick the "correct" toolchain. |
The json file exists, it's here: http://downloads.arduino.cc/packages/package_index.json here the snippet that defines the preinstalled AVR for IDE 1.6.10:
as you can see the tools are specified, but there is a bug in the builder that do not select the correct ones. This is already explained here: arduino/Arduino#5042 |
To overcome https://github.com/arduino/Arduino/issues/5168, find a better way please :)
I don't think I'll make a release to work around the bugs at this stage as supposedly there will be a 1.6.11 and it's going to need some testing with the LTO plugin in the new gcc version, the avrdude.conf may need replacing as well for the atmega8 series to maintain compatability. https://github.com/arduino/Arduino/issues/5168 SpenceKonde/ReleaseScripts#9 I really wish Arduino.cc would get a proper release plan in place, you can't just dump out totally untested major releases on the public, at least have some sort of beta program. This is ridiculous.
…newer versions of avr-gcc and avrdude. Related to https://github.com/arduino/Arduino/issues/5168
Ok... I have been investigating this json story a bit deeper due to Sloeber/arduino-eclipse-plugin#516 and ..... As to the proposed change: {
"name": "attiny",
"architecture": "avr",
"version": "1.0.1",
"category": "attiny",
"help": {
"online": ""
},
"url": "https://github.com/damellis/attiny/archive/76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"archiveFileName": "76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"checksum": "SHA-256:49a4dfc3796caf2533050b0b962ae0affb2471b8ded1283936d7b712cc1fdff1",
"size": "5719",
"boards": [
{"name": "ATtiny45"},
{"name": "ATtiny85"},
{"name": "ATtiny44"},
{"name": "ATtiny84"}
],
+ "coreDependencies": [
+ { "packager": "arduino" }
+ ],
"toolsDependencies": [
- {
- "packager": "arduino",
- "name": "avr-gcc",
- "version": "4.8.1-arduino5"
- },
- {
- "packager": "arduino",
- "name": "avrdude",
- "version": "6.0.1-arduino5"
- }
]
} I would counter propose (may contain formatting issues) {
"name": "attiny",
"architecture": "avr",
"version": "1.0.1",
"category": "attiny",
"help": {
"online": ""
},
"url": "https://github.com/damellis/attiny/archive/76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"archiveFileName": "76ca88ce3c195fcba8e8a645084e352965dc80e0.zip",
"checksum": "SHA-256:49a4dfc3796caf2533050b0b962ae0affb2471b8ded1283936d7b712cc1fdff1",
"size": "5719",
"boards": [
{"name": "ATtiny45"},
{"name": "ATtiny85"},
{"name": "ATtiny44"},
{"name": "ATtiny84"}
],
+ "platformDependencies": [
+ { "packager": "arduino",
+ "supportedVersions":[
+ {"version:""1.6.10"},
+ {"version:""1.6.11"}
+ ]
+ }
+ ],
"toolsDependencies": [
- {
- "packager": "arduino",
- "name": "avr-gcc",
- "version": "4.8.1-arduino5"
- },
- {
- "packager": "arduino",
- "name": "avrdude",
- "version": "6.0.1-arduino5"
- }
]
} The problem I have with "coreDependencies" is that currently "core" is not an entity in the json file. So referencing a core is very confusing (to me). -Notice that I do think referencing a core is the right way- As to the 2 different planets. I think core should be something platform references. Basically because a core is a library that must be compiled in one (or more -like the teensy core- ) specific way. It may be a good idea to make a schema file of the json as it is a pretty complex structure. |
No worries. And thanks for looking deeply into to this issue!
now that you make me notice I agree,
so the it's the board configuration that is actually referencing a core outside of the board's platform. BTW considering that:
the correct thing to do in the json is to reference the container
Version constraints may lead to complex algorithms for conflicts resolution, IMHO we should do a first release without them. Some of the problems that comes to mind are:
|
This issue popped up because of a upgrade of a toolchain. So if versions are specified I would not allow wildcards. When versions are specified it simply means "We have tested these versions and they work". I do agree that a first release without them is a good idea. |
About version constraining you might want to use the same approach Maven uses: |
To overcome https://github.com/arduino/Arduino/issues/5168, find a better way please :)
New IDEs use the json definitions to select the right toolchain if no version is specified in |
A user of the attiny boards package encountered this: damellis/attiny#105
The previous ATtiny package json (https://raw.githubusercontent.com/damellis/attiny/f026e80bc8fa4e33714bfe28ceafdd8829d85293/package_damellis_attiny_index.json) included explicit dependencies on the avr-gcc and avrdude versions that came with Arduino 1.6.9 (and previous). With 1.6.10, newer versions of these tools are included, so installing the ATtiny package also installed these older tools. These older tools then get used for all AVR boards.
It appears the older tools don't support LTO or plugins, so compiling in 1.6.10 gives the error:
I think I fixed this for the ATtiny package by removing the explicit tool dependency, and assuming that avr-gcc and avrdude will be included with the Arduino IDE.
This may remain a problem for other third-party hardware packages, though. Maybe the IDE should use the bundled avr-gcc and avrdude for bundled boards even if another version has been installed for other boards? Maybe only if the newly-installed version is older than the bundled version?
The text was updated successfully, but these errors were encountered: