How to actually install qtsixa on your Raspberry Pi.


So I’ve been spending my day setting up a prebuilt retropi image on a raspberry pi to use my ps3 controller (again) with this device instead of my kodi htpc.

All the guides I read indicated I should download and compile this http://sourceforge.net/projects/qtsixa/files/QtSixA%201.5.1/QtSixA-1.5.1-src.tar.gz

but would sadly always result in this:

pi@raspberrypi ~/QtSixA-1.5.1/sixad $ make
mkdir -p bins
g++ -O2 -Wall -Wl,-Bsymbolic-functions sixad-bin.cpp bluetooth.cpp shared.cpp textfile.cpp -o bins/sixad-bin `pkg-config --cflags --libs bluez` -lpthread -fpermissive
sixad-bin.cpp: In function ‘int main(int, char**)’:
sixad-bin.cpp:84:20: warning: taking address of temporary [-fpermissive] sixad-bin.cpp:89:18: error: ‘close’ was not declared in this scope
sixad-bin.cpp:100:20: error: ‘sleep’ was not declared in this scope
sixad-bin.cpp:109:22: error: ‘close’ was not declared in this scope
sixad-bin.cpp:117:22: error: ‘close’ was not declared in this scope
sixad-bin.cpp:140:18: error: ‘close’ was not declared in this scope
sixad-bin.cpp:144:14: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘void do_connect(int, bdaddr_t*, bdaddr_t*, int)’:
bluetooth.cpp:104:30: error: ‘close’ was not declared in this scope
bluetooth.cpp:110:24: error: ‘dup2’ was not declared in this scope
bluetooth.cpp:111:22: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘int l2cap_listen(const bdaddr_t*, short unsigned int, int, int)’:
bluetooth.cpp:148:17: error: ‘close’ was not declared in this scope
bluetooth.cpp:162:17: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘void l2cap_accept(int, int, int, int, int)’:
bluetooth.cpp:195:26: error: ‘close’ was not declared in this scope
bluetooth.cpp:201:26: error: ‘close’ was not declared in this scope
bluetooth.cpp:221:26: error: ‘fork’ was not declared in this scope
bluetooth.cpp:228:32: error: ‘dup2’ was not declared in this scope
bluetooth.cpp:229:30: error: ‘close’ was not declared in this scope
bluetooth.cpp:242:57: error: ‘execve’ was not declared in this scope
bluetooth.cpp:254:26: error: ‘close’ was not declared in this scope
bluetooth.cpp: In function ‘int l2cap_connect(bdaddr_t*, bdaddr_t*, short unsigned int)’:
bluetooth.cpp:274:25: error: ‘close’ was not declared in this scope
bluetooth.cpp:291:25: error: ‘close’ was not declared in this scope
make: *** [sixad_bins] Error 1

So I set about to figure this one out.

A few sources said to use the git version of qtsixa instead, I noticed it hasn’t been updated in years but seems more up to date than the prezipped version from the website.

Tried to build that.. had a bunch of errors.

pi@raspberrypi ~/qtsixa/qtsixa-master $ make
make -C qtsixa
make[1]: Entering directory `/home/pi/qtsixa/qtsixa-master/qtsixa'
pyuic4 -o ./gui/ui_qtsixa_mainw.py ./gui/ui/qtsixa_mainw.ui
make[1]: pyuic4: Command not found
make[1]: *** [build] Error 127
make[1]: Leaving directory `/home/pi/qtsixa/qtsixa-master/qtsixa'
make: *** [build] Error 2

Sooooo something called pyuic4 was missing… found this forum post http://gis.stackexchange.com/questions/65520/make-pyuic4-command-not-found

sudo apt-get install pyqt4-dev-tools qt4-designer libjack-dev

the libjack-dev isn’t from the original post but install it now anyways … your going to need it.

I had installed pyqt4-dev-tools qt4-designer without libjack-dev and got this build error

pi@raspberrypi ~/qtsixa/qtsixa-master $ make
make -C qtsixa
make[1]: Entering directory `/home/pi/qtsixa/qtsixa-master/qtsixa'
pyuic4 -o ./gui/ui_qtsixa_mainw.py ./gui/ui/qtsixa_mainw.ui
pyuic4 -o ./gui/ui_qtsixa_aboutw.py ./gui/ui/qtsixa_aboutw.ui
pyuic4 -o ./gui/ui_qtsixa_managew.py ./gui/ui/qtsixa_managew.ui
pyuic4 -o ./gui/ui_qtsixa_newdevw.py ./gui/ui/qtsixa_newdevw.ui
pyuic4 -o ./gui/ui_qtsixa_newprofilew.py ./gui/ui/qtsixa_newprofilew.ui
pyuic4 -o ./gui/ui_qtsixa_preferencesw.py ./gui/ui/qtsixa_preferencesw.ui
pyuic4 -o ./gui/ui_qtsixa_referencew.py ./gui/ui/qtsixa_referencew.ui
pyuic4 -o ./gui/ui_qtsixa_sixpairw.py ./gui/ui/qtsixa_sixpairw.ui
pyrcc4 -o ./gui/qtsixa_rc.py ./icons/qtsixa.qrc
make[1]: Leaving directory `/home/pi/qtsixa/qtsixa-master/qtsixa'
make -C utils
make[1]: Entering directory `/home/pi/qtsixa/qtsixa-master/utils'
mkdir -p bins
cc -O2 -Wall -Wl,-Bsymbolic-functions hidraw-dump.c -o bins/hidraw-dump
cc -O2 -Wall -Wl,-Bsymbolic-functions sixpair.c -o bins/sixpair `pkg-config --cflags --libs libusb`
cc -O2 -Wall -Wl,-Bsymbolic-functions sixpair_kbd.c -o bins/sixpair-kbd `pkg-config --cflags --libs libusb`
cc -O2 -Wall -Wl,-Bsymbolic-functions sixad-jack.c -o bins/sixad-jack `pkg-config --cflags --libs jack` -lm
Package jack was not found in the pkg-config search path.
Perhaps you should add the directory containing `jack.pc'
to the PKG_CONFIG_PATH environment variable
No package 'jack' found
sixad-jack.c:25:23: fatal error: jack/jack.h: No such file or directory
compilation terminated.
make[1]: *** [tools] Error 1
make[1]: Leaving directory `/home/pi/qtsixa/qtsixa-master/utils'
make: *** [build] Error 2

After installing libjack-dev everything built without problems, did a sudo make install and it all works nicely.