File: Linux.md

package info (click to toggle)
jacktrip 2.7.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,788 kB
  • sloc: cpp: 44,373; sh: 965; makefile: 152; ansic: 32; ruby: 20; python: 15
file content (264 lines) | stat: -rw-r--r-- 11,157 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# Build Instructions

The following are instructions for compiling Jacktrip from source.  Compiling
from source is the best way to keep up with the latest changes, both stable and
experimental.  For quicker ways to install Jacktrip, go to README.md in the root
directory of the project.

## Dependencies
- C++ compiler
- Meson
- Qt5, or Qt6 (required for Virtual Studio)

Optional:

- JACK (preferred) or RtAudio (for clients only)
- help2man for generating the manpage

### Fedora (Qt5)
```sh
dnf install qt5-qtbase-devel qt5-qtnetworkauth-devel qt5-qtwebsockets-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel
dnf groupinstall "C Development Tools and Libraries"
dnf groupinstall "Development Tools"
dnf install "pkgconfig(jack)" rtaudio-devel git help2man python3-jinja2 dbus-devel
```

### Fedora (Qt6)
```sh
dnf install qt6-qtbase-devel qt5-qtnetworkauth-devel qt5-qtwebsockets-devel qt5-qtquickcontrols2-devel qt5-qtsvg-devel qt6-qtwebengine-devel qt6-qtwebchannel-devel qt6-qt5compat-devel qt6-qtshadertools-devel
dnf groupinstall "C Development Tools and Libraries"
dnf groupinstall "Development Tools"
dnf install "pkgconfig(jack)" rtaudio-devel git help2man python3-jinja2 dbus-devel
```

Clone the git repo with submodules and run `./build install` in the project
directory or use QtCreator to compile.

### Ubuntu and Debian/Raspbian (Qt5)
```sh
apt install --no-install-recommends build-essential autoconf automake libtool make libjack-jackd2-dev git help2man python3-jinja2
apt install qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qttools5-dev libqt5svg5-dev libqt5websockets5-dev qtdeclarative5-dev qtquickcontrols2-5-dev
```

### Ubuntu and Debian/Raspbian (Qt6)
```sh
apt install --no-install-recommends build-essential autoconf automake libtool make libjack-jackd2-dev git help2man libclang-dev libdbus-1-dev libdbus-1-dev python3-jinja2
apt install -y libqt6core6 libqt6gui6 libqt6network6 libqt6widgets6 libqt6qml6 libqt6qmlcore6 libqt6quick6 libqt6quickcontrols2-6 libqt6svg6  libqt6webchannel6 libqt6webengine6-data libqt6webenginecore6 libqt6webenginecore6-bin libqt6webenginequick6 libqt6websockets6 libqt6shadertools6 qt6-qpa-plugins qml6-module-qtquick-controls qml6-module-qtqml-workerscript qml6-module-qtquick-templates qml6-module-qtquick-layouts qml6-module-qt5compat-graphicaleffects qml6-module-qtwebchannel qml6-module-qtwebengine qml6-module-qtquick-window
apt install qt6-base-dev qt6-base-dev-tools qmake6 qt6-tools-dev qt6-declarative-dev qt6-webengine-dev qt6-webview-dev qt6-webview-plugins libqt6svg6-dev libqt6websockets6-dev libqt6core5compat6-dev libqt6shadertools6-dev libgl1-mesa-dev
# for GUI builds
apt install libfreetype6-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev libx11-xcb-dev libdrm-dev libglu1-mesa-dev libwayland-dev libwayland-egl1-mesa libgles2-mesa-dev libwayland-server0 libwayland-egl-backend-dev libxcb1-dev libxext-dev libfontconfig1-dev libxrender-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev '^libxcb.*-dev' libxcb-render-util0-dev libxcomposite-dev libgtk-3-dev
apt install librtaudio-dev # if building with RtAudio
```

Clone the git repo with submodules and run `./build install` in the project
directory or use QtCreator to compile.

### Building and Installation instructions

For other Linux distributions, install the dependencies listed above.

To clone the repo in the Terminal:
```sh
$ git clone --recurse-submodules https://github.com/jacktrip/jacktrip.git
```
Note that we need `--recurse-submodules` to also get the submodules!

