Hi, I encountered the same error on Debian. The problem was that Audacity tried to compile against wxWidgets version 3.1, which wasn’t properly installed. I chose to compile against version 3.0, as it is packaged by Debian whereas version 3.1 isn’t (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919903).
I did several things, not sure which one solved the issue:
Made sure there was no partial installation of wxWidgets 3.1 in the way (specifically, I had attempted one in ~/local)
Passed “–with-wx-version=3.0” to “…/configure”
Important: removed the entire build directory and created it again
But in the end I managed to build it against wxWidgets version 3.0. I hope this helps!
The current Audacity code should build correctly with wx3.0 or wx3.1. Audacity recommends wx3.1 as it fixes a number of issues in 3.0, particularly some accessibility issues. I sometimes build with one and sometimes the other (on Xubuntu 18.04) to check that both work.
That’s why Audacity still supports building with 3.0. The Windows / Mac devs would much prefer that we support 3.1 only, but we know that there’s close to zero chance that the package maintainers at Debian / Ubuntu / Mint will build Audacity with 3.1 at this time. Personally I’m looking forward to wx3.2, especially as (wxTrac has been migrated to GitHub Issues - wxWidgets):
One of the big planned changes for this 3.2 is better support for high DPI displays