Open gardotd426 opened 4 years ago
Sorry, I realize now that text is really hard to read. Here it is in a file:
Obviously it seems the relevant errors are
/tmp/makepkg/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:470:35: error: second argument to 'va_arg' is of non-POD type 'OnEventAction' (aka 'function<void (DigitalButton *)>') [-Wnon-pod-varargs]
auto action = va_arg(arguments, OnEventAction);
^~~~~~~~~~~~~
and
/tmp/makepkg/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:174:10: error: no matching conversion for functional-style cast from 'const char [100]' to 'std::exception'
throw exception("ChordStack should always include ButtonID::NONE, for the chorded variable to return the base value.");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
there are also 13 warnings, but those are the two errors.
Same issue, Arch w/ clang v10.0.1
I'm getting some refactoring done Windows side, a few of them affecting (i.e. breaking) the linux build, Such as the macros found in PlatformDefinition.h. We have a contributor looking at maintaining the Linux build, but feel free to contribute yourself. Contributors are syncing on the GyroGaming discord in a private channel. Just ask to be added.
for reference, another error that tends to pop up is /JoyShockMapper/src/main.cpp:2837:30: error: use of undeclared identifier 'cmdLine'
Did you consider adding a github CI build? That would help catch these errors earlier.
I've been working on fixing JSM for Linux, and here are the changes I've come up with so far: https://github.com/TauAkiou/JoyShockMapper
The fixes have worked so far for me, but I'd like to see some additional reports from others before creating a PR.
@TauAkiou that branch builds but crashes on startup when a DualShock 4 is plugged in. Here's the backtrace:
Stack trace of thread 3158286:
#0 0x00007fa37f0f059a hid_write (libhidapi-hidraw.so.0 + 0x359a)
#1 0x000055d24eb114fc _ZN8JoyShockC2EP15hid_device_infoi (JoyShockMapper + 0x9c4fc)
#2 0x000055d24eb0cf56 JslConnectDevices (JoyShockMapper + 0x97f56)
#3 0x000055d24ea8d3d4 _Z14connectDevicesv (JoyShockMapper + 0x183d4)
#4 0x000055d24ea95571 main (JoyShockMapper + 0x20571)
#5 0x00007fa37ec0f152 __libc_start_main (libc.so.6 + 0x28152)
#6 0x000055d24ea89eae _start (JoyShockMapper + 0x14eae)
EDIT: Actually it also crashes when nothing is plugged in:
(gdb) bt
#0 0x0000555555656f90 in ()
#1 0x00005555555e9340 in std::function<void ()>::operator()() const (this=0x7fffffffc210) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/std_function.h:622
#2 StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0::operator()() const (this=0x555555662048) at /usr/src/debug/JoyShockMapper/JoyShockMapper/src/linux/StatusNotifierItem.cpp:29
#3 std::__invoke_impl<void, StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0>(std::__invoke_other, StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0&&) (__f=...)
at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/invoke.h:60
#4 std::__invoke<StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0>(StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0&&) (__fn=...)
at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/bits/invoke.h:95
#5 std::thread::_Invoker<std::tuple<StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (this=0x555555662048)
at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/thread:264
#6 std::thread::_Invoker<std::tuple<StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0> >::operator()() (this=0x555555662048)
at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/thread:271
#7 std::thread::_State_impl<std::thread::_Invoker<std::tuple<StatusNotifierItem::StatusNotifierItem(void*, std::function<void ()>&&)::$_0> > >::_M_run() (this=0x555555662040)
at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/thread:215
#8 0x00007ffff748dc24 in std::execute_native_thread_routine(void*) (__p=0x555555662040) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#9 0x00007ffff75b33e9 in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007ffff7195293 in clone () at /usr/lib/libc.so.6
May be because I'm trying to use a remote X server, etc. Will check next time I get a chance to attach a monitor to it.
@sjuxax Keep in mind that it might also crash if you don't have read/write access to hidraw devices.
Try making a new udev rule in /etc/udev/rules.d and see if it changes anything (you will have to add your user to the plugdev group if it exists)
Here's the one I use:
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
Tried building both completely manually as well as using the AUR package (which just runs the same commands, essentially), both fail with a bunch of warnings and errors. Here's the full output (edit: also included as text file in comment below):
I definitely have all the dependencies required.
Arch Linux Kernel 5.8.1 (as well as 5.7.15) Ryzen 7 3800X Clang++ 10.0.1