Packaging arduino with upstream avr-gcc or avrdude question
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
Hey guys,
I recently got a TU for archlinux which means I can now package arduino for archlinux. The question came up if archlinux should link `avr-gcc` and/or `avrdude` and/or `arduino-builder` with the distribution/upstream packages.
I'd like to present my opinion on this, but also would like to hear other opinions, as I might be wrong. It would be nice if one of you guys could answer, as I think you should know it best: @cmaglie @facchinm @sandeepmistry @matthijskooijman @focalintend @kriegsman
My opinion is to **not** package the upstream tools.
- Compilation size differs
- Assemler code differs, [makes it hard to debug](https://github.com/arduino/Arduino/issues/5236)
- Compiler specific code as in fastled could break
- New avrlibc definitions might give problems
- [Reverting of avrdude](https://github.com/arduino/Arduino/pull/5208) already showed such problems
- Atmel also uses 4.9.x which is quite new if you ask me
- If you really want the latest avr-gcc you can use a makefile or change platform.txt
As a side note: We currently package avrdude 6.3 because of a [dependency issue](https://github.com/arduino/Arduino/issues/5094), but that is only temporary.
Edit:
I've linked all the binaries to the upstream avr-gcc and such errors then occur:
```
MouseAPI.h:43:19: error: flexible array member in union
uint16_t whole16[];
```
This might be a feature of the new avr-gcc but the library itself is broken. And if you use the library manager, its quite trickey to always fix the bugs yourself. And now tell the maintainer to fix those bugs for you avr-gcc 6.x just because you are using arch and the whole world uses the bundled avr-gcc. Those error appear with my own HID library. (I should fix this anyways).
Edit2:
And with other sketches I got LTO problems. This might be because I am linking to the wrong pathes or the platform.txt also needs modifications because it uses the wrong parameters.
```
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
lto-wrapper: fatal error: /usr/share/arduino/hardware/tools/avr/bin/avr-gcc returned 1 exit status
compilation terminated.
/usr/bin/avr-ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```
Contributor guide
Research direction
Review platform.txt and the bundled hardware/tools/avr binaries, then compare them with the Arch-provided avr-gcc and avrdude packages. Reproduce the reported flexible-array and LTO failures using the linked tool paths; done means reaching a documented packaging decision with compatible build behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100