SeongGino / QMamehook

Mamehook at home:
GNU Lesser General Public License v2.1
5 stars 1 forks source link

QMamehook on Raspberry pi 4 (Buster) #3

Closed ruenes1 closed 4 months ago

ruenes1 commented 4 months ago

Thanks a lot for this! I'm trying to setup it for a Raspberry pi 4 running Buster (32 bits) but compilation failed...

I've followed the install steps (by the way, the command 'mkdir build && mkdir build' should be 'mkdir build && cd build' in the Readme), but when compiling I get the following output:

pi@retropie:~/QMamehook $ make [ 20%] Automatic MOC and UIC for target QMamehook [ 20%] Built target QMamehook_autogen Scanning dependencies of target QMamehook [ 40%] Building CXX object CMakeFiles/QMamehook.dir/qhookermain.cpp.o /home/pi/QMamehook/qhookermain.cpp: In member function ‘bool qhookerMain::GameSearching(QString)’: /home/pi/QMamehook/qhookermain.cpp:132:40: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ buffer = input.split('\r', Qt::SkipEmptyParts); /home/pi/QMamehook/qhookermain.cpp: In member function ‘bool qhookerMain::GameStarted(QString)’: /home/pi/QMamehook/qhookermain.cpp:214:40: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ buffer = input.split('\r', Qt::SkipEmptyParts); /home/pi/QMamehook/qhookermain.cpp:258:113: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ QStringList action = settingsMap[func].mid(settingsMap[func].indexOf('|')+1).split(',', Qt::SkipEmptyParts); /home/pi/QMamehook/qhookermain.cpp:276:75: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ QStringList action = settingsMap[func].split(',', Qt::SkipEmptyParts); /home/pi/QMamehook/qhookermain.cpp:300:112: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ QStringList action = settingsMap[func].left(settingsMap[func].indexOf('|')).split(',', Qt::SkipEmptyParts); /home/pi/QMamehook/qhookermain.cpp:319:75: error: ‘SkipEmptyParts’ is not a member of ‘Qt’ QStringList action = settingsMap[func].split(',', Qt::SkipEmptyParts); make[2]: [CMakeFiles/QMamehook.dir/build.make:89: CMakeFiles/QMamehook.dir/qhookermain.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:77: CMakeFiles/QMamehook.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

I've already installed QT5 with:

apt-get install qt5-default apt-get install qtcreator apt-get install libqt5serialport5 apt-get install ligqt5serialport5-dev

The installed version is as follows:

pi@retropie:~/QMamehook $ qmake --version QMake version 3.1 Using Qt version 5.11.3 in /usr/lib/arm-linux-gnueabihf

ruenes1 commented 4 months ago

Just to update that I managed to compile it by replacing Qt::SkipEmptyParts by QString::SkipEmptyParts and including .

Now it compiles and runs fine on the Raspberry. The issue was that the Qt release in apt-get for Raspbian is an older version (5.11) that does not support Qt::SkipEmptyParts.

I leave this open in case you want to update on the compatibility with the Raspberry, but feel free to close it.

SeongGino commented 4 months ago

Sorry for the lateness, I've been working on OpenFIRE as of late to notice the activity here...

Weird! Granted, I didn't test on a Pi install as the best I have is a Pi 3, which doesn't perform very well these days. But that seems like some weirdness in the difference of the Qt version? I'll touch base after trying it on the Pi 3, because that's very bizarre it doesn't come up on desktop compilation or GH actions' builds.

1MIN-EDIT: fixed the typo in the readme. But I just doublechecked the code of the OpenFIRE app I had building on my Pi 3 a few days ago, and that uses Qt::SkipEmptyParts but still builds without problem on the platform. It's running Pi OS 12 (bookworm) while I noticed you're running Raspbian Buster from 2019, so perhaps it's a difference in Qt <5.15?

Either way, it should build fine on current Pi systems with an up-to-date OS, so I may just close this anyways (but do let me know if it's still an issue after updating distro). Note to self, add Debian-friendly package names to build instructions.