Skip to content

package-avrdude.bash fails to compile: conflicting types for ‘keyboard_lookup_key’ #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sarlacii opened this issue Aug 6, 2021 · 1 comment

Comments

@sarlacii
Copy link

sarlacii commented Aug 6, 2021

Greetings

Am running openSUSE 15.2 with all build tools in place (only missing tool from your list in the README is "gperf", which I could install via "zypper install gperf"). But now the keyboard-keys-from-name.h file produced by gperf contains a definition with register type, which conflicts with the type in the udev-builtin-keyboard.c file.

Any attempt to fix the error is overwritten by the build script, of course. :)

Is this an issue with gperf as installed, or am I perhaps missing a devel package?

Debug from the build process:
In file included from udev-builtin-keyboard.c:32:0:
keyboard-keys-from-name.h:117:1: error: conflicting types for ‘keyboard_lookup_key’
keyboard_lookup_key (register const char *str, register size_t len)
^~~~~~~~~~~~~~~~~~~
udev-builtin-keyboard.c:31:26: note: previous declaration of ‘keyboard_lookup_key’ was here
static const struct key *keyboard_lookup_key(const char *str, unsigned len);
^~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:810: libudev_core_la-udev-builtin-keyboard.lo] Error 1

@Virtual-Java
Copy link

Thanks for posting your issue, so I was not the only one having this issue.
First I tried to replace the line which caused the error, but as you said it was

overwritten by the build script, of course. :)

Replacing the following line in eudev-3.1.3/src/udev/keyboard-keys-from-name.h
after running the main build script was used as a temporary workaround by me.
//keyboard_lookup_key (register const char *str, register size_t len) // error different type>
keyboard_lookup_key (register const char *str, register unsigned int len)

When you run the package specific build scripts normally called by the main build afterwards
the v-3.1.3 directory shouldn't be overwritten by the script.
Then build libhidapi and avrdude manually by running the corresponding build scripts:
./libhidapi.build.bash respectively ./avrdude-6.3.build.bash

Alternatively until my pull request #27 is merged you can try to compile my corrected version.
https://github.com/Virtual-Java/avrdude-build-script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants