JoyShockMapper
JoyShockMapper copied to clipboard
Cannot build 2.0.1 on Linux (OpenSuse Tumbleweed)
I'm no C++ dev, so I have no idea what's going on here, except maybe some version incopatibility between libs? Seems like signatures of some methods/functions differ from what the souce expects. I'll provide any additional required info if someone tells me where to look and what to get.
cmake .. -Wno-dev -DCMAKE_CXX_COMPILER=clang++ && cmake --build .
-- The CXX compiler identification is Clang 10.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking for one of the modules 'gtk+-3.0'
-- Checking for one of the modules 'appindicator3-0.1'
-- Checking for one of the modules 'libevdev'
-- JSM version is v2.0.1
-- CPM: adding package [email protected] (v2.0.1)
-- Checking for one of the modules 'hidapi-hidraw'
-- CPM: adding package [email protected] (v0.6.6)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/czar/work/JoyShockMapper/build
Scanning dependencies of target JoyShockLibrary
[ 8%] Building CXX object _deps/joyshocklibrary-build/JoyShockLibrary/CMakeFiles/JoyShockLibrary.dir/JoyShockLibrary.cpp.o
/home/czar/work/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:64:41: warning: format specifies type 'int' but the argument has type 'hid_device *' (aka 'hid_device_ *') [-Wformat]
printf("Controller %d timed out\n", jc->handle);
~~ ^~~~~~~~~~
/home/czar/work/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:78:61: warning: format specifies type 'int' but the argument has type 'hid_device *' (aka 'hid_device_ *') [-Wformat]
printf("Attempting to re-initialise controller %d\n", jc->handle);
~~ ^~~~~~~~~~
/home/czar/work/JoyShockMapper/build/_deps/joyshocklibrary-src/JoyShockLibrary/JoyShockLibrary.cpp:86:61: warning: format specifies type 'int' but the argument has type 'hid_device *' (aka 'hid_device_ *') [-Wformat]
printf("Attempting to re-initialise controller %d\n", jc->handle);
~~ ^~~~~~~~~~
3 warnings generated.
[ 16%] Linking CXX static library libJoyShockLibrary.a
[ 16%] Built target JoyShockLibrary
Scanning dependencies of target JoyShockMapper
[ 25%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:255: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.");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/bits/exception.h:66:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'const std::exception' for 1st argument
exception(const exception&) = default;
^
/usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/bits/exception.h:68:5: note: candidate constructor not viable: no known conversion from 'const char [100]' to 'std::exception' for 1st argument
exception(exception&&) = default;
^
/usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/bits/exception.h:63:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
exception() _GLIBCXX_NOTHROW { }
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:482:11: warning: 4 enumeration values not handled in switch: 'OnTurbo', 'OnTapRelease', 'OnInstantRelease'... [-Wswitch]
switch (evt)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:571:10: warning: enumeration value 'None' not handled in switch [-Wswitch]
switch (actMod)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:600: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);
^~~~~~~~~~~~~
/usr/lib64/clang/10.0.1/include/stdarg.h:19:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type) __builtin_va_arg(ap, type)
^~~~
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:625:11: warning: 22 enumeration values not handled in switch: 'INVALID', 'NONE', 'LUP'... [-Wswitch]
switch (index) {
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
switch (index) {
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:844:12: warning: 36 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
switch (index)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:968:12: warning: 68 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_THRESHOLD', 'MAX_GYRO_THRESHOLD'... [-Wswitch]
switch (index)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:1779:53: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
printf("Could not open online help. Error #%d\n", err);
~~ ^~~
%lu
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:1935:10: warning: enumeration values 'FORWARD' and 'INVALID' not handled in switch [-Wswitch]
switch (controllerOrientation)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:2219:12: warning: enumeration value 'INVALID' not handled in switch [-Wswitch]
switch (controllerOrientation)
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:2271:10: warning: enumeration value 'INVALID' not handled in switch [-Wswitch]
switch (gyro.ignore_mode) {
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:2837:30: error: use of undeclared identifier 'cmdLine'
currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]);
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:2837:43: error: use of undeclared identifier 'cmdLine'
currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]);
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:2837:58: error: use of undeclared identifier 'cmdLine'
currentWorkingDir = string(&cmdLine[0], &cmdLine[wcslen(cmdLine)]);
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
switch (index) {
^
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
/home/czar/work/JoyShockMapper/JoyShockMapper/src/main.cpp:775:12: warning: 57 enumeration values not handled in switch: 'INVALID', 'MIN_GYRO_SENS', 'MAX_GYRO_SENS'... [-Wswitch]
17 warnings and 5 errors generated.
gmake[2]: *** [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:82: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:172: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
I'm afraid I don't know anything about compiling the Linux version.
Duplicate of #92