qmk / qmk_distro_msys

A Windows one-click installer for the QMK CLI
https://msys.qmk.fm/
GNU General Public License v3.0
179 stars 66 forks source link

[Bug] QMK MSYS 1.8 includes avr-gcc version 12.2.0 but QMK recommends (and sometimes requires) version 8 #182

Open LyraelRayne opened 6 months ago

LyraelRayne commented 6 months ago

Describe the Bug

When using QMK MSYS to set up QMK, I expect that QMK gives me an environment that is optimised for building QMK. Instead qmk doctor that the version installed is not recommended for use with QMK.

I also experienced issues compiling keymaps including the TT() key because the optimiser breaks them in newer avr-gcc. I had to revert to version 1.7 in order to make TT work.

Additional Context?

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.2
Ψ QMK home: C:/qmk/qmk_firmware
Ψ Detected Windows 10 (10.0.22631).
Ψ QMK MSYS version: 1.8.0
Ψ Userspace enabled: False
Ψ Git branch: kc_master
Ψ Repo version: 0.14.29
⚠ Git has unstashed/uncommitted changes.
Ψ - Latest kc_master: 2023-12-18 13:53:02 +1100 (9539f135d8) -- Remove obvious user keymaps, `keyboards/[0-9]*` edition. (#22691)
Ψ - Latest upstream/master: 2024-01-06 02:06:14 +0100 (a474cac2c3) -- Update keymap.md (#22834)
Ψ - Latest upstream/develop: None
Ψ - Common ancestor with upstream/master: 2023-12-18 13:53:02 +1100 (9539f135d8) -- Remove obvious user keymaps, `keyboards/[0-9]*` edition. (#22691)
Ψ - Common ancestor with upstream/develop: None
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 12.2.0
Ψ Found avr-gcc version 12.2.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 7.0
Ψ Found dfu-programmer version 1.1.0
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2023-04-15 13:48:04 +0000 --  (11edb1610)
Ψ - lib/chibios-contrib: 2023-07-17 11:39:05 +0200 --  (da78eb37)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b97320)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 --  (819dbc1)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 --  (c2e3b4e)
Ψ - lib/pico-sdk: 2023-02-12 20:19:37 +0100 --  (a3398d8)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 --  (e19410f8)
Ψ QMK is ready to go, but minor problems were found
dotleon commented 3 days ago

This also makes production target fail.

One workaround for now is to downgrade avr-gcc:

At the time of writing this, avr-gcc 8.5.0 for MSYS2 is available at msys2 repo site (mingw-w64-x86_64-avr-gcc-8.5.0-1-any.pkg.tar.zst)

Then you can downgrade with pacman -U mingw-w64-x86_64-avr-gcc-8.5.0-1-any.pkg.tar.zst