Skip to content

builtin_tools_versions.txt file in the tool of a hardware package breaks compilations in other hardware packages #246

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

Closed
per1234 opened this issue Sep 11, 2017 · 1 comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Sep 11, 2017

Moved from arduino/Arduino#6474

Arduino IDE 1.8.3, Windows 7 64 bit

Steps to reproduce (only set up for Windows):

  1. File > Preferences > Additional Boards Manager URLs > https://raw.githubusercontent.com/per1234/misc/issue_6473/package_issue_6473_index.json > OK
  2. Tools > Board > Boards Manager
  3. Wait for downloads to complete
  4. Click on "Arduino SAMD Boards" and click "Install" (if you don't already have it installed)
  5. Wait for installation to complete
  6. Scroll down to "issue_6473", click on it.
  7. Click "Install"
  8. Wait for installation to complete
  9. Click "Close"
  10. Tools > Board > Arduino/Genuino Zero
  11. Sketch > Compile/verify - Compilation fails with fatal error: sam.h: No such file or directory
  12. Tools > Board > issue_6473
  13. Sketch > Compile/verify - Compilation is successful
  14. Delete Arduino15/packages/issue_6473/tools/avr-gcc-elektor/4.9.2-elektor/avr/builtin_tools_versions.txt
  15. Tools > Board > Arduino/Genuino Zero
  16. Sketch > Compile/verify - Compilation is successful

The same breakage occurs for Intel Galileo:

exec: "/pokysdk/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++": file does not exist

and Intel Edison:

exec: "/pokysdk/usr/bin/i586-poky-linux/i586-poky-linux-g++": file does not exist

Since the hardware package that causes the issue works fine and the problem manifests itself in a different hardware package than the actual source of the bug this will lead to support requests to the wrong place, most likely Arduino.

This bug was originally discovered in arduino/Arduino#4593 (comment). I'm creating a new issue because that issue is not very concise due to the cause only being discovered after the issue was submitted. Also it is no longer possible to easily reproduce the issue following the information in that issue since the hardware package was fixed. Interestingly, the issue manifests itself in a different manner in Arduino IDE 1.6.7, the latest release at that time, breaking Arduino 101 (which is not affected in Arduino IDE 1.8.3) as well as some other boards.

@per1234
Copy link
Contributor Author

per1234 commented Sep 11, 2017

Reply from @facchinm :

Hi @per1234 ,
I believe this issue should be moved to https://github.com/arduino/arduino-builder since that file is only considered if contained in bundledHardware folder https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java#L216 .

Instead, in the builder, we read it for ANY hardware folder:

func findBuiltinToolsVersionsFile(folder string) (string, error) {

Theoretically, everything should work just fine if we remove the builtin-stuff from the builder, since we pass the runtime.* variables (arduino/Arduino@6f24fa6), but this would harm its "drop-in" compatibility.

I'd rather prefer to emit a warning if multiple builtin_tools_versions.txt are found; what do you think about it?

facchinm added a commit to facchinm/arduino-builder that referenced this issue Sep 12, 2017
Otherwise, all board manager folder was considered builtin (due to the recursive search in findBuiltinToolsVersionsFile() )

Fixes arduino#246
@per1234 per1234 closed this as completed Sep 13, 2017
facchinm added a commit to facchinm/arduino-builder that referenced this issue Sep 15, 2017
Otherwise, all board manager folder was considered builtin (due to the recursive search in findBuiltinToolsVersionsFile() )

Fixes arduino#246
@per1234 per1234 added conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant