Oculus Rift on RPi3

I am trying to get the DK1 working on a raspberry pi 3. I downloaded the Oculus Linux SDK version 2.5 and started to build things up. I am using James Georges ofxOculusRift as a base. I know it is underpowered but I dont need it to do anything fancy if I get it to work, just play a movie.

I think the structure is OK, I am working with a cut down version to start with, without any drawing at all, I just want to get the sensor data working first. I know I will have to re-write the distortion shaders and some of the draw functions for openGL ES, but I did not get that far yet.

I am getting stuck on a function that the SDK uses to check the screens attached and see which rift it is. I could remove it, but for now I dont want to alter the SDK. It uses Xinerama to do the query, which is installed on the PI, but I cannot get it to link to the library. The lines that cause the compile to fail are:

OVR_Linux_HMDDevice.cpp:(.text+0x778): undefined reference to `XineramaIsActive'
OVR_Linux_HMDDevice.cpp:(.text+0x78c): undefined reference to `XineramaQueryScreens'

I tried to include Xinerama before any of the Oculus stuff, (it is installed on the PI, and I did not disable x11 in the config), but I cannot get it to find the library.

Any ideas on how I could get this to link on the pi from this OF app?


I don’t have a raspberry atm. But on my local linux machine, I have a libXinerama.so. You have that as well? If so, try to link it with -lXinerama in your config.make file.

Cheers, yes libXinerama is present on my machine.
As a linux ignorant person, how do I “link it with -lXinerama in your config.make file.” (this means the one for the project not for the OF library right?)

Just add -lXinerama to the PROJECT_LDFLAGS entry in the config.make file within your project folder.

Thanks a lot, that did the trick, and at least everything compiles but on make run I get

Segmentation fault
/home/pi/Documents/of_v0.9.3_linuxarmv6l_release/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:169: recipe for target 'run' failed
make: *** [run] Error 139

A bit of reading means this is not to easy to trace…I switched back to a 64 memory split to give the app more memory but no joy.

I guess I need to learn to debug on the pi to find the source of this.


Not much fun to debug without a gui but you can run “gdb appName”. Good luck