App runs when built by flathub but not when built locally

Hi,

I have a problem that when I build flatpak locally and try to install from local repository or from a flatpak bundle that was created locally that I get an error that does not happen when running from a build made on the flathub server. I can run manually from the flatpak build folder just fine however. Just doesn’t work when installing like a user would. The app in question is com.bitwig.BitwigStudio.

The error I get is this when I try to run the app after installation:

bwrap: Can’t mkdir /app/lib/i386-linux-gnu: Read-only file system
error: ldconfig failed, exit status 256

We need the i386 compatibiility extension in order to be able to run i386 audio plug-ins (VST2).

Here is how our manifest looks:

---

app-id: com.bitwig.BitwigStudio
command: bitwig-studio
runtime-version: “21.08”
runtime: org.freedesktop.Platform
sdk: org.freedesktop.Sdk
finish-args:

We need MIDI, Audio, USB, DRI, and realtime performances

  • –device=all

Needed to talk with X11, Wayland, pulseaudio and pipewire

  • –share=ipc
  • –filesystem=xdg-run/pipewire-0
  • –socket=pulseaudio
  • –socket=x11

Needed for updating the sound content, checking for online notifications and authentication

  • –share=network

For desktop notifications

  • –talk-name=org.freedesktop.Notifications

Give access to the host filesystem

Bitwig Studio is a media application, and many users have files

on removable media and various locations.

As of today it is too complicated to ask the user to run commands in

the terminal to grant more permissions to Bitwig Studio.

Once there is an easy and graphical way to tweak the sandbox permission

we may switch to the home only.

  • –filesystem=host

Java stuff

  • –persist=.java

  • –persist=.BitwigStudio

  • –persist=Bitwig Studio

  • –env=ALSA_CONFIG_PATH=

  • –env=VST_PATH=/app/extensions/Plugins/lxvst

  • –env=VST3_PATH=/app/extensions/Plugins/vst3

For 32 bits plugin host

  • –allow=multiarch

add-extensions:
org.freedesktop.LinuxAudio.Plugins:
directory: extensions/Plugins
version: ‘21.08’
add-ld-path: lib
merge-dirs: lxvst;vst3
subdirectories: true
no-autodownload: true

org.freedesktop.Platform.Compat.i386:
directory: /lib/i386-linux-gnu
version: ‘21.08’

org.freedesktop.Platform.GL32:
directory: /lib/i386-linux-gnu/GL
version: ‘1.4’
versions: 21.08;1.4
subdirectories: true
no-autodownload: true
autodelete: false
add-ld-path: lib
merge-dirs: vulkan/icd.d;glvnd/egl_vendor.d;OpenCL/vendors;lib/dri;lib/d3d;vulkan/explicit_layer.d;vulkan/implicit_layer.d
download-if: active-gl-driver
enable-if: active-gl-driver

modules:

  • name: “bitwig-studio”
    buildsystem: simple
    build-options:
    strip: false
    no-debuginfo: true
    build-commands:
    • unzip BitwigStudio.zip -d ${FLATPAK_DEST}
      post-install:
    • ln -sf …/bitwig-studio ${FLATPAK_DEST}/bin/
    • install -d /app/extensions/Plugins
      sources:
    • type: file
      path: /home/nick/dev/bitwig/nick-dev/float/installer/target/BitwigStudio.zip
      sha512: 1cf6a17168b70b45d33425b6a7a445055d8b9c680a3d29674a15c2ff29a7fa35b83f2b7c6f0d43db85692ef037e424513c9626ab89920ae5de343d3f30742794
      only-arches:
      • x86_64

vim: set expandtab tabstop=2 sw=2:

The manifest is basically the same when we build on flathub apart from how we obtain the source which we download from a server ranther than it being a local file.

I’m not sure how to debug this to find out where the problem lies. Any help greatly appreciated.

Kind regards,

Nicholas Allen

Ok maybe I found the problem. Seems I need to make sure the mount point exists in the /app folder where I’m trying to install these extensions.

I think the error message could have been much more obvious. It’s weird that the error happens when you try to run the app rather that at build or publish time. Maybe when specifying a directory to mount an extension at flatpak-builder should report an error if that’s not there or just automatically create that path so it can be mounted there?