OpenMV IDE on Raspberry Pi 4

Hi!
I just downloaded the OpenMV IDE from the website for Raspberry Py.

I followed the procedure provided by the README.txt in the openmv folder but get this error message after I execute the openmvide.sh----

This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “”.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted
Operating system is Raspbian downloaded from the official site.

If someone has a solution to this problem, please share it.
Thank!

Hi, you need to run the setup.sh file in the download zip. It installs the necessary modules for the IDE to run.

I did just that, but still I can’t run this application.

Hi, I’ll buy a Pi4. I last checked this on a 3. Note, we just support the official raspbian noobs image. I only test the IDE runs on a virgin OS. If you install anything that heavily changes how parts and libraries work I cannot easily support you.

I installed it on virgin Raspbian downloaded from the official site raspberrypi.org.
I also tried installing it on a Raspberry pi 3 and got exactly the same result.
Maybe some kind of library version is not suitable?

The issue is from a bad linked library.

This package have to be installed:

$ dpkg -S /usr/lib/arm-linux-gnueabihf/libts.so
libts-dev:armhf: /usr/lib/arm-linux-gnueabihf/libts.so

You can see here that the libqxcb.so plugin misses a link to a library:

$ ldd /home/pi/openmvide/lib/Qt/plugins/platforms/libqxcb.so | grep found
        libts-0.0.so.0 => not found
	libts-0.0.so.0 => not found

Creating a symbolic link to the correct library name fixes the problem:

$ ls -al /usr/lib/arm-linux-gnueabihf/libts.so
lrwxrwxrwx 1 root root 15 Jan 24  2019 /usr/lib/arm-linux-gnueabihf/libts.so -> libts.so.0.10.1
$ sudo ln -s /usr/lib/arm-linux-gnueabihf/libts.so /usr/lib/arm-linux-gnueabihf/libts-0.0.so.0
$ ldd /home/pi/openmvide/lib/Qt/plugins/platforms/libqxcb.so | grep found
$ bin/openmvide.sh 
$

Thanks for be fix. Mind sending a PR for the code to fix it here? openmv-ide/make.py at e0e2c454c5b967851274ddeed316cf4d8f9dfa51 · openmv/openmv-ide · GitHub

Thank you so much!!!

But now i have this problem:

pi@raspberrypi:~/openmvide/bin $ ./openmvide.sh
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL Error : Could not create the egl surface: error = 0x3003

Hi, is a monitor attached to your Pi?

Here it is:

O.

Be sure that you sourced .bashrc after executing setup.sh or logged in again:

source ~/.bashrc

Explanations:

pi@raspberrypi:~/openmvide $ cat ~/.bashrc
[...]
# Force Qt Apps to use xcb
export QT_QPA_PLATFORM=xcb

pi@raspberrypi:~/openmvide $ unset QT_QPA_PLATFORM    
pi@raspberrypi:~/openmvide $ bin/openmvide.sh 
libEGL warning: DRI2: failed to authenticate
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL Error : Could not create the egl surface: error = 0x300b

pi@raspberrypi:~/openmvide $ export QT_QPA_PLATFORM=xcb
pi@raspberrypi:~/openmvide $ bin/openmvide.sh 
pi@raspberrypi:~/openmvide $

Thank you so much again!
This was inside my bashrc:

cat ~/.bashrc
[...]
# Force Qt Apps to use xcb
export LD_LIBRARY_PATH=xcb

I replaced the last line with “export QT_QPA_PLATFORM=xcb” and now it works!!!

Thank you so much again!
This was inside my bashrc:

cat ~/.bashrc
[...]
# Force Qt Apps to use xcb
export LD_LIBRARY_PATH=xcb

I replaced the last line with “export QT_QPA_PLATFORM=xcb” and now it works!!!

Nested quotes >_<

I’ve followed the steps above, and I can get the IDE to run when I change my directory in the terminal, then run $bin/openmvide.sh.

Sadly though, when I try to just open the folder and double click the Openamvide.sh file it won’t open…

Is their a way to make this work? or is their a way to create a desktop shortcut for this? I’ve tried a few ways but to no avail.

I’m doing some educational things with kids so I’d like them to just be able to click something and have it open.

Try restarting your device. The environment for the shell (the GUI) only gets reset on boot versus a terminal window is reset every time it opens. That script modified the environment so that has to be reloaded.

Yeah same issue, if I open the folder directory in terminal, then type bin/openmvide.sh it opens the IDE, still a no go on just clicking openmvide.sh


When I try JUST clicking on the openmvide.sh I get the " Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
EGL Error : Could not create the egl surface: error = 0x3003" Error… this seems very peculiar

Try this:

I don’t actually know what to do for this problem. I’m not in a place where I can debug this for your however right now for the next couple of days. Headed to a wedding. Id recommend googling for the solution. This issues isn’t OpenMV specific. You’re just running into general linux on raspberry pi issues.

This is because the Main Menu links or by opening the file in the file explorer doesn’t source .bashrc containing the line: export QT_QPA_PLATFORM=xcb

Also, the shebang at the top of the openmvide.sh file is pointing to /bin/sh while the export is for the bash shell.

The best way to resolve this issue is to change the first line of openmvide.sh to run bash (instead of dash) in interactive mode (sourcing .bashrc):

1c1
< #! /bin/sh
---
> #!/bin/bash -i

Oh, and yes, I confirm it works. It’s not only hypothetical :wink: