Skip to content

AudYoFlo: Building on Linux

Florian Wickert edited this page Dec 16, 2024 · 42 revisions

Building AudYoFlo in Linux is based on the console. Note that more details about the build of the AudYoFlo system are listed in the description for Windows here. In the remainder of this chapter of the documentation, only the main steps related to the compilation process on a Linux system shall be described.

Note: Build description was latest updated for a fresh install of Ubuntu 22.04 LTS on Nov 23, 2024. I tried to use AudYoFlo with Ubuntu 24.04 LTS. However, there seemed to be an issue with Flutter version 3.7.4 in Ubuntu 24.01 LTS on the first round. However, I finally got the Flutter apps up and running on the second trial. In the following, the description is suitable for Ubuntu 22.04, and I have added hints what is required for a transition to Ubuntu 24.04.

Step I: Installation of Pre-Requisites

In Linux, a slightly different approach is followed to involve third-party projects. In particular, many of the sub projects are required to be installed by the following commands.

Installation of required System Dependencies

At first, we need to install the third-party components required to install the main part of the AudYoFlo system. Most of the required installations are done using apt install.

sudo apt install -y valgrind cmake build-essential curl libgl1-mesa-dev curl libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype-dev freeglut3-dev libxmu-dev flex bison portaudio19-dev libsndfile1-dev libfftw3-dev alsa-utils libasound2-dev octave octave-signal octave-control octave-dev libboost-dev libeigen3-dev libopencv-dev python3-opencv libpcap-dev ninja-build python3-pip meson git libspandsp-dev 7zip

pip install aqtinstall

Ubuntu 24.04:

sudo apt install 7zip-standalone

## apt install python3-venv
python3 -m venv python/venv
. python/venv/bin/activate
pip install aqtinstall

The following applications must be installed via snap application manager:

  • rustup
  • Visual Studio Code

For rustup, run

rustup default stable

Once rustup has been installed, cbindgen must be installed using cargo:

cargo install cbindgen

Also, the path to the cbindgen and the flutter executable must be added to the .bashrc, e.g.,

export PATH="$PATH:/home/<my_account>/.cargo/bin:/home/<my_account>/ayfdevelop/AudYoFlo/sources/jvxLibraries/third_party/web/flutter/flutter-3.7.4/bin"

Finally, in Visual Studio Code, the flutter plugin must be installed:

image

Installation of Dependencies for VST Technology

If configured correspondingly, the following dependencies must be installed for the integration of VST:

sudo apt install -y libxcb-util-dev libxcb-cursor-dev libxcb-keysyms1-dev libxcb-xkb-dev libxkbcommon-x11-dev libcairo-dev libpango1.0-dev libgtkmm-3.0-dev libsqlite3-dev

Installation of Dependencies for FFMPEG

If configured correspondingly, the following dependencies must be installed for the integration of FFMPEG:

sudo apt-get install -y yasm libsdl2-dev libsqlite3-dev libgtkmm-3.0-dev libpango1.0-dev libgtkmm-3.0-dev libpango1.0-dev libcairo2-dev libxkbcommon-x11-dev libxcb-keysyms1-dev libxcb-cursor-dev libxcb-util-dev libx264-dev libx265-dev

Installation of Dependencies for Octave

If configured correspondingly, the following dependencies must be installed for the integration of Octave.

sudo apt-get install octave

The commands installation of Octave must be followed by the installation of the toolboxes in Octave:

pkg install -forge control
pkg install -forge signal
pkg load control

Step II: Installation of the AudYoFlo System Source Code

Once the pre-requisites have been installed, we prepare to build the AudYoFlo system by checking out the AudYoFlo repository to a new folder, e.g., develop,

mkdir develop
cd develop
git clone https://github.com/jvxgit/AudYoFlo.git

image

Once available, we change to the folder AudYoFlo and create a build folder. Then, we copy a build script template to the build folder,

mkdir build
cp AudYoFlo/build-scripts/linux/debug/rt-sdk/compiled.sh build

image

Here, we need to adapt the given settings according to our wishes and link to the AudYoFlo main folder,

JVX_SRC_PATH=$PWD/..

More information about the configuration options can be found here

Step III: Preparing, Configuring and Running the Build

In the first step, we change to the build folder and start the build process by running the command to build the AudYoFlo build tools,

cd build
./compiled.sh rt-bt

image

image

Then, we start to configure the main system build by using the following command,

./compiled.sh cc && ./compiled.sh rt

image

Finally, all build outputs have been created:

image

