Rack built from source fails to load plugins

As I mentioned here recently, I experience audio glitching (clicks and pops) using all Rack versions 2.1.0+ on my Linux system with PulseAudio. I was able to track down and fix the issue in VCV Rack’s fork of RtAudio to make audio work correctly on my system.

I sent an email to support on November 27 explaining the issue and my fix, but I have not heard back yet. In the meantime, I’d just like to use Rack on my computer without it clicking and popping every few seconds.

I can build Rack 2.2.1 from source, and I do a make dist to make the install zip. I unzip that into another directory and run Rack from it. Rack runs, but it cannot find most of my plugins. It offers to download and install them, but no matter how many times I do that and restart the program, it acts like it has forgotten everything and starts over.

I even tried unzipping the official 2.2.1 install zip and confirming it finds all my plugins… no problem, everything’s great. Then I replace just the two files Rack and libRack.so with the ones I built myself. The problem comes back!

So I’m left with the choice of glitching audio with all my plugins, or crystal clear audio with no plugins. Bummer.

There must be some special sauce in the official distributions that is missing from my build process.

Does anyone else on Linux run Rack built from source? How do you get it to download and remember all your plugins from the VCV Rack library?


OK, I found a clue. It’s not all added plugins that are missing, just most of them. For example, when I right-click, I still see Instruo, but not MindMeld. Then I look in my log.txt and I see lines like these for the missing plugins:

[0.018 warn src/plugin.cpp:194 loadPlugin] Could not load plugin /home/don/.Rack2/plugins/MindMeldModular: Failed to load library /home/don/.Rack2/plugins/MindMeldModular/plugin.so: /home/don/.Rack2/plugins/MindMeldModular/plugin.so: undefined symbol: _ZSt28__throw_bad_array_new_lengthv

So it looks like there is some incompatibility of the C++ runtime library or something like that. Does anyone recognize this and know what to do?

OK, I think this is the answer. I didn’t compile VCV Rack with the same C++ compiler that the plugins use. I’m running g++ 10.2.1-6, but apparently I need to use g++ 11.2 or higher? Is that still the official version?

The official version is defined in the Rack Plugin Toolchain. For GNU/Linux it is gcc 12.2.0 (installed with the crosstool-ng toolchain builder).

Thank you! That helps a lot. Looks like the easiest way for me to solve this is to upgrade to Debian Bookworm (testing). What Linux distro do you use for Rack development?

Ubuntu 22.04, but I compile plugins with the Rack Plugin Toolchain Docker image, so my host system compiler is irrelevant.

So the toolchain documentation for building Rack and plugins correctly is “dig inside our toolchain scripts and work it out”? It seems… underdocumented to put it politely. Why not document all the tool and library versions in the relevant manual section where it ostensibly should be?

Is that how you compile Rack itself also? If I could build Rack correctly without upgrading Linux, that would be helpful.

I got it working! I ended up building gcc 12.2.0 from source code, then using that to build Rack with my patches to fix audio problems in PulseAudio. Here is a brief outline:

First, read the official GCC documentation carefully. Don’t skim it because you’ll end up wasting your time with something that doesn’t work. I also found this wiki page very helpful for clarifying some things.

Here is what I did on my Debian Bullseye system. I already had lots of prerequisites installed, but I had to add a few things that were missing:

sudo apt-get install gperf dejagnu autogen guile-3.0 \
    texlive sphinx libgmp-dev libgmp-dev libmpfr-dev libmpc-dev

Then I cloned the gcc git repo (download took about 4 minutes):

git clone git://gcc.gnu.org/git/gcc.git
cd gcc
git checkout releases/gcc-12.2.0

Here is a really important part: you have to create a build directory completely outside of the git repo. Use it to configure the build. I chose to use $HOME/gcc12 as my install target, so I didn’t risk messing up my system running any commands as root.

cd ..
mkdir buildgcc
cd buildgcc
../gcc/configure \
    --prefix=$HOME/gcc12 \
    --disable-multilib \
make -j 2     # took 82 minutes
make install

Now to temporarily replace gcc/g++ version 10 with version 12.2 on my system, I changed my path to find it first, and told bash to forget where it last saw them.

hash -r
export PATH=$HOME/gcc12/bin:$PATH

Then I built Rack with my PulseAudio patch applied, using my glitchfix.sh and glitchinst.sh scripts.

The result: I now have a working version of VCV Rack 2.2.1 that no longer clicks and pops the audio every few seconds!


Sorry, I read your post wrong. I compiled gcc 12.2.0 from source on my Ubuntu 22.04 system to build Rack.

1 Like

All plugins link to a version of this. If changed the dynamic link loading may fail.

You are mistaken. There is no compiler version requirement to build Rack or plugins, as long as it supports C++11. All required libstdc++ symbols are statically compiled in Rack and each Rack plugin, so if your compiler builds a plugin that doesn’t load in Rack because of a missing libstdc++ symbol, that is a bug with Rack’s build system and should be reported to VCV - Support.

@cschol was telling @cosinekitty what GCC version we use, not necessarily what everyone needs to use. In general it’s a good idea to use the latest stable version of your compiler.

1 Like

That’s good to know @Vortico because the answers in this topic and others, and in particular the below seemed to suggest otherwise.

It would still be very helpful to have the glibc version required documented in the build manual, as that is still biting people.