Building SWH Plugins on OSX

Building and customizing Audacity from the source code.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Building SWH Plugins on OSX

Post by tresf » Sat May 03, 2014 2:57 pm

Edit:

THIS ISSUE IS CLOSED.
THESE HAVE BEEN SUCCESSFULLY BUILT WITH A FEW MINOR CHANGES.
PLEASE FIND THE CHANGES UPSTREAM HERE:
Hi!

This question is a reach-out to the Audacity community for some building advice... :)

I see Audacity supports the SWH plugins on OSX, which the LMMS project is trying to support as well.

First question: Do you use a custom build of the SWH plugins that fixes the compiler strictness on OS X?

Second question: Even after building them for LMMS, I'm having a hard time getting them to load. Any platform specific code to get them to load properly?

I'll cross-link our bug report:
https://github.com/LMMS/lmms/issues/663

Thanks for reading and I hope this message is well received!

-Tres
Last edited by tresf on Fri May 16, 2014 8:07 pm, edited 1 time in total.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Building SWH Plugins on OSX

Post by Gale Andrews » Sun May 04, 2014 4:13 pm

Unfortunately we can't really help you.

We never built the swh plug-ins for OS X, rather we use Ardour's build of them.

Ardour stopped distributing the swh plug-ins for OS X because they found them unstable in their application. They told me:

many of swh's plugins are unsafe for use on OS X and have been for many years. swh did not use __attribute__((destructor|constructor)) and instead used the much older unix convention of declaring "init" and "fini" methods. These are not executed on OS X, and so various global variables are not initialized (and many not even be valid for use)."
However after extensive testing we found the plug-ins stable in Audacity so continue to distribute them.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Re: Building SWH Plugins on OSX

Post by tresf » Tue May 06, 2014 2:04 am

Gale Andrews wrote:Unfortunately we can't really help you.

We never built the swh plug-ins for OS X, rather we use Ardour's build of them.

Ardour stopped distributing the swh plug-ins for OS X because they found them unstable in their application. They told me:

many of swh's plugins are unsafe for use on OS X and have been for many years. swh did not use __attribute__((destructor|constructor)) and instead used the much older unix convention of declaring "init" and "fini" methods. These are not executed on OS X, and so various global variables are not initialized (and many not even be valid for use)."
However after extensive testing we found the plug-ins stable in Audacity so continue to distribute them.


Gale
Gale,

Thank you for the valuable information. We just ran into something like this with Calf plugins here (looks identical really... could it be that simple?): (LMMS Issue #668)

I've spent the last week using trial and error to patch the SWH code to *at least compile* with Clang (just small syntax fixes to get Clang to proceed). It is quite ironic that these SWH plugins work so well for the Audacity application but not Ardour. I tried the ones from the downloads section and they did not work when dropping them into LMMSs LADSPA directory. This did (and still does) leave me a bit hopeful as to getting them to "plug-in" to our software.

I contacted Steve Harris (the author of SWH) and he has created a GitHub repo for them and says he will accept upstream fixes if anyone offers them but has no plans to continue maintaining them.

So... Since Ardour, Audacity and LMMS could benefit from keeping them around, I'd like to make this happen. :) Wishful thinking...

Well, I'll run with the information you've so generously provided and post back if I get any progress. I invite the Audacity OSX build maintainer to use our fork (mine until merged into stable) https://github.com/tresf/lmms/tree/stab ... Effect/swh

-Tres

tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Re: Building SWH Plugins on OSX

Post by tresf » Tue May 06, 2014 3:07 am

Confirmed, this seems to do it.

https://github.com/LMMS/lmms/issues/663 ... t-42263961

Who is your contact at Ardour? Can you link them this thread?

tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Re: Building SWH Plugins on OSX

Post by tresf » Tue May 06, 2014 12:57 pm


Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Building SWH Plugins on OSX

Post by Gale Andrews » Tue May 06, 2014 8:05 pm

tresf wrote:I invite the Audacity OSX build maintainer to use our fork (mine until merged into stable) https://github.com/tresf/lmms/tree/stab ... Effect/swh
Hi Tres,

Thanks.

I let Paul Davis at Ardour know and gave him this topic URL.

So presumably you still have to commit the necessary changes to all the plug-in c files in your fork before we could try building them?


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Re: Building SWH Plugins on OSX

Post by tresf » Wed May 14, 2014 8:20 pm

Gale Andrews wrote:
tresf wrote:Presumably you still have to commit the necessary changes to all the plug-in c files in your fork before we could try building them?
Here you are: :)

https://github.com/tresf/ladspa/compare ... r...master

I've been in regular contact with Steve Harris (aka "swh") so these changes aren't unexpected.

Editing the original source code was much easier as it uses a "makestub.pl" script to generate the C source code from XML files, however I had to first issue "autoreconf -i" to get it to properly generate "./configure" script.

I've updated the README to illustrate this, assuming its accepted. :)

-Tres

tresf
Posts: 18
Joined: Sat May 03, 2014 2:53 pm
Operating System: Please select

Re: Building SWH Plugins on OSX

Post by tresf » Thu May 15, 2014 4:18 pm

FYI, these have been accepted upstream.

https://github.com/swh/ladspa/pull/4

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Building SWH Plugins on OSX

Post by steve » Thu May 15, 2014 5:14 pm

tresf wrote:FYI, these have been accepted upstream.
Excellent :D
Congratulations on your success.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Building SWH Plugins on OSX

Post by Gale Andrews » Thu May 15, 2014 8:10 pm

tresf wrote:FYI, these have been accepted upstream.

https://github.com/swh/ladspa/pull/4
Thanks, Tres.

It would be good though if you could encourage Steve Harris to update http://plugin.org.uk/ with that information.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply