Error: filesystem: No such file or directory
Closed this issue · 10 comments
Trying to set this up. I'm getting the following error:
root@ad38e141291c:/workdir/gebaar-libinput/build# make -j$(nproc)
[ 16%] Building CXX object CMakeFiles/gebaard.dir/src/io/input.cpp.o
[ 50%] Building CXX object CMakeFiles/gebaard.dir/src/config/config.cpp.o
[ 50%] Building CXX object CMakeFiles/gebaard.dir/src/main.cpp.o
In file included from /workdir/gebaar-libinput/src/config/config.cpp:21:0:
/workdir/gebaar-libinput/src/config/config.h:23:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
CMakeFiles/gebaard.dir/build.make:88: recipe for target 'CMakeFiles/gebaard.dir/src/config/config.cpp.o' failed
make[2]: *** [CMakeFiles/gebaard.dir/src/config/config.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /workdir/gebaar-libinput/src/io/input.h:25:0,
from /workdir/gebaar-libinput/src/io/input.cpp:20:
/workdir/gebaar-libinput/src/io/../config/config.h:23:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
CMakeFiles/gebaard.dir/build.make:75: recipe for target 'CMakeFiles/gebaard.dir/src/io/input.cpp.o' failed
make[2]: *** [CMakeFiles/gebaard.dir/src/io/input.cpp.o] Error 1
In file included from /workdir/gebaar-libinput/src/main.cpp:22:0:
/workdir/gebaar-libinput/src/config/config.h:23:22: fatal error: filesystem: No such file or directory
#include <filesystem>
^
compilation terminated.
CMakeFiles/gebaard.dir/build.make:62: recipe for target 'CMakeFiles/gebaard.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/gebaard.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/gebaard.dir/all' failed
make[1]: *** [CMakeFiles/gebaard.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Been trying to find out what package I'm missing, but to no avail.
You need GCC 8 ;)
Perfect! Do you have a list of all other dependencies required? Right now I've got the following:
echo 'deb http://http.us.debian.org/debian/ testing non-free contrib main' > /etc/apt/sources.list.d/debian-testing.list
apt-get update
apt-get install git gcc-8 curl make build-essential libinput-dev zlib1g-dev
But still getting this error:
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::initialize_context()':
input.cpp:(.text+0x175): undefined reference to `udev_new'
/usr/bin/ld: input.cpp:(.text+0x19c): undefined reference to `libinput_udev_create_context'
/usr/bin/ld: input.cpp:(.text+0x1be): undefined reference to `libinput_udev_assign_seat'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::handle_swipe_event_without_coords(libinput_event_gesture*, bool)':
input.cpp:(.text+0x1ed): undefined reference to `libinput_event_gesture_get_finger_count'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::handle_swipe_event_with_coords(libinput_event_gesture*)':
input.cpp:(.text+0x3e4): undefined reference to `libinput_event_gesture_get_dx'
/usr/bin/ld: input.cpp:(.text+0x40a): undefined reference to `libinput_event_gesture_get_dy'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::start_loop()':
input.cpp:(.text+0x472): undefined reference to `libinput_get_fd'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::~Input()':
input.cpp:(.text+0x4ce): undefined reference to `libinput_unref'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::gesture_device_exists()':
input.cpp:(.text+0x4fe): undefined reference to `libinput_get_event'
/usr/bin/ld: input.cpp:(.text+0x52b): undefined reference to `libinput_event_get_device'
/usr/bin/ld: input.cpp:(.text+0x540): undefined reference to `libinput_device_has_capability'
/usr/bin/ld: input.cpp:(.text+0x55d): undefined reference to `libinput_event_destroy'
/usr/bin/ld: input.cpp:(.text+0x56d): undefined reference to `libinput_dispatch'
/usr/bin/ld: CMakeFiles/gebaard.dir/src/io/input.cpp.o: in function `gebaar::io::Input::handle_event()':
input.cpp:(.text+0x594): undefined reference to `libinput_dispatch'
/usr/bin/ld: input.cpp:(.text+0x5a4): undefined reference to `libinput_get_event'
/usr/bin/ld: input.cpp:(.text+0x5d5): undefined reference to `libinput_event_get_type'
/usr/bin/ld: input.cpp:(.text+0x730): undefined reference to `libinput_event_get_gesture_event'
/usr/bin/ld: input.cpp:(.text+0x759): undefined reference to `libinput_event_get_gesture_event'
/usr/bin/ld: input.cpp:(.text+0x77d): undefined reference to `libinput_event_get_gesture_event'
/usr/bin/ld: input.cpp:(.text+0x7d7): undefined reference to `libinput_event_destroy'
/usr/bin/ld: input.cpp:(.text+0x7e7): undefined reference to `libinput_dispatch'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/gebaard.dir/build.make:144: gebaard] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/gebaard.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
You need the development headers for libinput and for systemd! :-)
For debian (derivatives) it's libinput-dev
For RPM based distros it's libinput-devel
Also, you probably need libsystemd-dev
/ systemd-devel
Installed them both, still same thing.
Never mind, I had to rerun cmake ..
for some reason.
But.... how to update GCC, it's too hard
If you're running Debian you can use the following script to build it all.
echo 'deb http://http.us.debian.org/debian/ testing non-free contrib main' > /etc/apt/sources.list.d/debian-testing.list
apt-get update
apt-get install -y git gcc-8 curl make cmake build-essential libinput-dev zlib1g-dev libinput-tools libsystemd-dev
git clone -b v0.0.5 --single-branch --recurse-submodules -j8 https://github.com/Coffee2CodeNL/gebaar-libinput /workdir
mkdir -p /workdir/build
cd /workdir/build
cmake ..
make -j$(nproc)
I suggest you use Docker instead of enabling the Debian testing repos on your main machine:
mkdir /tmp/gebaar/
docker run --rm --device /dev/input -v /run/udev/data:/run/udev/data -v /tmp/gebaar:/workdir -w /workdir -it debian bash
This should give you the gebaar
executable in /tmp/gebaar/build
on your host machine.
Why Docker? Does the gebaar
make my computer messy?
No gebaar itself doesn't, but all the dependencies required to build might. if you're like me, I don't develop in c and so all those dependencies I'd prefer not to have on my main computer. So I don't want to install it only for one occasion. Hence why I chose to use docker. Also for the fact that the debian testing repositories are required to get gcc-8 (which is a requirement for gebaar), which you may not want to use on your main computer.
Once you have the gebaar executable, you can simply copy it away from /tmp/gebaar/build
OK I got ;)