Skip to content
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

Build CI on ubuntu 20 for Linux #3229

Merged
merged 5 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/autobuild/linux_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ setup_cross_compiler() {
if [[ "${TARGET_ARCH}" == amd64 ]]; then
return
fi
local GCC_VERSION=7 # 7 is the default on 18.04, there is no reason not to update once 18.04 is out of support
local GCC_VERSION=9 # 9 is the default on 20.04, there is no reason not to update once 20.04 is out of support
sudo apt install -qq -y --no-install-recommends "g++-${GCC_VERSION}-${ABI_NAME}" "qt5-qmake:${TARGET_ARCH}" "qtbase5-dev:${TARGET_ARCH}" "libjack-jackd2-dev:${TARGET_ARCH}" "qtmultimedia5-dev:${TARGET_ARCH}"
sudo update-alternatives --install "/usr/bin/${ABI_NAME}-g++" g++ "/usr/bin/${ABI_NAME}-g++-${GCC_VERSION}" 10
sudo update-alternatives --install "/usr/bin/${ABI_NAME}-gcc" gcc "/usr/bin/${ABI_NAME}-gcc-${GCC_VERSION}" 10
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,22 @@ jobs:
- config_name: Linux .deb amd64 (artifacts+codeQL)
target_os: linux
building_on_os: ubuntu-22.04
building_container: ubuntu:18.04
building_container: ubuntu:20.04
base_command: ./.github/autobuild/linux_deb.sh
run_codeql: true
is_main_build_target: true

- config_name: Linux .deb armhf (artifacts)
target_os: linux
building_on_os: ubuntu-22.04
building_container: ubuntu:18.04
building_container: ubuntu:20.04
base_command: TARGET_ARCH=armhf ./.github/autobuild/linux_deb.sh
run_codeql: false

- config_name: Linux .deb arm64 (artifacts)
target_os: linux
building_on_os: ubuntu-22.04
building_container: ubuntu:18.04
building_container: ubuntu:20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be tested on older Ubuntu versions. We had problems with pan pots not showing up due to something being broken with the dependencies.

@hoffie do you remember?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we would be justified in specifying that the next version requires Ubuntu 20.04 or newer. I can easily check that the CI build runs on 20.04. I will need to create a 22.04 VM on VirtualBox before I can check it on that version.

I don't think we need to continue supporting 18.04.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, it looks like VirtualBox only provides 44100Hz audio to the guest OS, and not 48000Hz. So it might need a physical PC to test it. Maybe USB passthrough from host (Windows) to guest (Ubuntu) might allow a 48kHz audio device?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I managed to set up jack with a dummy device at 48000Hz, which allowed me to run the Jamulus client.

On Ubuntu 22, it does indeed fail to display the pan pot. Will try 20 as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake. I had not set the audio to Stereo. Once I had done so, the pan pot showed up fine on Ubuntu 22. Will try 20 too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as reference: #795 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, the artifact built on Ubuntu 20 from this PR's action runs fine on Ubuntu 20 and Ubuntu 22, and shows the pan pots correctly in both cases.

It does not run on Ubuntu 18, giving the following errors on invocation:

tony@ubuntu18desktop:~$ jamulus 
jamulus: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by jamulus)
jamulus: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by jamulus)

I think this is fine. but we should make it clear somewhere that our future release builds need to run on Ubuntu 20 or newer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done some further tests with the same artifact on different versions of Debian:

  • Debian 12 (stable) (Qt 5.15.8): runs fine, pan pots show properly
  • Debian 11 (oldstable) (Qt 5.15.2): runs fine, pan pots show properly
  • Debian 10 (obsolete) (Qt 5.11.3): fails to run with the same errors as Ubuntu 18 above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. So this sounds good.

base_command: TARGET_ARCH=arm64 ./.github/autobuild/linux_deb.sh
run_codeql: false

Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
xcode-version: ${{ matrix.config.xcode_version }}

- name: Set up base dependencies in container environment
if: matrix.config.building_container == 'ubuntu:18.04'
if: matrix.config.building_container == 'ubuntu:20.04'
run: |
set -eu
apt-get -qq update
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ We support the following platforms and versions:

- **Windows 10** or later
- **macOS 10.10** or later
- **Ubuntu 18.04** or later, **Debian 10** or later, most Linux flavors with recent enough Qt versions
- **Ubuntu 20.04** or later, **Debian 11** or later, most Linux flavors with recent enough Qt versions. (Currently, it may still build on Ubuntu 18.04 and Debian 10, but the binaries built by Github will not run on those versions)

_While Android and iOS aren't officially supported, please don't break their builds._

Expand Down
12 changes: 7 additions & 5 deletions linux/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ Vcs-Browser: https://github.com/jamulussoftware/jamulus

Package: jamulus
Architecture: any
# Define dependencies explicitly for the best compatibility across all supported Ubuntu/Debian versions.
# The automatism would otherwise select package names or versions which are not available on some systems,
# especially when run in the Github Ubuntu 18.04 build environment.
Depends: libc6 (>= 2.17), libstdc++6 (>= 5.2), libgcc1 (>= 1:3.0), libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116, libqt5core5a (>= 5.9.5), libqt5network5 (>= 5.9.5), libqt5xml5 (>= 5.9.5), libqt5gui5 (>= 5.9.5) | libqt5gui5-gles (>= 5.9.5), libqt5widgets5 (>= 5.9.5), libqt5multimedia5 (>= 5.9.5)
Depends:
${shlibs:Depends},
${misc:Depends},
Recommends: qjackctl
Description: Low latency Audio Server/Client
Jamulus is for playing, rehearsing, or just jamming with your friends, your band
Expand All @@ -31,7 +30,10 @@ Description: Low latency Audio Server/Client

Package: jamulus-headless
Architecture: any
Depends: libc6 (>= 2.17), libstdc++6 (>= 5.2), libgcc1 (>= 1:3.0), libqt5core5a (>= 5.9.5), libqt5network5 (>= 5.9.5), libqt5xml5 (>= 5.9.5)
Depends:
${shlibs:Depends},
${misc:Depends},
adduser,
Description: Low latency Audio Server (headless)
This package contains a Jamulus binary built for headless operation
(without GUI library dependencies) and a jamulus-headless systemd service.
Expand Down
10 changes: 9 additions & 1 deletion linux/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ DEB_TARGET_GNU_TYPE := $(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# DEB_BUILD_GNU_TYPE is the system running the build (this system)
# DEB_HOST_GNU_TYPE is the system jamulus is being built for (the target)
# DEB_TARGET_GNU_TYPE is only relevant when building cross-compilers
$(info DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE) DEB_TARGET_GNU_TYPE=$(DEB_TARGET_GNU_TYPE))

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
QMAKE := qmake
else
QMAKE := "/usr/lib/$(DEB_BUILD_GNU_TYPE)/qt5/bin/qmake" -qtconf "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/mkspecs/$(DEB_TARGET_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm"
# For an unknown reason, when called from this makefile in Ubuntu 20.04,
# qmake needs an option between qmake and -qtconf, else it gives an error.
# We use -makefile, which is the default mode anyway, and this avoids the issue.
QMAKE := qmake -makefile -qtconf "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/mkspecs/$(DEB_HOST_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm"
endif

%:
Expand Down
Loading