You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The firmware could not be compiled with the massdrop/ctrl keyboard. The compilation exits with a bunch of multiple definition of 'dmac_desc' errors.
Describe the Bug
Steps to reproduce:
Cloning a fresh copy of QMK by:
qmk setup
Then compile the firmware with:
qmk compile -kb massdrop/ctrl -km default
And the following errors would occur:
Linking: .build/massdrop_ctrl_default.elf [ERRORS]
|
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/config_led.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/config_led.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/keyboards/massdrop/ctrl/keymaps/default/keymap.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/keyboards/massdrop/ctrl/keymaps/default/keymap.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/common/arm_atsam/suspend.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/common/arm_atsam/suspend.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/common/magic.o:/home/($HOME)/QMK/qmk_firmware.test/quantum/keycode_config.h:44: multiple definition of `keymap_config'; .build/obj_massdrop_ctrl_default/keyboards/massdrop/ctrl/keymaps/default/keymap.o:(.bss+0x4): first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/adc.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/adc.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/clks.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/clks.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/i2c_master.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/i2c_master.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/led_matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/led_matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/main_arm_atsam.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/main_arm_atsam.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/spi.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/spi.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/usb/usb2422.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: multiple definition of `dmac_desc_wb'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:28: first defined here
| /usr/lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld: .build/obj_massdrop_ctrl_default/protocol/arm_atsam/usb/usb2422.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: multiple definition of `dmac_desc'; .build/obj_massdrop_ctrl_default/matrix.o:/home/($HOME)/QMK/qmk_firmware.test/tmk_core/protocol/arm_atsam/i2c_master.h:27: first defined here
| collect2: error: ld returned 1 exit status
|
make[1]: *** [tmk_core/rules.mk:306: .build/massdrop_ctrl_default.elf] Error 1
Make finished with errors
make: *** [Makefile:584: massdrop/ctrl:default] Error 1
System Information
Keyboard: massdrop/ctrl
Revision (if applicable):
Operating system: Arch Linux 5.7.8-arch1-1
AVR GCC version: 8.3.0
ARM GCC version: 10.1.10
QMK Firmware version: 0.9.38
Any keyboard related software installed?
AutoHotKey
Karabiner
Other:
Additional Context
I had looked into this issue, and the problem is with these two files: tmk_core/protocol/arm_atsam/i2c_master.h and tmk_core/protocol/arm_atsam/i2c_master.c.
Since the issue is about duplicate definitions in the linking stage, it could actually be fixed by removing the following two lines:
Recompiling for a keyboard that worked in 2017, and I am running into this bug again.
After checking #9485, it looks like the "fix" was immediately un-fixed.
The fix was not really a fix: more permissive compiler settings were added to tmk_core/rules.mk such that, project wide, the compiler no longer checked for duplicate definitions.
Instead, add CFLAGS += -fcommon to your massdrop rules.mk files to get things working again.
The firmware could not be compiled with the massdrop/ctrl keyboard. The compilation exits with a bunch of
multiple definition of 'dmac_desc'
errors.Describe the Bug
Steps to reproduce:
Cloning a fresh copy of QMK by:
Then compile the firmware with:
And the following errors would occur:
System Information
Additional Context
I had looked into this issue, and the problem is with these two files:
tmk_core/protocol/arm_atsam/i2c_master.h
andtmk_core/protocol/arm_atsam/i2c_master.c
.Since the issue is about duplicate definitions in the linking stage, it could actually be fixed by removing the following two lines:
from
tmk_core/protocol/arm_atsam/i2c_master.h
and add them totmk_core/protocol/arm_atsam/i2c_master.c
.However, I'm not quite familiar with the
__attribute__
thing, and am not sure if this is a proper fix for this problem.The text was updated successfully, but these errors were encountered: