urob / zmk-helpers

Convenience macros simplifying ZMK's keymap configuration
MIT License
235 stars 79 forks source link

Build fails because of malformed value #4

Closed RomanoZumbe closed 1 year ago

RomanoZumbe commented 1 year ago

I tried to implement the unicode function for german umlaute and just can't get the build done. It always fails with the following message: devicetree error: /__w/zmk-config/zmk-config/config/german.dtsi:2 (column 84): parse error: malformed value

Any idea what I'm doing wrong?

urob commented 1 year ago

Can you post a link to your config? Are you sourcing helper.h before sourcing german.dtsi?

RomanoZumbe commented 1 year ago

It is in my repo. The current version just includes plain versions of the helper.h and german.dtsi . In this version the action fails with the following error regarding the preprocessor conditionals

/__w/zmk-config/zmk-config/config/helper.h:99:17: error: operator '==' has no left operand 99 | #if HOST_OS == 2

The error from the initial issue only shows up when I remove the HOST_OS checks and just leave the version for windows. You can see it in this result

urob commented 1 year ago

The issue is the empty declaration of HOST_OS here. HOST_OS must either be undeclared or set to an non-empty value. Leaving it undeclared or setting it to anything other than 1 or 2 (e.g., 0) will both yield the default (Windows).

Here are two successful builds using your repo using a non-empty declaration and leaving it undeclared.

RomanoZumbe commented 1 year ago

Oh, what a stupid mistake! I hope you didn't invest too much time in this. Thanks a lot for your help!