7

For a class project I'm attempting to write a VST plugin backed by CUDA. My current CUDA workflow is on a Linux box, so I'd prefer to compile and link there.

According to Wikipedia, this should be possible (I couldn't find any Steinberg documentation relevant to Linux) but I can't find a Makefile or instructions on how to build if you aren't using Xcode or Visual Studio.

I'm fairly certain that the VST 3 SDK doesn't support Linux. When I try to compile a plugin under Linux, I get this error:

./base/source/fatomic.cpp:39:30: fatal error: libkern/OSAtomic.h: No such file or directory

This issue is caused by the following code in "VST3 SDK/base/source/fatomic.cpp"

#if MAC
    #include <libkern/OSAtomic.h>
    #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
        #define NATIVE_ATOMIC_TYPE  (volatile int32_t*)
    #else
        #define NATIVE_ATOMIC_TYPE  (int32_t*)
    #endif
#elif WINDOWS
    #include <windows.h>
#endif

But I hope compiling under Linux will work with VST SDK 2.4. Thanks for reading.

Robert Karl
  • 7,598
  • 6
  • 38
  • 61
  • Do you have MAC defined on your Linux box?? It may be something else, e.g. network card MAC macro or something CUDA. You should try and track down why it's getting defined, and maybe #undef it before you start including the VST headers. – Rup Jun 30 '11 at 23:22
  • 2
    @Rup The problem is that the VST SDK basically thinks that only 2 platforms exist, windows and mac. There are a ton of preprocessor directives which get "accidentally" processed on linux simply because that platform doesn't define `WINDOWS`. – Nik Reiman Oct 29 '12 at 10:34

1 Answers1

6

jVSTwrapper seems to run on linux, but they are only supporting the 2.4 SDK at the moment. Actually, that's a much safer bet, as not too many hosts have full VST3 support yet, and the 2.4 SDK is more or less universal. You will probably have more luck building with that SDK under linux, but it's still going to require some patching.

Anyways, here's a few forum links (1, 2) to get you started.

Edit: I also blogged about this some while back, perhaps this will be useful for any future visitors from google:

http://teragonaudio.com/article/Building-VST-plugins-on-Linux.html

Nik Reiman
  • 39,067
  • 29
  • 104
  • 160