Page 1 of 1

Compiling XBMC with joystick support?

Posted: Mon Oct 22, 2012 5:57 pm
by Dangerdog
Hi guys

I've managed to build xbmc following the instructions given and it is running great!

Id really like to get it to work with a gamepad/joystick though as I am trying to use my pi for a handheld device with only a gamepad as input. But unfortunately, when I change "--disable-joystick" to "--enable-joystick" in the configure options the source no longer compiles.

Anyone here have some ideas what I can try to get it to compile with joystick support or managed to do so? Here is the last couple of lines output from the compiler:

Code: Select all

make[1]: Entering directory `/home/pi/src/xbmc-rbp-joystick/lib/libapetag'
make  all-am
make[2]: Entering directory `/home/pi/src/xbmc-rbp-joystick/lib/libapetag'
make[2]: Leaving directory `/home/pi/src/xbmc-rbp-joystick/lib/libapetag'
make[1]: Leaving directory `/home/pi/src/xbmc-rbp-joystick/lib/libapetag'
LD      xbmc.bin
xbmc/settings/settings.a(GUIWindowSettingsCategory.o): In function `CGUIWindowSettingsCategory::OnSettingChanged(CBaseSettingControl*)':
GUIWindowSettingsCategory.cpp:(.text+0x6ed0): undefined reference to `CJoystick::SetEnabled(bool)'
xbmc/xbmc.a(Application.o): In function `CApplication::Initialize()':
Application.cpp:(.text+0xb4a0): undefined reference to `CJoystick::SetEnabled(bool)'
xbmc/xbmc.a(Application.o): In function `CApplication::ProcessJoystickEvent(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, bool, float, unsigned int)':
Application.cpp:(.text+0x11258): undefined reference to `CJoystick::Reset(bool)'
xbmc/xbmc.a(Application.o): In function `CApplication::ProcessGamepad(float)':
Application.cpp:(.text+0x1163c): undefined reference to `CJoystick::Update()'
Application.cpp:(.text+0x1164c): undefined reference to `CJoystick::GetButton(int&, bool)'
Application.cpp:(.text+0x11740): undefined reference to `CJoystick::Reset(bool)'
Application.cpp:(.text+0x11780): undefined reference to `CJoystick::Reset(bool)'
Application.cpp:(.text+0x11794): undefined reference to `CJoystick::GetAxis(int&)'
Application.cpp:(.text+0x117a8): undefined reference to `CJoystick::GetAmount(int)'
Application.cpp:(.text+0x11880): undefined reference to `CJoystick::GetAmount(int)'
Application.cpp:(.text+0x118bc): undefined reference to `CJoystick::Reset(bool)'
Application.cpp:(.text+0x11910): undefined reference to `CJoystick::GetHat(int&, int&, bool)'
Application.cpp:(.text+0x119b4): undefined reference to `CJoystick::GetAmount(int)'
Application.cpp:(.text+0x11a7c): undefined reference to `CJoystick::Reset(bool)'
Application.cpp:(.text+0x11aa8): undefined reference to `CJoystick::Reset(bool)'
Application.cpp:(.text+0x11abc): undefined reference to `CJoystick::Reset(bool)'
xbmc/xbmc.a(SystemGlobals.o): In function `_GLOBAL__sub_I_SystemGlobals.cpp':
SystemGlobals.cpp:(.text.startup+0x284): undefined reference to `CJoystick::CJoystick()'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1
It seems like a library or something needs to be linked with the source for this to work or maybe something is at the wrong version? Im willing to spend some time figuring it out but meanwhile any help would be much appreciated :)

Re: Compiling XBMC with joystick support?

Posted: Wed Dec 26, 2012 10:46 pm
by master-sonic
I'm trying to get joystick support too but have failed to compile as well. I'm running an up-to-date Arch Linux on my pi.

I tried --enable-x11 and --enable-sdl and got different error messages:

Code: Select all

OMXPlayerVideo.cpp: In member function ‘void OMXPlayerVideo::Output(int, double, bool)’:
OMXPlayerVideo.cpp:338:22: error: ‘class CWinSystemX11GLES’ has no member named ‘Support3D’
Any help or hints would be appreciated!

