hrvach / deskhop

Fast Desktop Switching Device
GNU General Public License v3.0
6.14k stars 173 forks source link

Error when building source #33

Closed cskwrd closed 8 months ago

cskwrd commented 8 months ago

I get the following error when building from source:

In file included from /home/dev/src/usb_descriptors.c:26:
/home/dev/src/main.h:88:20: error: expected identifier or '(' before ':' token
   88 | enum packet_type_e : uint8_t {
      |                    ^
make[2]: *** [CMakeFiles/board_A.dir/build.make:76: CMakeFiles/board_A.dir/src/usb_descriptors.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:1596: CMakeFiles/board_A.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

I have not made any changes to the source. My guess is a dependency isn't configured correctly. For what its worth I'm working inside this docker container: https://github.com/lukstep/raspberry-pi-pico-docker-sdk

hrvach commented 8 months ago

Yep, I think enum typing is not a regular C thing, maybe an older GCC complains about it. Try removing the semicolon and type.

cskwrd commented 8 months ago

That certainly allowed me to work past the issue, thank you! Are the build dependencies listed anywhere?

hrvach commented 8 months ago

The guideline is "get the latest and greatest" until I test with specific versions and compile a table. :)

vaidhy commented 8 months ago

I think this is a gcc 12 vs gcc 13 feature. GCC 12 does not support types for enum.

hrvach commented 8 months ago

Will be fixed in the next release.

cskwrd commented 8 months ago

Noted! Thanks for the help.