Screen.mex error | Incompatible Version or Missing Dependency

I am using Octave 7.2.0 (Flatpak) on Ubuntu 22.10. I have Psychtoolbox version 3.0.18 - Flavor: Manual Install loaded as well. However, trying to use Screen or help Screen immediately results in this error.

error: /home/sayantan/Documents/Psychtoolbox_3/Psychtoolbox/PsychBasic/Octave5LinuxFiles64/Screen.mex: failed to load
Incompatible version or missing dependency?
libdc1394.so.25: cannot open shared object file: No such file or directory
error: called from
    help at line 102 column 20

Any ideas on how to fix this. I couldn’t find any related discussions online.

Ubuntu 22.10 already ships with Octave 7.2 by default, why not use that? Btw. PTB + Ubuntu 22.10 is only lightly spot tested iirc. Lack of financial support by the 99% of our free-riding users → lack of funding → limited time to test anything but the most common configs, ie. Ubuntu 22.04-LTS.

We don’t support running from flatpak or snap or similar, so I don’t know. But afaik flatpak only allows access to libraries bundled in the flatpak by default (security/sandboxing etc.) and libdc1394 is not part of octave or its flatpak, but of the system.

PTB has various library dependencies like that, and the need for low level access to various system bits for full functionality, so sandboxing like with flatpak (or snaps?) etc. will get badly in the way unless you take extra configuration effort → “Here starts your task”

-mario

I’ve also tried to get flatpak octave to read system files using the permissions override:

sudo flatpak override <package-identifier> --filesystem=host

https://docs.flatpak.org/en/latest/sandbox-permissions-reference.html

But didn’t get this to work either. The glacial speed of package updates in Debian / Ubuntu is really annoying sometimes, but for tools like PTB, snap or flatpak sadly is not a solution…

1 Like

Thank you for your response. I do appreciate your time! Are you suggesting using the .deb package instead?

Debian (to a huge degree) and Ubuntu (to a somewhat lesser degree) prioritize stability over newness, so it makes sense that they are usually years behind. And PTB can be had from NeuroDebian reasonably fresh. But also, I only test with Octave versions bundled with a recommended Ubuntu release, so with flatpak et al. you are on your own there as well. And PTB won’t use Octave/Matlab features that aren’t supported in the oldest Octave version we officially support, e.g., atm. what’s in Ubuntu 20.04 / Octave 5.2.

Your --filesystem=host will probably be made a tad useless because some directories are black-listed, as the footnotes and links describe, e.g., /lib, /lib32, /lib64, /bin, /sbin, /usr, /boot, /root, /tmp, /etc, /app, /run, /proc, /sys, /dev, /var

Without etc, sys, dev some low-level stuff, or special device access (USB, HID, serial ports etc., low-level access to AMD/NVidia gpu’s), realtime optimizations, PTB would be quite hamstrung already. Also no access to many libraries it needs, unless they’d be included in the octave flatpak.

And there’s probably more switches required, like --devices=all and various other permissions to make it work. Don’t know if snaps would work better, but the goal of all these app distribution systems is not only ease of distribution/updates outside the regular distribution package management, but also rather strict security sandboxing / isolation, as such 3rd party stores are considered way less trustworthy than what comes from the distributions own package repositories.

I saw your post on octave-users discourse though, forgot most of it already. Good if Opticka would be able to run on Octave. But yeah, flatpak would probably barely work even if you manage to disable almost all sandboxing.

1 Like

I think @mariokleiner is spot on. I uninstalled the flatpak version, and installed the .deb package from Ubuntu’s repository. It seems like the Screen function now works properly.

1 Like

My personal feeling is that snaps are less reliable than flatpaks (at least I know of several broken snaps with working flatpaks), so I usually try to get flatpak working first.

I agree that these distribution tools are not a good fit for a specialised tool like PTB… Debian backports seems like a good intermediate between stability and apt integration, but it also requires someone from the debian team to explicitly handle the backport for octave etc…