Next, navigate to the cloned repository:
```sh
$ cd jacktrip
```

JackTrip uses meson. To configure a build directory, use `meson setup` with
the following parameters:

* `rtaudio`: Enabled this to build with support for the RtAudio backend.
  If an existing installation is found, it will be used. Otherwise, meson
  uses a subproject to download and install the latest supported release.
  JackTrip supports both RtAudio v5 and v6.

* `jack`: Enable this to link directly with libraries for the Jack Audio
  Toolkit. JackTrip will fail if these cannot be found at runtime.

* `weakjack`: Enable this to build with support for the Jack Audio Toolkit,
  with support for dynamically loading the libraries at runtime. JackTrip
  will still work if they cannot be found. This requires `rtaudio` and
  uses a git submodule.

* `nogui`: Build without support for a graphical user interface (this
  also disables support for Virtual Studio). Only basic command line
  features will be included. This requires fewer dependencies, and
  supports static builds.

* `novs`: Build without support for Virtual Studio. Virtual Studio
  requires Qt6 with the WebEngine and WebChannel libraries installed.

* `vsftux`: Skip the "Yes" / "No" first time run screen asking users if
  they would like to use the Virtual Studio interface. Classic mode can
  still be selected at startup, and can be used at any time.

* `noupdater`: Build without support for automatic updates. This is
  implied and has no effect when building for Linux.

* `nofeedback`: Build without support for feedback detection. This
  feature is optional, and uses the SimpleFFT third party library.

* `profile`: Choose build profile / Sets desktop id accordingly

* `qtversion`: Choose to build with either Qt5 or Qt6

* `buildinfo`: Additional info used to describe the build

For example:
```sh
$ meson setup -Drtaudio=enabled builddir
```

To build JackTrip, run:
```sh
$ meson compile -C builddir
```

To install JackTrip, run:
```sh
$ meson install -C builddir
# enter your password when prompted
```

### Building with Docker

You can also build JackTrip using Docker, which especially makes it easier
to build for alternative architectures. The following build arguments are
available:

* BUILD_CONTAINER - Debian based container image to build with
* MESON_ARGS - arguments to build using meson
* QT_DOWNLOAD_URL - path to qt6 download (optional)
* VST3SDK_DOWNLOAD_URL - path to the VST3 SDK (optional)
* USE_SYSTEM_LIBSAMPLERATE - dynamically link with libsamplerate

For example:

amd64 dynamic
```
docker buildx build --target=artifact -f linux/Dockerfile.build --output type=local,dest=./ \
  --platform linux/amd64 --build-arg BUILD_CONTAINER=ubuntu:22.04 \
  --build-arg MESON_ARGS="-Ddefault_library=shared -Drtaudio=enabled -Drtaudio:jack=disabled -Drtaudio:default_library=static -Drtaudio:alsa=enabled -Drtaudio:pulse=enabled -Drtaudio:werror=false" .
```

amd64 static
```
docker buildx build --target=artifact -f linux/Dockerfile.build --output type=local,dest=./ \
  --platform linux/amd64 --build-arg BUILD_CONTAINER=ubuntu:20.04 \
  --build-arg MESON_ARGS="-Ddefault_library=static -Drtaudio=enabled -Drtaudio:jack=disabled -Drtaudio:default_library=static -Drtaudio:alsa=enabled -Drtaudio:pulse=disabled -Drtaudio:werror=false -Dnogui=true" \
  --build-arg QT_DOWNLOAD_URL=https://files.jacktrip.org/contrib/qt/qt-6.8.3-static-linux-amd64.tar.gz .
```

arm64 dynamic
```
docker buildx build --target=artifact -f linux/Dockerfile.build --output type=local,dest=./ \
  --platform linux/arm64 --build-arg BUILD_CONTAINER=ubuntu:22.04 \
  --build-arg MESON_ARGS="-Ddefault_library=shared -Drtaudio=enabled -Drtaudio:jack=disabled -Drtaudio:default_library=static -Drtaudio:alsa=enabled -Drtaudio:pulse=enabled -Drtaudio:werror=false" .
```

arm64 static
```
docker buildx build --target=artifact -f linux/Dockerfile.build --output type=local,dest=./ \
  --platform linux/arm64 --build-arg BUILD_CONTAINER=ubuntu:20.04 \
  --build-arg MESON_ARGS="-Ddefault_library=static -Drtaudio=enabled -Drtaudio:jack=disabled -Drtaudio:default_library=static -Drtaudio:alsa=enabled -Drtaudio:pulse=disabled -Drtaudio:werror=false -Dnogui=true" \
  --build-arg QT_DOWNLOAD_URL=https://files.jacktrip.org/contrib/qt/qt-6.8.3-static-linux-arm64.tar.gz .
```

arm32 static
```
docker buildx build --target=artifact -f linux/Dockerfile.build --output type=local,dest=./ \
  --platform linux/arm/v7 --build-arg BUILD_CONTAINER=debian:buster \
  --build-arg USE_SYSTEM_LIBSAMPLERATE=1 \
  --build-arg MESON_ARGS="-Ddefault_library=static -Drtaudio=enabled -Drtaudio:jack=disabled -Drtaudio:default_library=static -Drtaudio:alsa=enabled -Drtaudio:pulse=disabled -Drtaudio:werror=false -Dnogui=true -Dcpp_link_args='-no-pie'" \
  --build-arg QT_DOWNLOAD_URL=https://files.jacktrip.org/contrib/qt/qt-5.15.13-static-linux-arm32.tar.gz .
```

### Verification

If you have installed jacktrip, from anywhere in the Terminal, type:
```sh
$ jacktrip -v
```

If you have compiled from source without installing, in the `/builddir`
directory type:
```sh
$ ./jacktrip -v
```

If you see something like this, you have successfully installed JackTrip:

```
JackTrip VERSION: 2.x.x
Copyright (c) 2008-2020 Juan-Pablo Caceres, Chris Chafe.
SoundWIRE group at CCRMA, Stanford University
```

### Running Two Versions of JackTrip in Parallel
One level above the project directory of your current JackTrip installation, clone the JackTrip repository again in another directory (e.g. `jacktrip-1.x.x`):

```sh
$ git clone --recurse-submodules https://github.com/jacktrip/jacktrip.git jacktrip-1.x.x
```

You now have two separate folders side by side: the new version in the jacktrip-1.x.x folder and the original one in the jacktrip folder. To build the new version without installing it:
```sh
$ cd jacktrip-1.x.x
$ ./build
```

To experiment with the new version of JackTrip, enter builddir/build directory and check the JackTrip version:  
```sh
$ cd builddir
$ ./jacktrip -v
```

You can use JackTrip from this directory, e.g.:
```sh
$ ./jacktrip -C serveraddress
```

You can switch back and forth between different JackTrip versions by running them in their respective build directories.

Hint: If you lose track of where you are, this command will show your present working directory:
```sh
$ pwd
```

The new version's directory structure might look like this: ``` jacktrip-1.x.x/builddir``` and the old version ``` jacktrip/builddir```.

## Building VST3 SDK for Linux

You may need a few extra development libraries to build the VST3 SDK:

On Fedora:
```
sudo dnf install -y expat-devel freetype-devel pango-devel xcb-util-devel xcb-util-cursor-devel xcb-util-keysyms-devel libxkbcommon-x11-devel gtkmm3.0-devel libsqlite3x-devel
```

On Ubuntu and Debian/Raspbian:
```
sudo apt install -y libexpat-dev libxml2-dev libxcb-util-dev libxcb-cursor-dev libxcb-keysyms1-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libgtkmm-3.0-dev libsqlite3-dev
```

To build and install the VST3 SDK:
```
git clone --recursive https://github.com/steinbergmedia/vst3sdk
mkdir vst3sdk/build
cd vst3sdk/build
cmake -DCMAKE_BUILD_TYPE=Release ../
cmake --build . --config Release
sudo mkdir -p /opt/vst3sdk
sudo cp -r lib/Release /opt/vst3sdk/lib
sudo cp -r bin/Release /opt/vst3sdk/bin
sudo cp -r ../base ../pluginterfaces ../public.sdk ../vstgui4 /opt/vst3sdk
```

When you run `meson setup` use `-Dvst-sdkdir=/path/to/vst3sdk`

Please note that redistribution of JackTrip's VST3 plugin requires a
[license from Steinberg](https://www.steinberg.net/developers/).