info.json not compatible anymore -> not compiling with current qmk_firmware
sotte opened this issue · 6 comments
This repo does not build with current (as of today) qmk_firmware.
Here are the steps to reproduce it:
cd /tmp
git clone https://github.com/qmk/qmk_firmware
git clone git@github.com:GEIGEIGEIST/qmk-config-totem.git
cd qmk_firmware
git status
# fbbc71ec34e1e9dc5450e9620e71526f5488fe81
# Tue Jul 9 02:27:09 2024 +1000
# copy totem/ into qmk_firmware repo as instructed by the readame
cp -r qmk-config-totem/totem qmk_firmware/keyboards
# build with docker
cd qmk_firmware
/util/docker_build.sh totem:default
Here are the error messages:
❯ ./util/docker_build.sh totem:default
QMK Firmware 0.25.10
☒ Not including data from file: keyboards/totem/info.json
☒ layouts.LAYOUT.layout.18.x: -0.4 is less than the minimum of 0
⚠ totem: Build marker "keyboard.json" not found.
☒ totem: No LAYOUTs defined! Need at least one layout defined in info.json.
☒ totem: LAYOUT: Layout macro should not be defined within ".h" files.
Making totem with keymap default
☒ Not including data from file: keyboards/totem/info.json
☒ layouts.LAYOUT.layout.18.x: -0.4 is less than the minimum of 0
⚠ totem: Build marker "keyboard.json" not found.
☒ totem: No LAYOUTs defined! Need at least one layout defined in info.json.
☒ totem: LAYOUT: Layout macro should not be defined within ".h" files.
arm-none-eabi-gcc (15:8-2019-q3-1+b1) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiling: tmk_core/protocol/usb_descriptor.c tmk_core/protocol/usb_descriptor.c:449:35: error: 'VENDOR_ID' undeclared here (not in a function)
.VendorID = VENDOR_ID,
^~~~~~~~~
tmk_core/protocol/usb_descriptor.c:450:35: error: 'PRODUCT_ID' undeclared here (not in a function); did you mean 'PRODUCT'?
.ProductID = PRODUCT_ID,
^~~~~~~~~~
PRODUCT
tmk_core/protocol/usb_descriptor.c:451:35: error: 'DEVICE_VER' undeclared here (not in a function)
.ReleaseNumber = DEVICE_VER,
^~~~~~~~~~
In file included from tmk_core/protocol/usb_descriptor.c:42:
tmk_core/protocol/usb_descriptor_common.h:21:29: error: 'LMANUFACTURER' undeclared here (not in a function)
#define USBSTR(s) USBCONCAT(L, s)
^
tmk_core/protocol/usb_descriptor_common.h:20:25: note: in definition of macro 'USBCONCAT'
#define USBCONCAT(a, b) a##b
^
tmk_core/protocol/usb_descriptor.c:1050:42: note: in expansion of macro 'USBSTR'
.Size = sizeof(USBSTR(MANUFACTURER)),
^~~~~~
[ERRORS]
|
|
|
make[1]: *** [builddefs/common_rules.mk:373: .build/obj_totem_default/usb_descriptor.o] Error 1
make: *** [Makefile:415: totem:default] Error 1
Make finished with errors
I'm a bit lost on how to fix this.
It seems that the format of the json file changed: https://docs.qmk.fm/reference_info_json
(Still researching...)
The seemingly invalid values (negative values) for layouts.LAYOUT.layout
prevent the json file from being used. In effect, the usb
properties are not used and VENDOR_ID
etc are not defined.
I think we should update the layout to be in-line with the current format.
My workaround was to delete the offending line or just make the values positive. I don't really use the json file for anything. But this is not the proper solution.
I managed to find some updated code from @patrick-elmquist's fork that I have copied.
This gets everything working again for me. I'm still getting errors, so there's likely more to be done, but this works as a workaround as well.
Just for easier find-ability:
This is the fork: https://github.com/patrick-elmquist/qmk-config-totem
These this is the relevant info.json
: https://github.com/patrick-elmquist/qmk-config-totem/blob/main/info.json
Note that some settings moved from rules.mk
and config.h
into the info.json
.
I should have mentioned the changes you found, as I also made the same changes to the firmware before compiling.
It appears there is still some work to do. In particular, although my code compiles, QMK is upset about layer definitions, and it appears there should be a keyboard.json file as well.
Even though I cloned patricks fork, I'm still getting errors
$ qmk compile -kb totem -km default
Ψ Compiling keymap with gmake -r -R -f builddefs/build_keyboard.mk -s KEYBOARD=totem KEYMAP=default KEYBOARD_FILESAFE=totem TARGET=totem_default VERBOSE=false COLOR=true SILENT=false QMK_BIN="qmk"
☒ totem: LAYOUT: Layout macro should not be defined within ".h" files.
platforms/chibios/platform.mk:266: lib/chibios/os/hal/lib/streams/streams.mk: No existe el fichero o el directorio
gmake: *** No hay ninguna regla para construir el objetivo 'lib/chibios/os/hal/lib/streams/streams.mk'. Alto.
Any help?