Skip to content

VST3 fails to load in Flatpak hosts: libonnxruntime.so.1: cannot open shared object file #41

Backlog

Description

@arthurpizza

Environment

  • OS: Debian 13
  • Host: Ardour (Flatpak, org.ardour.Ardour)
  • PitchNet version: 1.0.2 (VST3 build)
  • Plugin path: /home/art/.vst3/PitchNet.vst3/Contents/x86_64-linux/PitchNet.so

Summary

The PitchNet VST3 fails to load in a Flatpak-sandboxed Ardour with:

[ERROR]: Could not load VST3 plugin '/home/art/.vst3/PitchNet.vst3/Contents/x86_64-linux/PitchNet.so':
libonnxruntime.so.1: cannot open shared object file: No such file or directory

The bundled libonnxruntime.so is present inside the plugin bundle, but the dynamic linker never looks there:

/home/art/.vst3/PitchNet.vst3/Contents/x86_64-linux/lib/libonnxruntime.so
/home/art/.vst3/PitchNet.vst3/Contents/x86_64-linux/lib/libonnxruntime.so.1
/home/art/.vst3/PitchNet.vst3/Contents/x86_64-linux/lib/libonnxruntime.so.1.19.2

Root cause (as I understand it)

PitchNet.so has an NEEDED entry for libonnxruntime.so.1, but no RPATH/RUNPATH pointing at the bundle's lib/ directory. On a normal (non-sandboxed) system, this is worked around by copying the library into /usr/local/lib and running ldconfig — a workaround mentioned in community threads. That workaround does not work inside a Flatpak sandbox, because:

  • The sandbox's /usr is the runtime's /usr, not the host's.
  • Flatpak strips LD_LIBRARY_PATH by default.
  • Granting --filesystem=/usr/local/lib:ro exposes the host directory inside the sandbox but does not add it to the linker's search path.

So there is currently no supported way to load the PitchNet VST3 in a Flatpak host, even with the library sitting right next to the plugin.

Steps to reproduce

  1. Install Ardour as a Flatpak on Debian 13.
  2. Install PitchNet VST3 to ~/.vst3/.
  3. Rescan VST3 plugins in Ardour.
  4. Observe the load failure above.
  5. Confirm libonnxruntime.so.1 exists in ~/.vst3/PitchNet.vst3/Contents/x86_64-linux/lib/.
  6. Attempt workarounds: copy to /usr/local/lib + ldconfig; flatpak override --filesystem=/usr/local/lib:ro; flatpak run --env=LD_LIBRARY_PATH=/var/run/host/usr/local/lib …. All still fail.

Expected behavior

PitchNet VST3 loads in a Flatpak host out of the box, because the ONNX Runtime it needs is shipped inside the plugin bundle.

Workaround attempted (fails)

  • Copying libonnxruntime.so.1.19.2 to /usr/local/lib + sudo ldconfig → still fails inside Flatpak.
  • flatpak override --filesystem=/usr/local/lib:ro org.ardour.Ardour → still fails.
  • flatpak run --env=LD_LIBRARY_PATH=/var/run/host/usr/local/lib org.ardour.Ardour → still fails.
  • Adding the bundle's lib/ to /etc/ld.so.conf.d/ → still fails inside the sandbox.

Additional context

  • Flatpak strips LD_LIBRARY_PATH by default, so an env-var-based workaround is not viable for end users.
  • The only current workaround is to abandon Flatpak and use the ardour.org installer, which is why I'm filing this — I'd like to stay on Flatpak.
  • If maintainers prefer not to add an RPATH, an alternative would be to statically link ONNX Runtime, but that likely has licensing/size implications and is probably not desirable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions