Compiling and using input-leap on Raspberry Pi 5 Debian 12 Bookworm ARM

From Public wiki of Kevin P. Inscoe
Jump to navigation Jump to search

Why?

I use my ham radio rpi5 as a KM to my many other pc's on my desk including Linux Fedora, Windows 10 and Macbook Pro running Sequoia.

There is a binary for amd64 arch type but not for arm (Raspberry) for input-leap at https://github.com/input-leap/input-leap/releases

Tested on Raspbian arm (Debian 12) on a Raspberry Pi 5 8gb.

First switch back to X11

See Switching from Wayland to X11 on Raspberry Pi 5 Debian 12 Bookworm ARM

Notes

Building from source

Taken notes from https://github.com/input-leap/input-leap/wiki/Building-on-Linux

Install cmake

$ sudo apt-get install cmake

Install Qt 6

$ sudo apt-get install qt6-base-dev qt6-tools-dev qt6-charts-dev

Notes

Install Openssl development

$ sudo apt-get install libssl-dev

Install libavahi development libraries

$ sudo apt-get install libavahi-compat-libdnssd-dev

Install Google Tests

Download the source

$ sudo apt-get install libgtest-dev

Now compile the Google Tests

You can confirm the location of the Google Test source files via command

$ dpkg -L libgtest-dev
$ sudo bash
# cd /usr/src/googletest
# mkdir build
# cd build
# cmake ..
...
-- Build files have been written to: /usr/src/googletest/build
# make
# make install

Compile

Clone source tree

$ git clone https://github.com/input-leap/input-leap.git
$ cd input-leap

Make

Because we installed our own Google Test (the one from cmake wasn't working) we have to enable USE_EXTERNAL gtest flag.

This caused a lot of frustration as the documentation in https://github.com/input-leap/input-leap/wiki/Build-Options states

INPUTLEAP_BUILD_EXTERNAL_GTEST=ON

but actually it's below. Had to look through the source to figure that out.

$ cmake -DINPUTLEAP_USE_EXTERNAL_GTEST=ON -S. -Bbuild 
...
-- Build files have been written to: .. input-leap/build
$ cmake --build build

Install

Binary will be installed in build/bin

the binaries are:

guiunittests input-leap input-leapc input-leaps integtests unittests

specifically input-leap is the graphical control panel and input-leaps is the server but I copied them all.

$ sudo cp build/bin/* /usr/local/bin/*
$ sudo chmod +x /usr/local/bin/input-lea*

Autostart on Raspbian

If you are using the stock LXDE Desktop Environment edit the file /etc/xdg/lxsession/LXDE-pi/autostart and add to the bottom

@/usr/local/bin/input-leap