Trying to fix com.obsproject.Studio.NDI

I’m trying to install plugin com.obsproject.Studio.NDI, but trying to install it ended in error:

error: Failed to install com.obsproject.Studio.Plugin.NDI: Wrong size for extra data https://downloads.ndi.tv/SDK/NDI_SDK_Linux/Install_NDI_SDK_v5_Linux.tar.gz

So I’ve tried to get the package and build it, but I was unable to:

$ flatpak-builder --user --install --force-clean build com.obsproject.Studio.NDI.json
(...)
make[1]: Entering directory '/run/build/avahi/avahi-common'
 /usr/bin/mkdir -p '/app/lib/ndi'
/usr/bin/mkdir: cannot create directory ‘/app/lib/ndi’: Read-only file system
make[1]: *** [Makefile:708: install-libLTLIBRARIES] Error 1
make[1]: Leaving directory '/run/build/avahi/avahi-common'
make: *** [Makefile:1432: install-am] Error 2
make: Leaving directory '/run/build/avahi/avahi-common'
Error: module avahi: Child process exited with code 2

I’ve tried to add this:

"ensure-writable" : [
        "/lib/ndi"
      ],

But it did not work. I have no idea what I’m doing wrong. Please help.

Wouldn’t you need to make /lib writable instead of /lib/ndi? You are trying to mkdir ndi inside the /lib directory. The next question is whether flathub will publish a flatpak that modifies /app/lib because there are some directories with shared runtimes that are not allowed to be modified. I forgot which ones, but I suspect /app/lib is one.

"ensure-writable" : [
        "/app/lib",
        "/lib",
        "/lib/ndi"
      ],

Did not worked.

So maybe I’m trying to do workaround for something that needs to be fixed in another way? This is my first flatpack package, so I walking blind here.

make -C avahi-common install

This command is making changes in the /app/lib.

make[1]: Entering directory '/run/build/avahi/avahi-common'
 /usr/bin/mkdir -p '/app/lib/ndi'
/usr/bin/mkdir: cannot create directory ‘/app/lib/ndi’: Read-only file system

It looks like you are using the “simple” buildsystem instead of “autotools”. Posting or linking to your manifest would make it easier for others to help you. I usually use “simple” for python commands and “autotools” or “cmake-ninja” for cmake commands. When cmake requires extra options like for environment, I add config-opts and such. Even though below is yml form, you can see an example of what I am saying at this link below. Check lines 41-47 for autotools with config-opts and make-install-args (I doubt you need the gi commands because they are for a python app, but the “–prefix=/app” command might or might not be helpful for you), and lines 82-87 for a “cmake-ninja” example with config-opts.

But I see that the author use “post-install” instead of “build system”.

That’s an archived repo; OBS is no longer built on flathub infrastructure. I think you’re looking for GitHub - flathub/com.obsproject.Studio.Plugin.NDI, and in particular:

I thought that the the repo I choosed was the newest and I need to fix it.
After using the one you gave me @chrisawi, everything works.
Thanks a lot.