ScummVM Snap failing to install on RPi 4

@lotharsm, I’ve got a draft PR but testing it I found some existing problems.

  1. Running the daemon on Ubuntu Desktop fails without the “unity7” interface, so I’ve also updated the “daemon” app to provide that.

  2. Running on RPi3/Ubuntu Core fails. This may be because the “unity7” interface has no slots to connect to. Or something else:

2020-12-10T14:42:04Z systemd[1]: Started Service for snap application scummvm.daemon.
2020-12-10T14:42:05Z scummvm.daemon[7053]: + [ -z /root/snap/scummvm/x1/.config ]
2020-12-10T14:42:05Z scummvm.daemon[7053]: + mkdir -p /run/user/0/snap.scummvm/speech-dispatcher
2020-12-10T14:42:05Z scummvm.daemon[7053]: + /snap/scummvm/x1/usr/bin/speech-dispatcher -d -C /snap/scummvm/x1/etc/speech-dispatcher -S /run/user/0/snap.scummvm/speech-dispatcher/speechd.sock -m /snap/scummvm/x1/usr/lib/speech-dispatcher-modules -t 30
2020-12-10T14:42:05Z scummvm.daemon[7053]: [Thu Dec 10 14:42:05 2020 : 89962] speechd: Speech Dispatcher 0.8.8 starting
2020-12-10T14:42:05Z scummvm.daemon[7053]: + [ ! -f /root/snap/scummvm/x1/.config/scummvm/scummvm.ini ]
2020-12-10T14:42:05Z scummvm.daemon[7053]: + [ ! -f /root/snap/scummvm/x1/.config/scummvm/.added-games-bundle ]
2020-12-10T14:42:05Z scummvm.daemon[7053]: + exec /snap/scummvm/x1/bin/scummvm -f
2020-12-10T14:42:05Z -[7053]: unity-launcher.vala:157: Unable to connect to session bus: Cannot autolaunch D-Bus without X11 $DISPLAY
2020-12-10T14:42:05Z scummvm.daemon[7053]: Could not initialize SDL: Could not initialize UDEV!
2020-12-10T14:42:05Z systemd[1]: snap.scummvm.daemon.service: Main process exited, code=exited, status=1/FAILURE

There’s no “X11 $DISPLAY” on a core system, so that’s a broken dependency. I don’t know how that affects functionality.

I’ve seen the “Could not initialize SDL: Could not initialize UDEV” error before, I think that just needs hardware-observe. Will try that later.

Anyway, I think I’ve fixed the startup logic that caused the install failure on RPi4. But I can’t test a device I don’t have.


Update

I’ve marked the PR “Ready for review” as it seems to be working within the constraints outlined.

Is there a procedure I can do to help you test these changes on my hardware?

If you are familiar with building snaps, you can build it and side-load it.

I’m a snap/linux newb but down to learn. Is there a guide or tutorial to reference? I’ll give it a shot when I get off of work.

There’s probably a lot more detail here than you need, but:

1 Like

Thank you very much for working on this. I’m currently testing this on good ol’ amd64 since I don’t have a proper device available (yet).

I’m a bit unsure about the unity stuff since I never really used it in the past 5 years or so, so I can’t really comment on this.

What I already can tell is that

2020-12-10T14:42:05Z scummvm.daemon[7053]: Could not initialize SDL: Could not initialize UDEV!

is a follow-up issue due to the broken dbus connections - shouldn’t the daemon stuff only use wayland instead of x11 by default anyways?

No, this is SDL2 trying to connect to udev input. It needs that on X11, and insists on it for Wayland (even though it probably isn’t used as input comes via the Wayland connection).

I’ve worked around this by adding hardware-observe in the PR.

Correct, the daemon stuff only uses Wayland. That doesn’t graphics libraries trying to use X11 or mis-reporting errors as relating to X11.

I suspect, but haven’t tested, that the only reason unity7 is there is to allow SDL2 access to keyboard/mouse/touch input.

If disconnecting unity7 for the non-daemon app works (with hardware-observe connected) that would confirm this theory.

Anyway, the PR is ready. You can test much of the “daemon” logic on desktop with this approach:

How is this process going? In the interim, I have learned to cross-compile the nightly build of ScummVM for Rpi. If anyone is interested I will share my discoveries when I am finished writing it up.

You can follow the PR here:

I don’t think any more is needed than for one of the devs to land it, when it will build for edge

I know this is somewhat off topic, but the RPi ScummVM Snap being broken sent me down a rabbit hole of working through the process to build my own binary. I documented my process in much detail in a tutorial, hopefully someone will find this useful:

www.old-kid.com/scummvm

2 Likes

@OldKid Very nice tutorial regarding the build process, thank you very much for this!

In the meantime, I merged the fixes by @alan_g. The current edge build of the snap is already built with the fixed startup script, so maybe you want this to give another try :slight_smile:

Is there a special call I need to use to get the edge build? I still got the same error trying with the standard “sudo snap install scummvm”.

I am trying “snap install scummvm --channel=latest/edge” and seeing what happens.

Okay, not so good. Have a look at the errors:

There are a lot of benign messages there, so I may have missed something. It looks like you didn’t snap connect scummvm:hardware-observe

is this an end user issue or part of the snap package?

note that the libarmmem messages come from a hack that piOS ships sadly by default, you can just ignore them, they will not have any effect (apart from flooding your log).

you can safely edit /etc/ld.so.preload, comment the /usr/lib/arm-linux-gnueabihf/libarmmem.so line and reboot to make them go away if they bother you.

(or just uninstall the raspi-copies-and-fills package)

The snap can’t connect interfaces by itself, and snapd doesn’t connect hardware-observe by default. So the installer or user has to do it. The commandline installer doesn’t, that leaves it up to the user.

But the snap should give a more helpful log message.

I’m sorry, I’m not quite following. Let me see if I understand, for the scummvm snap install to work, I need to run this command:

snap connect scummvm:hardware-observe

I am returning this error:

pi@raspberrypi:~ $ snap connect scummvm:hardware-observe error: snap “scummvm” has no plug named “hardware-observe”

Am I missing something?

Odd. On my system:

$ snap info scummvm | grep installed
installed:          2.2.0            (4579) 600MB -
$ snap connections scummvm | grep hardware-observe
hardware-observe          scummvm:hardware-observe  :hardware-observe                manual