gittyeric / ergodox-macro-hax

A hack to get around the 4-button max Macro limit in Oryx for Ergodox / Moonlander keyboards.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error: all warnings being treated as errors

alita87 opened this issue · comments

commented

Hi, I have some issue when I try to compile the new template using QMK.

Looks like there are some warning that are treates as error at compilation time.

error.txt

Someone else are facing the same issue? Is this project still working?

Am I in the right path or am I missing something related to the "Build Modified Source and Flash it!" section?

Thanks!

Hi @alita87, I am successfully using this project to extend my macros. Are you sure it is the post-processing? Can you compile your firmware without applying the hax on it?

I am using these commands to compile the firmware on windows (with QMK Tools)

qmk setup zsa/qmk_firmware -b firmware20
qmk compile -kb moonlander -km neo

(copying the layout into keyboards/moonlander/keymaps/neo beforehand, see wip automation in #3)

commented

Hi @Phoscur , thanks for the answer. It looks like the post-processing commands are correct. As a test i compiled 2 different moonlander's keymaps: the "default" and the "shahn-neo". No errors occured.

At this point I created a new keymap folder (qmk_firmware_home/keyboards/moonlander/keymaps/pid), copied the 3 files result of the macro tuning procedure (config.h, keymap.c, rules.mk) and tried the same command using "pid" as keymap but I faced the same error.

Looks like I'm missing something.

Can I ask to you if you are able to go through the building process using my macro file? Just to be sure this is just happening to me and is related to my env/procedure?

Thanks.
my-illicit-macros.txt

Does it help to run qmk new-keymap -kb moonlander -km pid creating keymaps/pid beforehand? It seems to be also necessary, not sure what it does in addition to creating new keymap.c files, maybe it also creates some config outside - after you copy yours over these it should work!

commented

Thanks again for the help.

Yes, I tried. If I execute the "new-keymap" command and the "compile" command without importing the custom keymap.c file I'm able to compile and to create the binary file, but when I try to import the custom keymap.c file in the new keymap folder the error appear again.
Just to be sure: the starting keymap.c file related to my moonlander layout was downloaded from https://configure.zsa.io (mine profile).
I compared the downloaded layout with a new keymap.c layout created with the "new-keyboard" command and they look quite different (most on the import section).

Do you confirm that the whole procedure is working starting from a downloaded layout (from https://configure.zsa.io)?

Regards.

Do you confirm that the whole procedure is working starting from a downloaded layout (from https://configure.zsa.io)?

Yes. Please give me your layout link so I may try to compile yours. (Here is mine)
If you cannot compile your layout (without postprocessing) you should be seeking help in the QMK community, they seem pretty vibrant on Discord!

I am also working on automating the compile step in github pipelines #1.
I can probably invest a couple more hours tomorrow - if not please be patient WIP.
If I find more information, I'll post it here, but I haven't needed more than these three commands I've already given you.

@gittyeric anything else I am missing?

commented

https://configure.zsa.io/moonlander/layouts/Pqy4j/latest/0

Here the layout.

I confirm that I'm not able to compile my layout without postprocessing.

Maybe I'm missing something really stupid (I'm new to the moonlander and QMK).

Thanks again.

commented

UPDATE: I tried with your layout (downloaded from zsa.io) and I'm not able to compile it. The error is the same.

commented

UPDATE: I reinstalled the whole env and now I'm able to compile the source downloaded from zsa.io.
steps (for WSL):

  1. python3 -m pip install qmk --user
  2. qmk setup zsa/qmk_firmware -b firmware20
  3. qmk new-keymap -kb moonlander -km pid
  4. qmk compile -kb moonlander -km pid

Now I'm facing a different error "keymap.c:94:1: error: \x used with no following hex digits".

I think we can close this thread and open a new one.
error x used for no following heg digit.txt

commented

UPDATE: the "keymap.c:94:1: error: \x used with no following hex digits" was related to the use of incorrect "X_COLON" key.
I changed it using ".withShift(newMacro().tapKey("X_SCOLON"))" .

All seems working correctly now.

I'm uploading the new binary right now to my keyboard.

Thanks to @Phoscur for patience.

We can close, regards.

@alita87 what did you change to get successful compilations? I feel I now have the same errors you posted here at the beginning...
My pipeline now reproduces the build: https://github.com/Phoscur/ergodox-macro-hax/runs/4796527366?check_suite_focus=true

In file included from keyboards/moonlander/keymaps/neo/keymap.c:19:0: quantum/keymap_extras/keymap_norwegian.h:37:0: error: "NO_PIPE" redefined [-Werror]
#define NO_PIPE KC_GRV // |
[...]
keyboards/moonlander/keymaps/neo/keymap.c:21:34: fatal error: keymap_contributions.h: No such file or directory
#include "keymap_contributions.h"
cc1: all warnings being treated as errors
compilation terminated.

commented

@Phoscur , basically I reinstalled the whole QMK env deleting ~/qmk_firmware folder and removing qmk from pip and than executing the following sequence of commands.

python3 -m pip install qmk --user
export QMK_HOME='~/qmk_firmware'
qmk setup zsa/qmk_firmware -b firmware20
qmk new-keymap -kb moonlander -km pid
qmk compile -kb moonlander -km pid

Hope it helps, regards.

Thank you for the reassurance @alita87, for me it was qmk setup asking interactively, so my container did not get setup correctly.
Fix use -y setting up: qmk setup zsa/qmk_firmware -b firmware20 -y on docker image qmkfm/qmk_cli.

@gittyeric I think we can really close here now.

I believe @alita87 would need to close the issue if all looks good.