pac-dev / protoplug

Create audio plugins on-the-fly with LuaJIT.
Other
282 stars 36 forks source link

Plugin compiled in 64 bit doesn't load on Mac OS #12

Closed JTriggerFish closed 6 years ago

JTriggerFish commented 9 years ago

I haven't had a chance to get to the bottom of why, but the VST and AU both fail to load when compiled in 64 bit or universal binaries. I've tried both in Studio One and Bitwig and on Mac OS 10.8 and 10.10, the result is the same. I will take a closer look when I have some time but thought I should ask in case you're aware of something.

pac-dev commented 9 years ago

The reason I didn't provide any OSX x64 binary is that LuaJIT has a glitch that requires the running program to be compiled with special hacky flags. More info here:

http://hacksoflife.blogspot.fr/2012/12/integrating-luajit-with-x-plane-64-bit.html

Obviously recompiling every host is not an option. A horribly ugly hack would be to run protoplug in its own process and make some sort of proxy plugin that communicates with that process. But the correct solution would be to delve into LuaJIT to fix the root problem. I don't know if the situation has changed since then, I'll do some research again when I have some time.

JTriggerFish commented 9 years ago

I see, thanks for the info, looks quite tricky indeed. I agree with you that running it in a separate process sounds a bit overkill ( and might as well let the host do that itself with a bit bridge ) and that the solution should be on the LuaJIT side.

JTriggerFish commented 9 years ago

For what it's worth, I had a good look around and unfortunately it doesn't seem like there's either an easy fix in LuaJIT no any commitment from the devs to fix it. There's some vague mention that it may be fixed in the new garbage collector in LuaJIT 3.0, but that doesn't seem to be developed very actively. That's quite annoying.

I will give jBridgeM a try to see if it manages to wrap the 32 bit plugin in 64 bit. Bitwig's own bridge loads protoplug 32 bit in 64 bit mode fine by the way, but Cubase's bridge doesn't seem to work.

EDIT: I tried jBridgeM on two different machines with mixed results, it worked fine on one and kept crashing or failing to load on the other.

christoph-hart commented 9 years ago

Could this be of any help:

https://github.com/istarkov/lua_osx_allocator

Its a patch for LuaJIT that changes the allocator on OSX.

pac-dev commented 8 years ago

Need to test with this version of LuaJIT as well: https://github.com/cloudflare/luajit-mm

When I have access to a Mac again...

Jurek-Raben commented 8 years ago

Ah, that kind of sucks tbh... I now switched completely to 64bit DAW (finally), and bridging always introduces instability and performance issues here.

Jurek-Raben commented 6 years ago

So is this still a problem? A real pity!

pac-dev commented 6 years ago

Closing as fixed, the new release has a working macOS 64-bit binary, thanks to the LuaJIT update.