qmk / qmk_firmware

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

Compile failing due to HIDParser #2912

Closed sQVe closed 6 years ago

sQVe commented 6 years ago

I'm running Arch Linux and I keep failing to compile the default keymap for ergodox_ez on a fresh clone. It errors at:

lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.c:93:5: error: 'memcpy' accessing 42 bytes at offsets 28 and 0 overlaps 14 bytes at offset 28 [-Werror=restrict]
     memcpy((CurrStateTable + 1),
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
            CurrStateTable,
            ~~~~~~~~~~~~~~~
            sizeof(HID_ReportItem_t));
            ~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
 [ERRORS]
 | 
 | 
 | 
make[1]: *** [tmk_core/rules.mk:360: .build/obj_ergodox_ez_default/./lib/lufa/LUFA/Drivers/USB/Class/Common/HIDParser.o] Error 1
Make finished with errors
make: *** [Makefile:549: ergodox_ez:default] Error 1

Would love some help getting this sorted. Here's a list of the dependencies and their versions that I have installed: dependencies.txt


EDIT

I tried compiling via Docker and that worked fine. This is, very likely, a problem with qmk_firmware not supporting a newer version of a dependency.

RomanRiesen commented 6 years ago

Have exactly the same error. Also on Arch.

Trying to build default for Viterbi. But that's probably irrelevant.

sQVe commented 6 years ago

@RomanRiesen Yeah. Like I noted in my edit this is likely due to not supporting a new dependency version. We should revert back to building with Docker until it is fixed.

The docker build solution is actually pretty damn smooth, I must say.

RomanRiesen commented 6 years ago

@sQVe I've just installed Debian in a VM and fought it to accept shared folders and it worked without a flaw.

Yeah. The docker way sounds nice.

fredizzimo commented 6 years ago

This looks like a bug in the lufa library. memcpy does not support overlapping regions, so memmove (bad name) should have been used instead.

drashna commented 6 years ago

@fredizzimo #2914 would fix this, correct?

AstroProfundis commented 6 years ago

Tried the #2914 patch on ArchLinux with avr-gcc 8.1.0, and worked fine for me. Thanks!

jackhumbert commented 6 years ago

Awesome - that's been merged, so I think we can close this. Please let us know if it doesn't fix it!