Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors if compiling with steno support #6129

Closed
1 task done
matj1 opened this issue Jun 14, 2019 · 12 comments
Closed
1 task done

Errors if compiling with steno support #6129

matj1 opened this issue Jun 14, 2019 · 12 comments

Comments

@matj1
Copy link

matj1 commented Jun 14, 2019

Describe the Bug

If I try to compile my layout with steno support, that is #include #include "keymap_steno.h" in keymap.c and STENO_ENABLE = yes and MOUSEKEY_ENABLE = no in rules.mk, it won't compile and prints error messages pasted below. If I try to compile it without steno support, it compiles fine.

System Information

  • Keyboard: XD75RE
  • Operating system: Arch Linux
  • GCC version: 8.3.0
  • AVR GCC version: 9.1.0
  • QMK Firmware version: 0.6.32
  • Any keyboard related software installed?
    • Other: Plover

Additional Context

This is printed if I try to make my layout as described above (I included only the parts with errors.):

Compiling: lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c                                 In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:365:5: error: 'const' attribute on function returning 'void' [-Werror=attributes]
  365 |     void CDC_Device_Event_Stub(void) ATTR_CONST;
      |     ^~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:367:10: error: 'EVENT_CDC_Device_LineEncodingChanged' alias between functions of incompatible types 'void(USB_ClassInfo_CDC_Device_t * const)' {aka 'void(struct <anonymous> * const)'} and 'void(void)' [-Werror=attribute-alias=]
  367 |     void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: aliased declaration here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:367:10: error: 'EVENT_CDC_Device_LineEncodingChanged' specifies less restrictive attribute than its target 'CDC_Device_Event_Stub': 'const' [-Werror=missing-attributes]
  367 |     void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: 'EVENT_CDC_Device_LineEncodingChanged' target declared here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:371:10: error: 'EVENT_CDC_Device_BreakSent' alias between functions of incompatible types 'void(USB_ClassInfo_CDC_Device_t * const,  const uint8_t)' {aka 'void(struct <anonymous> * const,  const unsigned char)'} and 'void(void)' [-Werror=attribute-alias=]
  371 |     void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: aliased declaration here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:371:10: error: 'EVENT_CDC_Device_BreakSent' specifies less restrictive attribute than its target 'CDC_Device_Event_Stub': 'const' [-Werror=missing-attributes]
  371 |     void EVENT_CDC_Device_BreakSent(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: 'EVENT_CDC_Device_BreakSent' target declared here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:369:10: error: 'EVENT_CDC_Device_ControLineStateChanged' alias between functions of incompatible types 'void(USB_ClassInfo_CDC_Device_t * const)' {aka 'void(struct <anonymous> * const)'} and 'void(void)' [-Werror=attribute-alias=]
  369 |     void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: aliased declaration here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38:
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:369:10: error: 'EVENT_CDC_Device_ControLineStateChanged' specifies less restrictive attribute than its target 'CDC_Device_Event_Stub': 'const' [-Werror=missing-attributes]
  369 |     void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: 'EVENT_CDC_Device_ControLineStateChanged' target declared here
  356 | void CDC_Device_Event_Stub(void)
      |      ^~~~~~~~~~~~~~~~~~~~~
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:359:1: fatal error: opening dependency file .build/obj_xd75_matj1/./lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.td: Permission denied
  359 | }
      | ^
cc1: all warnings being treated as errors
compilation terminated.
 [ERRORS]
 | 
 | 
 | 
make[1]: *** [tmk_core/rules.mk:360: .build/obj_xd75_matj1/./lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.o] Chyba 1
make: *** [Makefile:549: xd75:matj1] Chyba 1
Make finished with errors

(Chyba means error in Czech.)

@matj1 matj1 changed the title Errors if compiling with 's support Errors if compiling with steno support Jun 14, 2019
@drashna
Copy link
Member

drashna commented Jun 14, 2019

You're on avr-gcc 9.1.0. That's most likely the issue (we've seen a number of problems with it).

Try downgrading to 8.3 or 7.3.

@drashna
Copy link
Member

drashna commented Jun 17, 2019

Have you tried compiling with the different version of avr-gcc yet?

@matj1
Copy link
Author

matj1 commented Jun 17, 2019

I tried to compile it with avr-gcc 8.3.0 and got the same errors.

@fauxpark
Copy link
Member

Looks like this problem: abcminiuser/lufa#130

The fix was backported in #3510. Please make sure your repo is up to date :)

@matj1
Copy link
Author

matj1 commented Jun 17, 2019

I tried to compile it with avr-gcc 8.2.0, it failed with the same errors. Older versions of avr-gcc are not available by my package manager.

@matj1
Copy link
Author

matj1 commented Jun 17, 2019

How should I make sure my repo is ut to date? I did git fetch upstream and nothing was downloaded and the errors are still there.

@drashna
Copy link
Member

drashna commented Jul 3, 2019

git fetch doesn't update the repo, it just updates the info.

This link covers keeping your repo up to date:
https://docs.qmk.fm/#/newbs_best_practices

@drashna
Copy link
Member

drashna commented Jul 3, 2019

Also, you don't have to install avr-gcc from your package manager. I don't.

Just make sure that you download the correct files, and add the bin folder to PATH on your system, and it will work. I do this for ... MacOS, Linux and Windows, and it works great (all on 8.3.0)

@drashna
Copy link
Member

drashna commented Sep 26, 2019

you could try an older qmk release if you don't need recent changes
qmk_firmware-0.6.450 builds for me, newest ones don't

To be blunt, this isn't a good solution. It may get things working temporarily, but the issue doesn't actually get fixed.

@matj1 were you able to get this issue fixed?

@matj1
Copy link
Author

matj1 commented Sep 26, 2019

Sorry @drashna, I forgot about this, I didn't try to solve it much since then. Also I had overwitten the master branch of my fork, which is against afore mentioned best practices and probably is preventing me from updating my fork (merge conflicts). I will probably delete my fork having all my layouts backed up and fork the repository again.

@noroadsleft
Copy link
Member

@matj1,

Whatever the state of your repo, if you have QMK's repo set as upstream, and your fork as origin as described in the Git Best Practices doc, you don't need to delete your fork entirely (and even if you don't, it's fixable). Checkout your local master branch (the one on your computer's hard drive/SSD), and run:

git checkout -b old_master
git push -u origin old_master

This creates a new branch that is a duplicate of your current master branch, and pushes it to GitHub, so you will still have all your extra commits.

From here, you can run:

git checkout master
git fetch upstream master
git reset --hard upstream/master
git push --force origin master

This will re-synchronize your master branch with QMK's master branch, overwriting any changes that aren't in QMK's master branch. You won't need to worry about losing your work, because it's still on the old_master branch. From here, you can git checkout old_master and resume working. Additional changes can all be done here, and you'll have a clean master branch for testing against QMK's master when the time comes to do that.

@tzarc tzarc closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@drashna @tzarc @fauxpark @noroadsleft @matj1 and others