robbert-vdh / yabridge

A modern and transparent way to use Windows VST2, VST3 and CLAP plugins on Linux
GNU General Public License v3.0
2.49k stars 65 forks source link

Setting up yabridge x64 + wine x64 + box64 on aarch64 #229

Open michele-perrone opened 1 year ago

michele-perrone commented 1 year ago

Thanks for giving yabridge a shot!

Problem description

On a Raspberry Pi 4B with Manjaro ARM, I am able to launch the standalone version of a Windows x64 plugin that I own (AudioModeling SWAM Clarinets). I do this by simply using together wine64 and box64:

With the standalone version, both the GUI and audio work.

I tried setting up the VST3 version of the plugin with yabridgectl. This is the output of yabridgectl status:

Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Cores:4
Box64 with Dynarec v0.2.0  built on Nov 17 2022 14:11:31
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 36 Env var
Looking for /home/michele/yabridge-5.0.3-x86_64/yabridgectl
argv[1]="status"
Rename process to "yabridgectl"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libm.so.6
Error: Global Symbol posix_spawnattr_setpgroup not found, cannot apply R_X86_64_GLOB_DAT @0xffffa2e1eef0 ((nil)) in /home/michele/yabridge-5.0.3-x86_64/yabridgectl
Warning, call to __cxa_thread_atexit_impl(0xffffa2b6a3a0, 0xa41dd218, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2b6a3a0, 0xffff9c010de8, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2ae9c80, 0xffff9c010e40, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2b6a3a0, 0xffff94010de8, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2ae9c80, 0xffff94010e40, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2b6a3a0, 0xffff8c010de8, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2ae9c80, 0xffff8c010e40, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2b6a3a0, 0xffff98010de8, 0xffffa2e1f040) ignored
Warning, call to __cxa_thread_atexit_impl(0xffffa2ae9c80, 0xffff98010e40, 0xffffa2e1f040) ignored
yabridge path: '/home/michele/yabridge-5.0.3-x86_64/usr/lib'
VST2 location: '/home/michele/.vst/yabridge'
VST3 location: '/home/michele/.vst3/yabridge'
CLAP location: '/home/michele/.clap/yabridge'

libyabridge-chainloader-vst2.so: '/home/michele/yabridge-5.0.3-x86_64/usr/lib/libyabridge-chainloader-vst2.so' (64-bit)
libyabridge-chainloader-vst3.so: '/home/michele/yabridge-5.0.3-x86_64/usr/lib/libyabridge-chainloader-vst3.so' (64-bit)
libyabridge-chainloader-clap.so: <not found>

yabridge-host.exe: '/home/michele/yabridge-5.0.3-x86_64/yabridge-host.exe'
yabridge-host-32.exe: '/home/michele/yabridge-5.0.3-x86_64/yabridge-host-32.exe'

/home/michele/.wine/drive_c/Program Files/Common Files/VST3/
  SWAM/Clarinets/SWAM Bass Clarinet 3.vst3 :: VST3, legacy, 64-bit, synced
  SWAM/Clarinets/SWAM Clarinet 3.vst3 :: VST3, legacy, 64-bit, synced

/home/michele/.wine/drive_c/Program Files/Steinberg/VstPlugins/

Carla or Ardour are not able to use the plugin. This is the error given by Ardour when scanning the plugin:

VST3 module-path '/home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/x86_64-win/SWAM Bass Clarinet 3.vst3'
[Info]: Scanning: /home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/x86_64-win/SWAM Bass Clarinet 3.vst3
[ERROR]: Could not load VST3 plugin '/home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/x86_64-win/SWAM Bass Clarinet 3.vst3': /home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/x86_64-win/SWAM Bass Clarinet 3.vst3: invalid ELF header
Cannot load VST3 module: '/home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/x86_64-win/SWAM Bass Clarinet 3.vst3'
Scan Failed.

And this is the relevant of the output when running ardour7 on the console:

VST3 not a valid bundle: '/home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Clarinet 3.vst3/Contents/aarch64-linux/SWAM Clarinet 3.so'
VST3 not a valid bundle: '/home/michele/.vst3/yabridge/SWAM/Clarinets/SWAM Bass Clarinet 3.vst3/Contents/aarch64-linux/SWAM Bass Clarinet 3.so'

This last output shows that Ardour is trying to load the aarch64-linux/SWAM Bass Clarinet 3.so object, which obviously is not there.

Is there some way to get this working?

Operating system

Manjaro ARM

How did you install yabridge?

Arch Linux x64 repositories

yabridge version

5.0.3

yabridgectl version

5.0.3

Wine version

Wine Stating 7.22

Plugin

AudioModeling SWAM Clarinets

Plugin type

VST3

Plugin architecture

64-bit

Host

Carla 2.5.2-2 aarch64, Ardour 7.2-1 aarch64

Desktop environment or WM

No response

GPU model

No response

GPU drivers and kernel

No response

Debug log

No response

Anything else?

No response

robbert-vdh commented 1 year ago

I can't provide any support with box64, but it sounds like you're using AArch64 Ardour, right? You can't load AMD64 .so files in an AArch64 program. So if there's any chance for this to work you'll also need to run AMD64 Ardour under box64. It's not possible to mix architectures.

michele-perrone commented 1 year ago

Hi Robbert, thanks for your reply.

Yes, what you say makes perfect sense. I tried running a number of x64 plugin hosts through box64 (carla, Ardour, Qtractor, Element). Unfortunately, none of the are able to launch. I am currently trying to make carla-single work, but there are problems.

However, even if I'm able to make carla-single work, one would have to install both x64 and ARM64 versions of the same plugin host(s), which is potentially very messy if you also think of all the dependencies.

Since plugin hosts are quite big pieces of software and box64 isn't that mature yet, I was thinking if it wouldn't be possible to write an ARM64 wrapper around the x64 shared objects created by yabridge. That way, one could use the native ARM64 plugin host, which loads the wrapped x64 plugin directly. Library wrapping is actually one of the things that makes box64 itself so fast and efficient.

I'm not very familiar with all the intricacies that make yabridge work, but this sound doable to me.

What do you think?

robbert-vdh commented 1 year ago

That's technically possible, but setting it all up doesn't sound like an easy feat.

antisaint81 commented 1 year ago

So FWIW with apologies if this isn't exactly the place to post, but since all my searches have inevitably ended up crawling this page I figured I'd mention since I'd imagine I can't possibly the only one trying to do this -- I'm running a Radxa Rock 5B with Joshua Rieck's Ubuntu 22.04 for ARM. I was able to get yabridge working with Reaper for several plugins within FEX-Emu along with the x86_64 version of reaper. I had to chroot into the default RootFS to install the pulseaudio recommendations on the FEX github as well as jack (jackd and qjackctl) for realtime action. The RootFS as well as the ubuntu image are running the wine 6.0.3 from the ubuntu repository. None of the yabridge .exe files would run for me in Box86/64 on ARM, and neither would x86_64 reaper, but FEX-Emu has done the trick, it seems.