Failed attempt to build audacity 2.4.2 from source on Debian 12

Summary:
I’m trying to build audacity 2.4.2 from source but I keep running into errors.
the OS is up to date.
linux kernel version: 6.1.0-23-amd64
all the required dependencies are installed and up to date.
I have tried the source code from fosshub and the github audacity releases, both yield the same result.
I followed the guide written out by Steve:

I get as far as:

cmake -DCMAKE_BUILD_TYPE=Release -Daudacity_use_wxwidgets=local -Daudacity_use_ffmpeg=loaded ..
make

Then it makes it 70% percent through and then throws several errors. I will attach the actual errors as a .txt file.
I have carefully tried this multiple times but I can’t get past this point. the first error makes me think there’s something messed up in my dependencies but I don’t even know where to start.

/usr/local/share/audacity/audacity-Audacity-2.4.2/include/audacity/Types.h: In member function ‘size_t sampleCount::as_size_t() const’:
/usr/local/share/audacity/audacity-Audacity-2.4.2/include/audacity/Types.h:630:75: error: ‘numeric_limits’ is not a member of ‘std’

I was able to get several errors to go away by adding #include <limits> to the header file Types.h.
But then I still get errors about ffmpeg and wxWidgets. So I feel like there’s a bigger issue at play here. Where do I start? I would appreciate any help at all.
2.4.2_failed_from_source_errors.txt (10.9 KB)

I’ve succeeded building Audacity 2.4.2 on Ubuntu 22.04 LTS, but encountered a couple of problems:

  1. The option -Daudacity_use_wxwidgets=local no longer works. To work around this I had to build wxWidgets 3.1 from source.
  2. Exporting with FFmpeg does not work. This is most likely because my installed version of FFmpeg is too new. If you don’t use FFMpeg for exporting you can ignore this error.

I installed wxWidgets 3.1 to /opt/wx and configured Audacity using:

cmake -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=/opt/wx/bin/wx-config -Daudacity_use_ffmpeg=loaded .. 2>&1 | tee myconfig.log

If you prefer to disable FFmpeg in Audacity, use -Daudacity_use_ffmpeg=off.

The 2>&1 | tee myconfig.log at the end of the cmake line is to create a full log for the purpose of debugging build problems.

1 Like

I forgot to say. I updated the link on Building Audacity 2.4.2 on Ubuntu 20.04 for downloading the “Sliding Stretch” patch.

You should also be aware that Audacity 2.4.2 is considered obsolete, so there is no official support.

1 Like

Thank you for this reply, Steve.

I installed wxWidgets 3.1.0 from source and followed your advice from there. I still ran into the same error as last time, but I was able to get rid of it by adding #include <limits>. I made it through without any compile errors but when I tried to launch audacity I got ./audacity: error while loading shared libraries: libwx_baseu_xml-3.1.so.0: cannot open shared object file: No such file or directory
so I must have made a mistake with the wxWidgets install. I think I am going to give up on this since audacity 2.4.2 is considered obsolete, and there will likely be even more issues if I continue down that path.
I did learn a little along the way so I appreciate your willingness to point me in the right direction.
I’ve been using audacity since 2008 and it has become very special to me. Thank you to you and everyone else who has helped to make audacity what it is over the years. I don’t agree with all the changes that were made since 2.4.2 but I am still very grateful for the program that is available today.