Build error on audio plugin host

For Linux specific issues

Re: Build error on audio plugin host

Postby jfitzpat » Thu Apr 12, 2012 11:41 pm

I should have been clearer, I was distracted the last couple of days helping dig out some crashing problems on someone's product. Now that earth shattering discoveries like "if you do not service the watch dog timer, your device will reset" are behind me, I'll give building this a shot tonight.

What I meant was 'is there an alternate working plug-in host?' It seems that folks are having trouble both building plug-ins and the host on linux. I was going to go one end to the other. Build a simple plug-in, test it with another host (container), then build the juce host (container). Anyway, I'll take a look tonight after work and see how far I get.
User avatar
jfitzpat
JUCE UberWeenie
 
Posts: 251
Joined: Tue Jan 10, 2012 6:29 am
Location: Glendale, California

Re: Build error on audio plugin host

Postby jfitzpat » Fri Apr 13, 2012 6:11 pm

I did a little tweaking to address a bunch of namespace collisions, but didn't get very far. I have to sheepishly admit that it took me forever to get the SDK downloaded from Steinberg last night. I had the same trouble navigating their site that I have trying to work "iDrive" in my wife's BMW. Apparently I just don't get how German's think... But I'll take another stab at it after work.
User avatar
jfitzpat
JUCE UberWeenie
 
Posts: 251
Joined: Tue Jan 10, 2012 6:29 am
Location: Glendale, California

Re: Build error on audio plugin host

Postby royce » Tue Apr 17, 2012 7:35 pm

Hello everyone... I recently got started with Juce for VST development, and I have run into the same issues when compiling the Juce (edit) audio plugin host. I have tried compilation with the VST SDK 3.0 and 2.4. Both result in the same errors as previously mentioned.

That said, while being very comfortable with Linux, my C++ is rustier than a garden shovel. The compiler output might look like something to someone, but it doesn't look like much to me at this point. Any guidance would be spectacular. I can post the compiler output if necessary.
royce
JUCE Weenie
 
Posts: 6
Joined: Tue Apr 17, 2012 7:23 pm

Re: Build error on audio plugin host

Postby Dri » Thu Apr 19, 2012 12:27 am

I managed to fix the compilation on juce tip (after fixing the prerequisite http://juce.com/viewtopic.php?f=5&t=9041 first).

I used the -D__cdecl= flag stated above, aside with the following changes:
Code: Select all
diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
index 16b6be0..9e529b5 100644
--- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -62,13 +62,6 @@
#endif

//==============================================================================
-#if JUCE_LINUX
- #define Font       juce::Font
- #define KeyPress   juce::KeyPress
- #define Drawable   juce::Drawable
- #define Time       juce::Time
-#endif
-
#include "juce_VSTMidiEventList.h"

#if ! JUCE_WINDOWS
@@ -335,6 +328,11 @@ namespace

#endif

+#if JUCE_LINUX
+ #undef KeyPress
+ #define KeyPress   juce::KeyPress
+#endif
+
//==============================================================================
class ModuleHandle    : public ReferenceCountedObject
{
diff --git a/modules/juce_audio_processors/juce_audio_processors.cpp b/modules/juce_audio_processors/juce_audio_processors.cpp
index fdf43b7..a6e9d72 100644
--- a/modules/juce_audio_processors/juce_audio_processors.cpp
+++ b/modules/juce_audio_processors/juce_audio_processors.cpp
@@ -54,6 +54,7 @@

#if JUCE_PLUGINHOST_VST && JUCE_LINUX
  #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
#endif

Still getting a warning though:
Code: Select all
../../../../modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp:2043:38: warning: multi-character character constant [-Wmultichar]

but it doesn't sound too violent.
Note that it compiles but I have no idea if it works yet :oops:
Hope this helps.
Cheers,
Adrien
User avatar
Dri
JUCE UberWeenie
 
Posts: 100
Joined: Wed Jul 14, 2010 1:51 pm

Re: Build error on audio plugin host

Postby jules » Thu Apr 19, 2012 9:51 am

Thanks! I'll certainly add the extra include, but am a little confused about why you removed that set of defines from higher up in the file?

Perhaps if they're not needed, all of those defines should be removed, and instead just change the one use of "KeyPress" to be fully qualified, at line 1204:

Code: Select all
    bool keyPressed (const juce::KeyPress&)


?
User avatar
jules
Fearless Leader
 
Posts: 17216
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Build error on audio plugin host

Postby Dri » Thu Apr 19, 2012 2:55 pm

jules wrote:Perhaps if they're not needed, all of those defines should be removed, and instead just change the one use of "KeyPress" to be fully qualified, at line 1204:
Code: Select all
    bool keyPressed (const juce::KeyPress&)

?

Yep. Makes complete sense. Late night debugging often prevents me from seeing the obvious... ;)
Cheers,
Adrien
User avatar
Dri
JUCE UberWeenie
 
Posts: 100
Joined: Wed Jul 14, 2010 1:51 pm

Re: Build error on audio plugin host

Postby royce » Wed Apr 25, 2012 4:31 pm

I wish I could develop in a *nix environment, but being able to test is sort of crucial. I put a Windows VM on my Linux machine and I'm building and testing in that. Everything builds the first time with no issues... so I'm finally working on the thing I actually wanted to work on, instead of fussing with all that malarkey. :wink:

Yep I feel like I cut some corners too. I'm not proud...
royce
JUCE Weenie
 
Posts: 6
Joined: Tue Apr 17, 2012 7:23 pm

Re: Build error on audio plugin host

Postby jfitzpat » Fri Apr 27, 2012 8:21 pm

Dri wrote:Yep. Makes complete sense. Late night debugging often prevents me from seeing the obvious... ;)


FWIW, that's how I resolved it. I have some lonely hotel time. Have you made further progress on this? I was pretty much at the same spot, built, but nothing to host.
User avatar
jfitzpat
JUCE UberWeenie
 
Posts: 251
Joined: Tue Jan 10, 2012 6:29 am
Location: Glendale, California

Re: Build error on audio plugin host

Postby falkTX » Sat Apr 28, 2012 5:41 am

I tried this myself, and found issues when building audio-processors with VST host option on.

Easy to fix though, here's a patch:
Code: Select all
diff --git a/libs/juce-2.0/source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/libs/juce-2.0/source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
index 56846d0..b963713 100644
--- a/libs/juce-2.0/source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
+++ b/libs/juce-2.0/source/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp
@@ -46,6 +46,8 @@
#if JUCE_MSVC
  #pragma warning (push)
  #pragma warning (disable: 4996)
+#else
+ #define __cdecl
#endif

/*  Obviously you're going to need the Steinberg vstsdk2.4 folder in
@@ -69,6 +71,10 @@
  static void _clearfp() {}
#endif

+#if JUCE_LINUX
+ #undef KeyPress
+#endif
+
//==============================================================================
const int fxbVersionNum = 1;



EDIT: I got it to compile, but the application hangs at:
Code: Select all
void PluginListComponent::scanFor (AudioPluginFormat* format)
{
...
if (aw.runModalLoop() == 0)


which in turns leads me into:
Code: Select all
int Component::runModalLoop()
{
...
return ModalComponentManager::getInstance()->runEventLoopForCurrentComponent();


(hangs at 'runEventLoopForCurrentComponent()')
Not sure why, but I'm investigating...
falkTX
JUCE UberWeenie
 
Posts: 117
Joined: Sat Jun 04, 2011 4:15 pm

Previous

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest