gvalkov / python-evdev

Python bindings for the Linux input subsystem
https://python-evdev.rtfd.org/
BSD 3-Clause "New" or "Revised" License
334 stars 112 forks source link

Compilation error when installing evdev package in my hardware platform #220

Open umamaheshrouthu opened 4 months ago

umamaheshrouthu commented 4 months ago

i have a RPI based solution. I am installing evdev package and i see below compilation error. I am seeing this error with latest and previous versions of this package also.

            from evdev/ecodes.c:2:

evdev/ecodes.c: In function ‘PyInit__ecodes’: evdev/ecodes.c:321:29: error: ‘KEY_ALL_APPLICATIONS’ undeclared (first use in this function) 321 | PyModule_AddIntMacro(m, KEY_ALL_APPLICATIONS); | ^~~~~~~~ ../../host/aarch64-TII-linux-gnu/sysroot/usr/include/python3.9/modsupport.h:146:67: note: in definition of macro ‘PyModule_AddIntMacro’ 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ evdev/ecodes.c:321:29: note: each undeclared identifier is reported only once for each function it appears in 321 | PyModule_AddIntMacro(m, KEY_ALL_APPLICATIONS); | ^~~~~~~~ ../../host/aarch64-TII-linux-gnu/sysroot/usr/include/python3.9/modsupport.h:146:67: note: in definition of macro ‘PyModule_AddIntMacro’ 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ evdev/ecodes.c:619:29: error: ‘KEY_DICTATE’ undeclared (first use in this function); did you mean ‘KEY_MICMUTE’? 619 | PyModule_AddIntMacro(m, KEY_DICTATE); | ^~~ ../../host/aarch64-TII-linux-gnu/sysroot/usr/include/python3.9/modsupport.h:146:67: note: in definition of macro ‘PyModule_AddIntMacro’ 146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c) | ^ error: command '/usr/src/output/br_hardened/output_arm64_ccb30_cm4/host/bin/aarch64-TII-linux-gnu-gcc' failed with exit code 1 make[1]: [package/pkg-generic.mk:295: /usr/src/output/br_hardened/output_arm64_ccb30_cm4/build/python-evdev-1.7.1/.stamp_built] Error 1 make[1]: Leaving directory '/usr/src/buildroot' make: [/usr/src/generic_br_makefile.mk:165: /usr/src/output/br_hardened/output_arm64_ccb30_cm4/images/rootfs.ext2] Error 2