-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix raspijamulus #2267
Fix raspijamulus #2267
Conversation
Hi Volker, nice to see you here again! I recently updated my Pi to the latest Raspberry Pi OS, and Jamulus still compiles fine. Here is my OS version:
The Qt packages I have installed are:
Maybe something is missing on your Pi? |
Although I only compile using |
Hi Volker! Great to see you again. Concerning the error you’ve mentioned, does this occur independently of your changes? If yes, probably it’s better to have a separate issue. |
I think this should probably be in 3.8.2? |
Hi Volker, great to see you here! :) As far as I understand, this PR provides improvements/updates for the raspijamulus.sh script, so it basically fixes compatibility with latest (2021-10-30?) Raspbian versions, right? In addition, you've encountered a compile error, right? I've opened issue #2272 (+ PR #2273) for the latter to keep this PR focussed on the proposed changes. |
Thanks for your immediate response. First, it is a pleasure for me to see that the Jamulus project is in such a good shape. Many thanks (again) for you to organize and manage the project so well :-). The reason I am using the raspijamulus script is that I have build a prototype hardware for my new project Edrumulus which is an open source e-drum trigger module. I am using a microprocessor (ESP32) running the Edrumulus software and a Raspberry Pi 3B+ running Drumgizmo and Jamulus at the same time. Here is a picture of that prototype:
The normal
At least the correct Raspbian packages needed to be installed. The package
Yes, this is the purpose.
Thank you. And you already have a fix, that was quick! :-) BTW: In the raspijamulus script I was using a custom OPUS library because it was compiled with fixed point which gave me some speed improvements on my old Raspberry Pi Zero back in the days: Line 1159 in 2501880
Does this mean that the normal Jamulus compilation now uses fixed point on ARM by default? Or is this just using SSE extensions which cannot be used on ARM? |
distributions/raspijamulus.sh
Outdated
@@ -5,7 +5,7 @@ OPUS="opus-1.3.1" | |||
NCORES=$(nproc) | |||
|
|||
# install required packages | |||
pkgs='alsamixergui build-essential qt5-default libasound2-dev cmake libglib2.0-dev' | |||
pkgs='alsamixergui build-essential qt5-qmake qtdeclarative5-dev qttools5-dev-tools libjack-jackd2-dev cmake libglib2.0-dev' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just tried this script on a Pi with fresh install of Raspbian 10 (which has Qt 5.11.3). I found that it still needs qt5-default
and libasound2-dev
:
- without
libasound2-dev
, the build ofjack2
fails - without
qt5-default
, the build of Jamulus fails.
I know thatqttools5-dev-tools
is needed for Qt >= 5.12 to providelrelease
.
And I have just seen your comment thatqt5-default
is not in Raspbian 11 (I was just about to try it myself). Interesting... it would be good if we could make this script work on both OS versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- without
libasound2-dev
, the build ofjack2
fails
I have just found this is also true on Raspbian 11, so libasound2-dev
must still be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. It did compile fine on my Raspbian. But maybe I had this package libasound2-dev
was already installed. I'll do some more tests and update the PR, soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding libasound2-dev
is no problem because it is available. But since qt5-default is not available and cannot be installed, running the raspijamulus script will always ask Do you want to install missing packages?
but if you answer with yes you'll get
Package qt5-default is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'qt5-default' has no installation candidate
The idea was that the script simply runs without interaction as soon as it was once installing everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups... I just noticed another thing which was incorrect (it's a very long time ago when I was initially writing this script): Since we checkout our own version of jack2 and compile it, we also use the headers and libraries from that location and do not use the system jack2-dev files. So, I also removed the libjack-jackd2-dev
again. Sorry for the inconvenience...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I have found when running this script on a fresh OS (same on both 10 and 11), is that when Jamulus compilation is finished, and the script runs Jamulus, it complains that it cannot connect to or start a jack server, and suggests starting jackd manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to have an USB audio card connected when you start the script. It takes the first device it finds (ADEVICE=$(aplay -l|grep "USB Audio"|tail -1|cut -d' ' -f3))
and tells you as an output what device it found and wants to use: echo "Using USB audio device: ${ADEVICE}"
. I assume that in your case no audio device was found and therefore the jack daemon could not be started.
I think it is just SSE, but I am not certain. The SSE stuff was added by @npostavs back in February. |
I have just done a standard compile after a |
The way I integrated the OPUS library was to include all the OPUS sources and compile it together with all the other Jamulus source file. The original ./configure of the OPUS library was therefore not used. So, I assume that the normal Jamulus compilation does not use an optimized OPUS build and therefore it makes sense to keep the custom OPUS library creation in the raspijamulus script. |
I suppose the question then is: what compilation defines get set up by |
Yes, basically I added the arch-specific optimizations into the Jamulus qmakefile. The referenced line is just for x86/64, but for arm I enabled NEON intrinsics (I don't really know if/how it works, but the #defines are there, as far as I know). I didn't try to enable fixed-point. Lines 714 to 717 in 2501880
|
Actually, I would not change anything in the Jamulus.pro file to support fixed-point OPUS. For most of the Jamulus use cases it is not needed. Just for very special cases like running Jamulus on a Raspberry Pi Zero, you will see a small improvement in speed if using a fixed-point OPUS library. And exactly for these special cases there is the raspijamulus script which can be used. This uses an external OPUS library which is configured with fixed-point support. |
I have studied and tested this on both Raspbian 10 and 11, with the aim of making the script compatible with both. This is what I have found:
So I would recommend the following section of code for installing packages on both 10 and 11 (I have tested on fresh installs of both):
I have a version with this change at https://github.com/softins/jamulus/tree/fix-pi |
… headers and libraries for Jamulus compilation
Thanks Tony for your effort. I really like your solution. |
# Conflicts: # distributions/raspijamulus.sh
I think I have fixed my Git issue. Now it's ready for merge.
I took the required packages from the COMPILING.md file from section "On Ubuntu-based distributions 18.04+, Debian 9+, and Raspberry Pi OS:". Maybe this should be updated, too. |
Yes. And probably the CI too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
CHANGELOG: Build: Raspijamulus build script has been improved to work with the latest Raspberry Pi OS releases and to include a newer JACK version.
Short description of changes
raspijamulus.sh did not work for newest Raspbian OS.
Context: Fixes an issue?
Missing install packets, new jack2 version needed.
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
Unforunately, the current Jamulus source code does not compile on my Raspberry Pi with the following error message:
What is missing until this pull request can be merged?
The above compilation error is independent of this pull request.
Checklist