A simple command to run only the build which is also involved in the compiled.sh script is

ninja install

image

Step III: Building the AudYoFlo SDK

The process to build the AudYoFlo sofware development kit (SDK) is identical to that described for Windows:

./compiled.sh cc && ./compiled.sh sdk-bt && ./compiled.sh cc && ./compiled.sh sdk

image

Once completed, the SDK consists of the folders as described for MS Windows. A tools folder, however, is not part of the SDK in Linux since it is assumed that the required tools (flex, bison, m4) are installed on the development PC locally.

Working with AudYoFlo within Visual Studio Code

Building the system is fully based on standard console tools in Linux. However, for editing and debugging, the use of Visual Studio Code is a good approach. After installing VS code, we need to open the AudYoFlo folder as the working space:

Bildschirmfoto vom 2023-02-02 14-13-24

The folder is detected as the root of a cmake project due to the CMakeLists.txt file. However, some of the options must be configured according to the desired feature set. In order to find out what options are available, the compiled.sh script can be triggered to output the currently chosen definitions by running

./compiled.sh show

The output shows the options when running cmake on the console using the compile script.

Bildschirmfoto vom 2023-02-02 14-19-21

The shown option can be easily introduced in file settings.json which defines the command used by Visual Studio Code on the cmake build trigger as follows:

{
    "C_Cpp.updateChannel": "Insiders",
    "cmake.buildDirectory": "${workspaceFolder}/../build",
    "cmake.buildArgs": [
    ],
    "cmake.configureArgs": [
        "-Wno-dev"
    ],
    "cmake.configureSettings": {
        "JVX_PRODUCT":"audio",
        "JVX_RELEASE_SDK": false,
        "JVX_DEFINE_NUMBER_32BIT_TOKENS_BITFIELD":16,
        "JVX_COMPILE_BUILDTOOLS":false,
        "JVX_DEPLOY_UNSTABLE":true,
        "JVX_USE_PART_ALSA": true,
        "JVX_USE_PART_PAUDIO": true,
        "JVX_USE_PART_RS232": true,
        "JVX_USE_QT":true,
        "JVX_USE_QWT":true,
        "JVX_USE_PART_CORECONTROL":true,
        "JVX_USE_CONSOLE_APPS":true,
        "JVX_USE_PART_MATLAB": true,
        "JVX_COMPILE_GOD_HOST": true,
        "JVX_MATLAB_PROPERTY_GENERATOR":true,
        "JVX_USE_PART_WEBSERVER":true,
        "JVX_DEPLOY_EXAMPLES": true,
        "JVX_USE_BOOST":true,
        "JVX_USE_EIGEN":true,
        "JVX_DEPLOY_LIBRARY_DSP_MATLAB":true,
         "JVX_INCLUDE_EBUR128": true,
         "JVX_USE_VST":true, 
         "SMTG_CREATE_PLUGIN_LINK": false, 
         "JVX_USE_LIBMYSOFA": true, 
         "LIBMYSOFA_BUILD_TESTS": false,
         "JVX_USE_HOA_CIRC_ARRAY": false,
         "QT_INSTALL_PATH": "/home/hauke/develop/install/Qt5.13.2/5.13.2/gcc_64" 
    }
}

If the code shall be compiled in VS code, it is a good idea to clean the cache and the previous build artefacts from the build folder by running

./compiled.sh clean

Bildschirmfoto vom 2023-02-02 14-25-49

at first followed by triggering the build in Visual Studio Code,

Bildschirmfoto vom 2023-02-02 14-27-04

When using Visual Studio Code as the debugging environment, a lauch file must be created. The content in that case looks as follows:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Starten",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/../build/release/runtime/bin/jvxMixMatrix",
            "args": ["--jvxdir", "jvxComponents", "--config", "jvxMixMatrix.jvx", "--textlog", "--verbose_dll", "--textloglev",  "10"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/../build/release/runtime",
            "environment": [
                {
                    "name": "LD_LIBRARY_PATH",
                    "value": "./bin/:/home/hauke/develop/install/Qt5.13.2/5.13.2/gcc_64/lib:$LD_LIBRARY_PATH"}],
            "externalConsole": false,
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Automatische Strukturierung und Einrückung für \"gdb\" aktivieren",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

The settings.json file contains all information to specify

  1. the executable in entry program,
  2. the arguments in entry args,
  3. the LD_LIBRARY_PATH settings in entry environment.

The compiled.sh, the settings.json and launch.json can be found in the build-scripts folder of the AudYoFlo repository.

Back

Clone this wiki locally