SonixQMK / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
515 stars 408 forks source link

[Bug] Keychron K6 White Via not compiling #298

Closed leifniem closed 1 year ago

leifniem commented 1 year ago

Describe the Bug

In contrast to the normal ansi:ansi version ansi:via throws compilation errors

System Information

Additional Context

Error Log

qmk_sonix on  sn32_master via 🐍 v3.10.6 via ⍱ took 2s
❯ make keychron/k6/white/ansi:via -km via
QMK Firmware 0.7.101
Making keychron/k6/white/ansi with keymap via

Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.
If unsure, set LTO_ENABLE = no.
arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: quantum/via.c                                                                           quantum/via.c: In function 'raw_hid_receive':
quantum/via.c:316:13: error: implicit declaration of function 'eeconfig_update_rgblight_current' [-Werror=implicit-function-declaration]
  316 |             eeconfig_update_rgblight_current();
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quantum/via.c: In function 'via_qmk_rgblight_get_value':
quantum/via.c:446:29: error: implicit declaration of function 'rgblight_get_val' [-Werror=implicit-function-declaration]
  446 |             value_data[0] = rgblight_get_val();
      |                             ^~~~~~~~~~~~~~~~
quantum/via.c:450:29: error: implicit declaration of function 'rgblight_get_mode' [-Werror=implicit-function-declaration]
  450 |             value_data[0] = rgblight_get_mode();
      |                             ^~~~~~~~~~~~~~~~~
quantum/via.c:454:29: error: implicit declaration of function 'rgblight_get_speed' [-Werror=implicit-function-declaration]
  454 |             value_data[0] = rgblight_get_speed();
      |                             ^~~~~~~~~~~~~~~~~~
quantum/via.c:458:29: error: implicit declaration of function 'rgblight_get_hue' [-Werror=implicit-function-declaration]
  458 |             value_data[0] = rgblight_get_hue();
      |                             ^~~~~~~~~~~~~~~~
quantum/via.c:459:29: error: implicit declaration of function 'rgblight_get_sat' [-Werror=implicit-function-declaration]
  459 |             value_data[1] = rgblight_get_sat();
      |                             ^~~~~~~~~~~~~~~~
quantum/via.c: In function 'via_qmk_rgblight_set_value':
quantum/via.c:470:13: error: implicit declaration of function 'rgblight_sethsv_noeeprom' [-Werror=implicit-function-declaration]
  470 |             rgblight_sethsv_noeeprom(rgblight_get_hue(), rgblight_get_sat(), value_data[0]);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
quantum/via.c:474:13: error: implicit declaration of function 'rgblight_mode_noeeprom' [-Werror=implicit-function-declaration]
  474 |             rgblight_mode_noeeprom(value_data[0]);
      |             ^~~~~~~~~~~~~~~~~~~~~~
quantum/via.c:476:17: error: implicit declaration of function 'rgblight_disable_noeeprom' [-Werror=implicit-function-declaration]
  476 |                 rgblight_disable_noeeprom();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
quantum/via.c:478:17: error: implicit declaration of function 'rgblight_enable_noeeprom' [-Werror=implicit-function-declaration]
  478 |                 rgblight_enable_noeeprom();
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
quantum/via.c:483:13: error: implicit declaration of function 'rgblight_set_speed_noeeprom'; did you mean 'led_matrix_set_speed_noeeprom'? [-Werror=implicit-function-declaration]
  483 |             rgblight_set_speed_noeeprom(value_data[0]);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             led_matrix_set_speed_noeeprom
cc1: all warnings being treated as errors
 [ERRORS]
 |
 |
 |
make[1]: *** [tmk_core/rules.mk:457: .build/obj_keychron_k6_white_ansi_via/quantum/via.o] Error 1
make[1]: Target 'all' not remade because of errors.
Make finished with errors
make: *** [Makefile:478: keychron/k6/white/ansi:via] Error 1
make: *** No rule to make target 'via'. Stop.

I hope the information provided is sufficient, if not i'll happily provide more. Thanks for your hard work!

leifniem commented 1 year ago

Removing #define VIA_QMK_RGBLIGHT_ENABLE from the config of the VIA keymap did the trick and it compiles. I'll reopen the issue should i run into any further trouble.