https://github.com/audacity/audacity/issues/4489
https://github.com/audacity/audacity/commit/a49d145ef5e3046273c879be0a21d48ecd4dcab7
https://bugs.gentoo.org/899764

--- a/lib-src/libnyquist/nyquist/nyqstk/include/Stk.h
+++ b/lib-src/libnyquist/nyquist/nyqstk/include/Stk.h
@@ -46,7 +46,8 @@ typedef uint64_t uintmax_t;
 */
 #endif
 
-#include <stddef.h>
+#include <cstddef>
+#include <cstdint>
 #include <string>
 #include <iostream>
 #include <sstream>
@@ -355,10 +356,6 @@
 typedef signed int SINT32;
 typedef float FLOAT32;
 typedef double FLOAT64;
-// added by RBD
-#ifdef __linux__
-#define intptr_t long
-#endif
 
 // The default sampling rate.
 const StkFloat SRATE = 44100.0;
--- a/src/effects/LoadEffects.cpp
+++ b/src/effects/LoadEffects.cpp
@@ -154,9 +154,9 @@ void BuiltinEffectsModule::AutoRegisterPlugins(PluginManagerInterface & pm)
       if (rediscoverAll ||
          !pm.IsPluginRegistered(path, &pair.second->name.Msgid())
       ){
-         DiscoverPluginsAtPath(path, ignoredErrMsg, [&](PluginProvider *provider, ComponentInterface *ident)
+         DiscoverPluginsAtPath(path, ignoredErrMsg, [&](PluginProvider *provider, ComponentInterface *ident) -> const PluginID&
          {
-            const auto pluginId = PluginManagerInterface::DefaultRegistrationCallback(provider, ident);
+            const auto& pluginId = PluginManagerInterface::DefaultRegistrationCallback(provider, ident);
             if(pair.second->excluded)
                PluginManager::Get().EnablePlugin(pluginId, false);
             return pluginId;
--- a/libraries/lib-module-manager/PluginHost.cpp
+++ b/libraries/lib-module-manager/PluginHost.cpp
@@ -37,11 +37,11 @@ namespace
             TranslatableString errorMessage{};
             auto validator = provider->MakeValidator();
             auto numPlugins = provider->DiscoverPluginsAtPath(
-               pluginPath, errorMessage, [&](PluginProvider *provider, ComponentInterface *ident)
+               pluginPath, errorMessage, [&](PluginProvider *provider, ComponentInterface *ident) -> const PluginID&
             {
                //Workaround: use DefaultRegistrationCallback to create all descriptors for us
                //and then put a copy into result
-               auto id = PluginManager::DefaultRegistrationCallback(provider, ident);
+               auto& id = PluginManager::DefaultRegistrationCallback(provider, ident);
                if(const auto ptr = PluginManager::Get().GetPlugin(id))
                {
                   auto desc = *ptr;
