Closed isleshocky77 closed 8 years ago
Hi isleshocky77,
I'm quite busy these days, but I will definitely add some build instructions. Problem is, that I've only tested this on Arch Linux and didn't had the chance to try this out on Fedora and Ubuntu.
Still, here are some quick & dirty instructions, which should get it working. Sidewinderd is depending on systemd, libconfig, clang (g++ not tested), cmake and git. It is also depending on tinyxml2, which is currently included in sidewinderd.
For Arch Linux users (tested):
For other Linux distributions (untested):
After installation, you will need to change the user in /etc/sidewinderd.conf. You can start the daemon with "systemctl start sidewinderd". Enable it on every boot with "systemctl enable sidewinderd". More documentation on how the daemon works, will follow soon.
I will be able to optimize and package sidewinderd for other Linux distributions this, or the next weekend.
Cheers, Tolga
Results on Debian/jessie:
[ 75%] [ 75%] [ 75%] [100%] Building CXX object src/CMakeFiles/sidewinderd.dir/sidewinderd.cpp.o
Building CXX object src/CMakeFiles/sidewinderd.dir/keyboard.cpp.o
Building CXX object src/CMakeFiles/sidewinderd.dir/key.cpp.o
Building CXX object src/CMakeFiles/sidewinderd.dir/virtual_input.cpp.o
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp: In member function ‘void VirtualInput::create_uidev()’:
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::name’ [-Wmissing-field-initializers]
struct uinput_user_dev uidev = {};
^
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::id’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::ff_effects_max’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::absmax’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::absmin’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::absfuzz’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/virtual_input.cpp:50:34: warning: missing initializer for member ‘uinput_user_dev::absflat’ [-Wmissing-field-initializers]
/home/dvogel/Downloads/sidewinderd/src/keyboard.cpp: In member function ‘KeyData Keyboard::get_input()’:
/home/dvogel/Downloads/sidewinderd/src/keyboard.cpp:80:23: warning: missing initializer for member ‘KeyData::Index’ [-Wmissing-field-initializers]
struct KeyData kd = {};
^
`
/home/dvogel/Downloads/sidewinderd/src/keyboard.cpp:80:23: warning: missing initializer for member ‘KeyData::Type’ [-Wmissing-field-initializers]
Linking CXX executable sidewinderd
/usr/bin/ld: CMakeFiles/sidewinderd.dir/keyboard.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/CMakeFiles/sidewinderd.dir/build.make:160: recipe for target 'src/sidewinderd' failed
make[2]: *** [src/sidewinderd] Error 1
CMakeFiles/Makefile2:75: recipe for target 'src/CMakeFiles/sidewinderd.dir/all' failed
make[1]: *** [src/CMakeFiles/sidewinderd.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
Looks like an outdated gcc to me. Which gcc version are you using? Also, do you have to opportunity to compile it using clang?
It's gcc 4.9 with glibc 2.19:
> gcc --version
gcc (Debian 4.9.1-19) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> sudo dpkg-query -s libc-dev-bin
Package: libc-dev-bin
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 339
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: amd64
Multi-Arch: foreign
Source: glibc
Version: 2.19-13
Replaces: libc0.1-dev, libc0.3-dev, libc6-dev, libc6.1-dev
Depends: libc6 (>> 2.19), libc6 (<< 2.20)
Recommends: manpages-dev
Description: GNU C Library: Development binaries
This package contains utility programs related to the GNU C Library
development package.
Homepage: http://www.gnu.org/software/libc/libc.html
I will try to compile with clang sometime soon.
I'm using glibc 2.21 and gcc 4.9.2. The error is related to the use of C++11 thread
header file. The -lpthread flag seems to be missing, which is not needed on my Arch Linux machine for some reason. I assumed, that the compiler auto-adds the needed libs, in order to make C++11 extensions work; especially, when the -std=c++11 flag is set.
For a quick fix:
I haven't tested it, but it should be enough for a quick fix.
As soon as I got some time, I will fix this. There are some very elegant CMake commands to solve this issue; but I need some time for it. Thanks for reporting!
Cheers, Tolga
I have added the pthread library to the CMake file and have tested it under Debian Jessie Live CD (commit 732268b). Your issue should have been fixed now. Works for both, clang and g++. Please test and report back.
Cheers, Tolga
Updated readme with installation instructions. Fixed by c832cbdd3ad874cc2dd3e0b595fe1a5cc2926bf3.
Cheers, Tolga
It would be nice to have build and installation instructions for people wanting to get this up and running.