# Failed attempt to build audacity 2.4.2 from source on Debian 12

**URL:** <https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817>\
**Category:** Compiling Audacity\
**Created:** [August 25, 2024, 4:57am UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817 "2024-08-25T04:57:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![raccooneatingcacti](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@raccooneatingcacti](https://forum.audacityteam.org/u/raccooneatingcacti)\
**Post date:** [August 25, 2024, 4:57am UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817/1 "2024-08-25T04:57:28Z")

</div>

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:

> [@Building Audacity 2.4.2 on Ubuntu 20.04](https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719):
>
> These steps are specifically for building a release version of Audacity 2.4.2 ([available now](https://forum.audacityteam.org/viewtopic.php?p=398767#p398767)) on Ubuntu 20.04. For simplicity, the steps are deliberately kept to a minimum without any additional options. Prerequisites: Repository sources (sources.list) must include source code sources. For MP3 / FFmpeg support, “non-free” repositories may need to be enabled. Root access is required for installation (usually via “sudo”). Cmake version 3.15 or later. An Internet connection. Required d…

I get as far as:

```auto
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.

```auto
/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](https://forum.audacityteam.org/uploads/short-url/yzFUM2a62MN2xg08uI52tLMHrdW.txt) (10.9 KB)

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [August 25, 2024, 12:39pm UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817/2 "2024-08-25T12:39:08Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![steve](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@steve](https://forum.audacityteam.org/u/steve)\
**Post date:** [August 25, 2024, 12:45pm UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817/3 "2024-08-25T12:45:43Z")

</div>

I forgot to say. I updated the link on [Building Audacity 2.4.2 on Ubuntu 20.04](https://forum.audacityteam.org/t/building-audacity-2-4-2-on-ubuntu-20-04/57719) 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.

---

<div class="post-metadata">

**Author:** ![raccooneatingcacti](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/r/73ab20/32.png) [@raccooneatingcacti](https://forum.audacityteam.org/u/raccooneatingcacti)\
**Post date:** [August 25, 2024, 10:29pm UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817/4 "2024-08-25T22:29:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![audacity-2.4.2](https://forum.audacityteam.org/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@audacity-2.4.2](https://forum.audacityteam.org/u/audacity-2.4.2)\
**Post date:** [November 19, 2024, 1:15am UTC](https://forum.audacityteam.org/t/failed-attempt-to-build-audacity-2-4-2-from-source-on-debian-12/115817/5 "2024-11-19T01:15:35Z")

</div>

Hi, @raccooneatingcacti! I realize I got to this thread a little late, but I wondered if you were able to get Audacity 2.4.2 installed on Debian 12. I, too, was unable to get it built (intended to create an AppImage), but I’ve found a couple of techniques to get this version installed. On Debian-bookworm versions, I simply change _bookworm_ to _bullseye_ in the sources file, then run _`sudo apt update`_ (you may see errors, but they aren’t deal-breakers). Once _`apt search audacity`_ shows 2.4.2, I can then install it (_`sudo apt install audacity/oldstable`_). After that, I just lock it down with _`sudo apt-mark hold audacity audacity-data`_, and verify that with _`sudo dpkg --get-selections | grep hold`_. All that’s left is to edit the sources file again, and revert the changes back to _bookworm_.