Re: Compiling XBMC with joystick support?

Posted: Thu Jun 13, 2013 5:45 pm
by Kilianos
Yes I'm trying to do the same, compile failed when I tried to enable joystick. Anyone have any luck with this since...

Re: Compiling XBMC with joystick support?

Posted: Tue Jul 23, 2013 2:46 pm
by joacliba
For compile with joystick support add --enable-joystick and --enable-sdl to the ./configure

:D

P.D:

I used this ./configure:

./configure --prefix=/usr --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --localstatedir=/var/lib --with-platform=raspberry-pi --disable-gl --enable-gles --disable-x11 --enable-ccache --enable-optimizations --enable-external-libraries --disable-goom --disable-hal --disable-pulse --disable-vaapi --disable-vdpau --disable-xrandr --disable-airplay --disable-alsa --enable-avahi --disable-libbluray --disable-dvdcss --disable-debug --enable-joystick --enable-mid --disable-nfs --disable-profiling --disable-projectm --enable-rsxs --enable-rtmp --disable-vaapi --disable-vdadecoder --disable-external-ffmpeg --disable-optical-drive --enable-sdl

I use it without X11, I don't have problems with that.

Re: Compiling XBMC with joystick support?

Posted: Thu Jul 25, 2013 12:37 pm
by master-sonic
joacliba wrote:For compile with joystick support add --enable-joystick and --enable-sdl to the ./configure
Nice, thank you! I finally succeeded in compiling xbmc using your ./configure line and the pkgbuild from https://github.com/archlinuxarm/PKGBUIL ... mc-rbp-git. On startup, xbmc recognizes my gamepad

Code: Select all

13:25:03 T:3036516352    INFO: opened device 'Microsoft X-Box 360 pad' (file name /dev/input/event0), m_bSkipNonKeyEvents 0
but it doesn't react and it doesn't register any keypresses in the debug log. I haven't configured anything as I assumed this should run out of the box. The xpad and joydev drivers are loaded and the gamepad is working (tested with jstest /dev/input/js0). Interestingly, jstest stops working if xbmc is running.

Got any advice? Are you using a powered USB hub for your gamepad? (I'm not)

Re: Compiling XBMC with joystick support?

Posted: Sun Jul 28, 2013 6:35 am
by joacliba
master-sonic wrote:but it doesn't react and it doesn't register any keypresses in the debug log. I haven't configured anything as I assumed this should run out of the box. The xpad and joydev drivers are loaded and the gamepad is working (tested with jstest /dev/input/js0). Interestingly, jstest stops working if xbmc is running.

Got any advice? Are you using a powered USB hub for your gamepad? (I'm not)
That is the behaviour if joystick is disabled, are you sure you are running compiled xbmc and not the deb package? Run the /path/to/source/xbmc.bin binary and see what happens.

For debug you need to enable the option in system settings.

Finally follow this instructions:
http://wiki.xbmc.org/index.php?title=Keymap

Re: Compiling XBMC with joystick support?

Posted: Sun Jul 28, 2013 10:13 am
by master-sonic
So apparently --enable-joystick, --enable-sdl and --enable-x11 (which is required) is disabled by --host=arm-linux-gnueabihf. Removing the appropriate lines in configure.in resp. configure after bootstrapping finally builds xbmc with joystick support enabled.

However, xbmc now fails to start with:

Code: Select all

14:54:10 T:3032182784  NOTICE: Setup SDL
14:54:10 T:3032182784   FATAL: XBAppEx: Unable to initialize SDL: Unable to open a console terminal
According to http://forum.xbian.org/showthread.php?tid=600, using SDL is a bad idea as it uses the framebuffer.
I don't think these kind of framebuffer routes is a good idea. That's why XBMC has a custom implementation for the RPi in which they don't directly use the framebuffer.
Are you sure your ./configure flags got applied? If yes, do you experience any performance issues?
Maybe it's because im running Arch Linux on my pi. You are using raspbmc or raspian I assume?