Compile from source – Audacity

Tutorial to learn how to compile from source. For this purpose I will make a little change in a C++ file, then compile the project.

I would be able to see the modification in my Audacity programme on my own system.

Tested with Ubuntu 20

Allow download of the source -> source code repositories ON

sudo apt update

get the source from Audacity, ca 39.1 MB

sudo apt source audacity

to avoid this message:

Error Message: W: Download is performed unsandboxed as root, as file ‘audacity_2.3.3-1build1.dsc’ couldn’t be accessed by user ‘_apt’. – pkgAcquire::Run (13: Permission denied)

give the permissions:

sudo chown -Rv _apt:root /var/cache/apt/archives/partial/

sudo chmod -Rv 700 /var/cache/apt/archives/partial/

in home directory is now: audacity_2.3.3.orig.tar.xz

unpack: tar -xf audacity_2.3.3.orig.tar.xz

Read the build.txt file, path:  audacity-minsrc-2.3.3/linux/build.txt

from build.txt: Audacity requires gcc 4.9 or later to build.

check own version: gcc – -version

result: gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

sudo apt-get install build-essential cmake

sudo apt-get install libasound2-dev libgtk2.0-dev libgtk-3-dev

sudo apt-get install git git-gui gitk

make sources modifications in audacity-minsrc-2.3.3/src/menus/HelpMenus.cpp the word Audacity with Audacityyy

for implement the modification in AUDACITY:

in audacity-minsrc-2.3.3 make a directory with the name “build”

move in it

open a terminal

../configure –with-lib-preference=”local system”

make

NOTES: at this point AUDACITY program on the OS still the same

sudo make install

after that, I open AUDACITY and I see the modification

NOTES: it is possible to make the last three commands, in build directory, without delete its content, it will just overwrite it.