osxmidi / LinVst

Linux Windows vst wrapper/bridge
GNU General Public License v3.0
674 stars 41 forks source link

Is it possible that I can't use linvst and flatpak? #195

Closed photex closed 3 years ago

photex commented 3 years ago

Howdy!

I'm trying to load a vst in the Bitwig flatpak release. Things are all working fine in Reaper but Bitwig is unable to load the plugin for whatever reason. My current guess is the hardcoded '/usr/bin' for the server components. Does that sound like a reasonable possibility?

osxmidi commented 3 years ago

Howdy!

I'm trying to load a vst in the Bitwig flatpak release. Things are all working fine in Reaper but Bitwig is unable to load the plugin for whatever reason. My current guess is the hardcoded '/usr/bin' for the server components. Does that sound like a reasonable possibility?

Is that Bitwig 4 beta 6, because that's what I get when I install Bitwig via flatpack, which I can't use because I don't have a Bitwig license.

Usually I download the the Bitwig 3.x demo deb and if I'm on Manjaro I just extract the deb and run bitwig-studio.

If you have Wine-stable 6 then /usr/bin/wine should be there.

There was some trouble with Wine Staging, I think version 6.4, where /usr/bin/wine was not working as expected.

photex commented 3 years ago

Yep, I'm working with the beta at the moment. I'm a Fedora user so haven't downloaded the deb files since a flatpak option is available.

I've built drumgizmo using the flatpak sdk used to make the bitwig release and it gets loaded by bitwig from ~/.vst. Bitwig sees EZdrummer.so (linvst.so), but it reports an error about getting NULL from 'createAEffect' or something internal to it.

This looked suspiciously similar to the error I got in reaper before I realized the lin-vst-server* had to live specifically in /usr/bin instead of someplace in PATH.

Sidenote, if the path to these components is hardcoded, why put them in /usr/bin instead of ~/.linvst/bin or something?

I'm using Fedora 34, wine is installed to /usr/bin/wine and the version is reported as '6.11 (Staging)'. I didn't think Wine is the problem as everything is working perfectly in Reaper.

osxmidi commented 3 years ago

Yep, I'm working with the beta at the moment. I'm a Fedora user so haven't downloaded the deb files since a flatpak option is available.

I've built drumgizmo using the flatpak sdk used to make the bitwig release and it gets loaded by bitwig from ~/.vst. Bitwig sees EZdrummer.so (linvst.so), but it reports an error about getting NULL from 'createAEffect' or something internal to it.

This looked suspiciously similar to the error I got in reaper before I realized the lin-vst-server* had to live specifically in /usr/bin instead of someplace in PATH.

Sidenote, if the path to these components is hardcoded, why put them in /usr/bin instead of ~/.linvst/bin or something?

I'm using Fedora 34, wine is installed to /usr/bin/wine and the version is reported as '6.11 (Staging)'. I didn't think Wine is the problem as everything is working perfectly in Reaper.

The error is related to Bitwig timing out waiting for a plugin, I think.

I've updated LinVst recently to try to get around that error, I updated LinVst 4.5.2 and the code, so redownload LinVst 4.5.2 or rebuild from the code.

It's also a good idea to run plugins in a sandbox (individually).

The problem seems to be as far as I can make out, that Bitwig uses something that clashes with Wine and/or something in LinVst and it may be the Java that Bitwig uses but I don't know exactly.

Reaper uses gtk/gdk which has it's own set of incompatibilities but Wine seems to be ok.

photex commented 3 years ago

Ok! I can confirm that this is a Flatpak issue. I've unpacked the deb for the same version (4beta6) and it loads and runs my plugins just fine (EZdrummer, and Archetype Abasi).

When running a flatpak app, you will never have access to /usr, and if LinVst requires multiple things from /usr then I think it's clearly not going to work without some different approach.

I really don't like, unpacking deb files like this, and moving files to /usr/bin is a little problematic when it comes to keeping an orderly system together.

I'd like to play around and see if I can make an extension flatpak that brings together Wine and LinVst.

I wasn't able yet to build LinVst from source:

wineg++ -m32 -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DXECLOSE -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows -c lin-vst-server.cpp -o lin-vst-server.wine32.o
In file included from /usr/include/features.h:497,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from lin-vst-server.cpp:20:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
    7 | # include <gnu/stubs-32.h>
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
winegcc: /usr/bin/g++ failed
make: *** [Makefile:75: lin-vst-server.wine32.o] Error 2

But I think the binaries you've released are working otherwise, so I imagine it's possible to have this Flatpak extension pull official releases from this repo.

osxmidi commented 3 years ago

Ok! I can confirm that this is a Flatpak issue. I've unpacked the deb for the same version (4beta6) and it loads and runs my plugins just fine (EZdrummer, and Archetype Abasi).

When running a flatpak app, you will never have access to /usr, and if LinVst requires multiple things from /usr then I think it's clearly not going to work without some different approach.

I really don't like, unpacking deb files like this, and moving files to /usr/bin is a little problematic when it comes to keeping an orderly system together.

I'd like to play around and see if I can make an extension flatpak that brings together Wine and LinVst.

I wasn't able yet to build LinVst from source:

wineg++ -m32 -O2 -DVST6432 -DEMBED -DEMBEDDRAG -DWAVES -DTRACKTIONWM -DVESTIGE -DWCLASS -DNEWTIME -DINOUTMEM -DCHUNKBUF -DEMBEDRESIZE -DPCACHE -DXECLOSE -I/usr/include/wine-development/windows -I/usr/include/wine-development/wine/windows -I/usr/include/wine/wine/windows -c lin-vst-server.cpp -o lin-vst-server.wine32.o
In file included from /usr/include/features.h:497,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from lin-vst-server.cpp:20:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
    7 | # include <gnu/stubs-32.h>
      |           ^~~~~~~~~~~~~~~~
compilation terminated.
winegcc: /usr/bin/g++ failed
make: *** [Makefile:75: lin-vst-server.wine32.o] Error 2

But I think the binaries you've released are working otherwise, so I imagine it's possible to have this Flatpak extension pull official releases from this repo.

I don't know much about flatpak.

Would it be possible to use symbolic links that point to /usr/bin or /usr/bin/wine

What I do on Manjaro is to extract the deb and then unarchive the data.tar.xz file and then change into data/opt/bitwig-studio and run bitwig-studio from there