avr-hal icon indicating copy to clipboard operation
avr-hal copied to clipboard

`winget` makes first build a lot more complicated

Open Pumbakos opened this issue 1 year ago • 3 comments

I just started using Windows after 2 year break and I am new to rust ecosystem, I was using macOS (where I could use brew for those who don't know) so I started using winget as documentation states. I've encountered an issue where avr-gcc could not interpret --print-memory-usage flag. At first glance, I did not suspect versioning because "Hey, I just installed it". The error was error: linking with ‘avr-gcc’, so I started poking around using some rustflags and various linkers because that's what some of the stackoverflows answers have said. Then I realized that winget installed winavr-20100110 that seems to be quite old. I followed this great article by Tony Mitchell and turned out to be working.

This is the line that caused all that (link to README.md):

winget install AVRDudes.AVRDUDE ZakKemble.avr-gcc

Pumbakos avatar Oct 20 '24 19:10 Pumbakos

On Sun, Oct 20, 2024 at 12:37:11PM -0700, Dawid Pałubiak wrote:

using Windows This is the line that caused all that

winget install AVRDudes.AVRDUDE ZakKemble.avr-gcc

patches welcome.

Slightly longer version:

Acknowlegde on "It does not work on my platform". Do not expect that "works on all platforms" is a top priority.

Please update yourself the README.md with how to install winget. (A link to "How to install winget on Microsoft Windows 11" will do.)

Groeten Geert Stappers

Silence is hard to parse

stappersg avatar Oct 20 '24 20:10 stappersg

Agreed. I don't have a Windows system to check with so I rely on feedback from users on what works. If the current instructions have problems, please send a PR to update/fix them :)

Rahix avatar Oct 21 '24 05:10 Rahix

winget is rather tied to the Windows store. Early builds of Windows 10 didn't have it yet. Latest Win 10 & 11 should have it installed if it has Windows Store installed.

If using an enterprise edition of Windows (with no Windows store or winget installed), you may have to seek alternate methods. By default, you can't use winget in CI with github's windows-latest runner (attempted).


Not sure if this helps

winget search ZakKemble.avr-gcc --versions
Found AVR-GCC [ZakKemble.avr-gcc]
Version
-------
14.1.0
13.2.0
12.1.0
winget search AVRDudes.AVRDUDE --versions
Found AVRDUDE [AVRDudes.AVRDUDE]
Version
-------
7.3
7.2
7.1

2bndy5 avatar Jan 01 '25 11:01 2bndy5