michaelforney / swc

a library for making a simple Wayland compositor
MIT License
627 stars 53 forks source link

Compilation error on Arch linux. Support possible? #11

Closed jezze closed 10 years ago

jezze commented 10 years ago

Hi, I'm trying to build from latest master: a0763652

On Arch linux there is no libudev package, probably because Arch uses systemd. So I had to add the libinput-0.2.0-1 package as an extra dependency or else it would be complain about missing libinput.h. Sadly, the version of libinput that ships in Arch does not seem to be compatible with the version you probably have used to compile with. I get these error messages:

libswc/seat.c: In function ‘initialize_libinput’: libswc/seat.c:349:5: error: implicit declaration of function ‘libinput_udev_create_context’ [-Werror=implicit-function-declaration] seat.libinput = libinput_udev_create_context(&libinput_interface, NULL, ^ libswc/seat.c:349:19: warning: assignment makes pointer from integer without a cast seat.libinput = libinput_udev_create_context(&libinput_interface, NULL, ^ libswc/seat.c:358:5: error: implicit declaration of function ‘libinput_udev_assign_seat’ [-Werror=implicit-function-declaration] if (libinput_udev_assign_seat(seat.libinput, seat_name) != 0) ^ libswc/seat.c:377:5: error: implicit declaration of function ‘libinput_unref’ [-Werror=implicit-function-declaration] libinput_unref(seat.libinput); ^

When looking in the header of /usr/include/libinput.h there are no functions like those used here but they look somewhat similar. What version of libinput do you compile against?

jezze commented 10 years ago

I decided just to write a patch myself so I assume you can close this one.

michaelforney commented 10 years ago

Hi, I assume the dependency issues you are talking about are specific to the AUR package. I do not use Arch Linux, so you'll have to talk to the maintainer to get that updated.

It looks like Arch Linux has an outdated libinput version. The API changes were made in libinput-0.4. I would suggest poking the libinput maintainer for Arch to update the version, or installing libinput-git from the AUR.

Thanks for your interest!