Regression: Nyquist plugin support broken in Audacity compiled on Linux

In current git master (Audacity 3.0.4-alpha-20210816) as well as Audacity 3.0.3, Nyquist plugin support appears to be broken when compiled from source on Linux. When started with a fresh profile, no Nyquist plugins appear in the “Manage Plugins” window. If Nyquist plugins do appear on the list due to an existing profile, then they cannot be enabled. A git bisect reveals the following commit to have introduced this issue:

commit 6f58cb8294b1f52f960e0d7bde3d71a163193da4
Author: Paul Licameli <paul.licameli@audacityteam.org>
Date:   Fri Feb 12 14:42:37 2021 -0500

    Hoist the generation of the config header into top CMakeLists...
    
    ... Because it depends on having visited various lib-src directories, which I
    want to delay until visiting various of the modules, and I also want to visit
    src before the modules, because that's bottom-up dependency ordering.
    
    So the step should not be done in src.

 CMakeLists.txt     | 11 +++++++++++
 src/CMakeLists.txt | 11 -----------
 2 files changed, 11 insertions(+), 11 deletions(-)

Here is how I reproduce the bug:

  1. I am running KDE neon 5.22 User Edition, which is based on Ubuntu 20.04.
  2. I compile and install the software as follows, from within the “audacity” folder pulled down by github:
export DOCBOOK_TO_MAN="/usr/bin/docbook2x-man"
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded ..
make -j12
sudo make install

This installs everything with the default “/usr/local” prefix, including all the Nyquist plugins into “/usr/local/share/audacity/plug-ins/”
3. Delete “~/.audacity-data” to start with a clean profile.
4. Start Audacity.
5. Go to “Effect” → “Add / Remove Plug-ins…”

Result: None of the Nyquist plugins installed to “/usr/local/share/audacity/plug-ins” appear in the list. If the plugins do appear due to being referenced in an existing “~/.audacity-data” profile, they will all be disabled, and cannot be enabled.

Expected result: Nyquist plugins from “/usr/local/share/audacity/plug-ins” and “~/.audacity-data/Plug-Ins” should appear and be able to be enabled.

Have you tried building this way (without using “Advanced” options)? https://github.com/audacity/audacity/blob/master/BUILDING.md
(That works for me)

I did follow all of those instructions when initially building (getting Python and Conan set up, etc). I have to use the “-Daudacity_use_wxwidgets=local” due to incompatible system wxwidgets library, and the other flags are what is recommended in that very guide. Do you suggest I should remove them? What OS are you compiling on? Perhaps that makes a difference?

I was able to get Nyquist plugins working again by starting Audacity via the script “/usr/local/audacity”. This script contains the following:

#!/bin/sh

lib="${0%/*}/lib/audacity"
share="${0%/*}/share/audacity"

export LD_LIBRARY_PATH="${lib}:${LD_LIBRARY_PATH}"
export AUDACITY_MODULES_PATH="${AUDACITY_MODULES_PATH}:${lib}/modules"
export AUDACITY_PATH="${AUDACITY_PATH}:${share}"

exec "${0%/*}/bin/audacity" "$@"

This script sets the audacity modules path properly, which seems to not be happening when directly calling “/usr/local/bin/audacity”. I updated the “Audacity.desktop” file to point to “/usr/local/audacity” instead of “/usr/local/bin/audacity”, and now Nyquist plugins are working.

BTW, would it have been better for me to have posted this as an issue on GitHub? I know the website directs people to report bugs here, but GitHub seems a much more direct and obvious way to do it.

I think that the local wxwidgets library is used by default without specifying that cmake option.

I think the best person to ask about this is Dmitry on Discord: https://discord.gg/JFGBvysU

Thanks, Steve :slight_smile: