iberianpig / fusuma-plugin-remap

A Fusuma plugin for remapping keyboard events into virtual input devices.
MIT License
0 stars 0 forks source link

Build errors #6

Closed rien333 closed 3 hours ago

rien333 commented 3 hours ago

I get some build-time errors when building the gem.

~> gem install fusuma-plugin-remap
Building native extensions. This could take a while...
ERROR:  Error installing fusuma-plugin-remap:
        ERROR: Failed to build gem native extension.

    current directory: /home/rw/.local/share/gem/ruby/3.3.0/gems/ruinput-0.1.1/ext/ruinput
/usr/bin/ruby extconf.rb
creating Makefile

current directory: /home/rw/.local/share/gem/ruby/3.3.0/gems/ruinput-0.1.1/ext/ruinput
make DESTDIR\= sitearchdir\=./.gem.20241126-8788-t3m0lu sitelibdir\=./.gem.20241126-8788-t3m0lu clean

current directory: /home/rw/.local/share/gem/ruby/3.3.0/gems/ruinput-0.1.1/ext/ruinput
make DESTDIR\= sitearchdir\=./.gem.20241126-8788-t3m0lu sitelibdir\=./.gem.20241126-8788-t3m0lu
compiling ruinput.c
ruinput.c:13:9: warning: "FALSE" redefined
   13 | #define FALSE 0
      |         ^~~~~
In file included from /usr/include/ruby-3.3.0/ruby/defines.h:74,
                 from /usr/include/ruby-3.3.0/ruby/ruby.h:25,
                 from /usr/include/ruby-3.3.0/ruby.h:38,
                 from ruinput.c:8:
/usr/include/ruby-3.3.0/ruby/backward/2/bool.h:25:10: note: this is the location of the previous definition
   25 | # define FALSE false
      |          ^~~~~
ruinput.c:14:9: warning: "TRUE" redefined
   14 | #define TRUE !FALSE
      |         ^~~~
/usr/include/ruby-3.3.0/ruby/backward/2/bool.h:31:10: note: this is the location of the previous definition
   31 | # define TRUE true
      |          ^~~~
ruinput.c: In function ‘uinput_user_dev_raw_initalize’:
ruinput.c:48:7: error: assignment to ‘struct uinput_user_dev *’ from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
   48 |   uud = RSTRING_PTR(bytes);
      |       ^
In file included from /usr/include/ruby-3.3.0/ruby/intern.h:56,
                 from /usr/include/ruby-3.3.0/ruby/ruby.h:194:
ruinput.c: In function ‘uinput_user_dev_to_byte_string’:
ruinput.c:95:21: error: passing argument 1 of ‘rb_str_new’ from incompatible pointer type [-Wincompatible-pointer-types]
   95 |   return rb_str_new(&uud, sizeof(struct uinput_user_dev));
/usr/include/ruby-3.3.0/ruby/internal/intern/string.h:1502:21: note: in definition of macro ‘rb_str_new’
 1502 |       rb_str_new) ((str), (len)))
      |                     ^~~
ruinput.c:95:21: note: expected ‘const char *’ but argument is of type ‘struct uinput_user_dev *’
   95 |   return rb_str_new(&uud, sizeof(struct uinput_user_dev));
/usr/include/ruby-3.3.0/ruby/internal/intern/string.h:1502:21: note: in definition of macro ‘rb_str_new’
 1502 |       rb_str_new) ((str), (len)))
      |                     ^~~
make: *** [Makefile:248: ruinput.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/rw/.local/share/gem/ruby/3.3.0/gems/ruinput-0.1.1 for inspection.
Results logged to /home/rw/.local/share/gem/ruby/3.3.0/extensions/x86_64-linux/3.3.0/ruinput-0.1.1/gem_make.out

Thanks for all your work, and let me know if I can provide additional information.

System information

$ libinput list-devices
libinput-config: initializing
libinput-config: replacing the device config functions
libinput-config: initializing the key mapper
libinput-config: option 'scroll-factor' is '0.25'
libinput-config: initialized
libinput-config: configuring device 'Video Bus'
Device:           Video Bus
Kernel:           /dev/input/event3
Group:            1
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0

libinput-config: configuring device 'Lid Switch'
Device:           Lid Switch
Kernel:           /dev/input/event0
Group:            2
Seat:             seat0, default
Capabilities:     switch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0

libinput-config: configuring device 'Power Button'
Device:           Power Button
Kernel:           /dev/input/event1
Group:            3
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0

libinput-config: configuring device 'FRMW0004:00 32AC:0006 Wireless Radio Control'
Device:           FRMW0004:00 32AC:0006 Wireless Radio Control
Kernel:           /dev/input/event4
Group:            4
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0

libinput-config: configuring device 'FRMW0004:00 32AC:0006 Consumer Control'
Device:           FRMW0004:00 32AC:0006 Consumer Control
Kernel:           /dev/input/event5
Group:            4
Seat:             seat0, default
Capabilities:     keyboard pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0

libinput-config: configuring device 'PIXA3854:00 093A:0274 Mouse'
Device:           PIXA3854:00 093A:0274 Mouse
Kernel:           /dev/input/event10
Group:            5
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   *button
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   flat *adaptive custom
Rotation:         n/a

libinput-config: configuring device 'PIXA3854:00 093A:0274 Touchpad'
Device:           PIXA3854:00 093A:0274 Touchpad
Kernel:           /dev/input/event11
Group:            5
Seat:             seat0, default
Size:             111x73mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Disable-w-trackpointing: enabled
Accel profiles:   flat *adaptive custom
Rotation:         n/a

libinput-config: configuring device 'AT Translated Set 2 keyboard'
Device:           AT Translated Set 2 keyboard
Kernel:           /dev/input/event6
Group:            6
Seat:             seat0, default
Capabilities:     keyboard 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      n/a
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles:   n/a
Rotation:         0,0
rien333 commented 3 hours ago

Oh, I didn't inspect the logs correctly, its not this gem that fails to build, but one of its dependencies.