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

Conversation

softins
Copy link
Member

@softins softins commented Feb 10, 2024

Short description of changes

These are the changes needed for the CI to build the three Linux artefacts using Ubuntu 20.04 instead of the EOL 18.04

CHANGELOG: Autobuild: Build Linux releases on Ubuntu 20.04 instead of 18.04

Context: Fixes an issue?

This is needed before dependabot #3168 can be applied successfully. checkout@v4 will not run on Ubuntu 18.
It also has the advantage that Ubuntu 20.04 uses Qt 5.12 (U18.04 uses Qt 5.9), which will make it easier to progress #2393

Does this change need documentation? What needs to be documented and how?

The release notes should make it clear what versions of OS are compatible: Ubuntu >= 20, Debian >= 11

Status of this Pull Request

Ready to merge

What is missing until this pull request can be merged?

Review

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

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.

@ann0see
Copy link
Member

ann0see commented Feb 12, 2024

It also has the advantage that Ubuntu 20.04 uses Qt 5.12 (U18.04 uses Qt 5.9)

I believe that we will need to drop official support for < 5.9 in the future. macOS legacy builds on 5.9, I think.

@softins
Copy link
Member Author

softins commented Feb 12, 2024

It also has the advantage that Ubuntu 20.04 uses Qt 5.12 (U18.04 uses Qt 5.9)

I believe that we will need to drop official support for < 5.9 in the future. macOS legacy builds on 5.9, I think.

Yes, I also have a branch waiting for me to raise a PR to build Mac Legacy with Qt 5.15.2 instead of 5.9.5. That will still support MacOS High Sierra 10.13 or newer, but will no longer support 10.10, 10.11 or 10.12. I think that will be fine.

@softins
Copy link
Member Author

softins commented Feb 13, 2024

Given that the executable built on Ubuntu 20 with Qt 5.12.8 will not run on systems with a lower version of Qt than 5.12, we will also need to update the dependencies in linux/debian/control to prevent the .deb being installed on such a system:

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: libc6 (>= 2.17), libstdc++6 (>= 5.2), libgcc1 (>= 1:3.0), libqt5core5a (>= 5.9.5), libqt5network5 (>= 5.9.5), libqt5xml5 (>= 5.9.5)

I can add that to this PR soon.

@softins
Copy link
Member Author

softins commented Feb 13, 2024

I'll check the new .deb on the same systems above once it is built.

@ann0see
Copy link
Member

ann0see commented Feb 13, 2024

Yes.

I think I removed the automatic dependency variables. Maybe they can be re-added now.

@softins
Copy link
Member Author

softins commented Feb 13, 2024

Yes.

I think I removed the automatic dependency variables. Maybe they can be re-added now.

Ah yes, I've just found the relevant commit 40ca392. I'll do some tests to see what adding them back produces.

@softins
Copy link
Member Author

softins commented Feb 14, 2024

After adjusting the dependency versions for libstdc++6 and libgcc1 from 10.5 to 10.2 (see b7a84a8), the .deb correctly refuses to install on Debian 10 and Ubuntu 18, due to unsatisfied Qt version dependency. It installs and runs correctly on Debian 11 and 12, and on Ubuntu 20 and 22.

@softins
Copy link
Member Author

softins commented Feb 14, 2024

I did a test build with the auto-dependency variables reinstated:

Depends:
 ${shlibs:Depends},
 ${misc:Depends},

The .deb produced results in different dependencies, which I would assume are correct according to the package rules:

tony@pi:/tmp $ dpkg-deb -I jamulus_3.10.0dev-b6edd46_ubuntu_amd64.deb
 new Debian package, version 2.0.
 size 1385404 bytes: control archive=1132 bytes.
    1042 bytes,    19 lines      control
     628 bytes,     8 lines      md5sums
 Package: jamulus
 Version: 3.10.0dev
 Architecture: amd64
 Maintainer: "The Jamulus Development Team" <[email protected]>
 Installed-Size: 3135
 Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libjack-jackd2-0 (>= 1.9.10+20150825) | libjack-0.125, libqt5core5a (>= 5.12.2), libqt5gui5 (>= 5.6.0~beta) | libqt5gui5-gles (>= 5.6.0~beta), libqt5multimedia5 (>= 5.6.0~beta), libqt5network5 (>= 5.8.0), libqt5widgets5 (>= 5.12.2), libqt5xml5 (>= 5.0.2), libstdc++6 (>= 7)
...

and

tony@pi:/tmp $ dpkg-deb -I jamulus-headless_3.10.0dev-b6edd46_ubuntu_amd64.deb
 new Debian package, version 2.0.
 size 1158968 bytes: control archive=1336 bytes.
    1024 bytes,    21 lines      control
     290 bytes,     4 lines      md5sums
     508 bytes,    17 lines   *  postinst             #!/bin/sh
     184 bytes,     7 lines   *  postrm               #!/bin/sh
     199 bytes,     7 lines   *  prerm                #!/bin/sh
 Package: jamulus-headless
 Source: jamulus
 Version: 3.10.0dev
 Architecture: amd64
 Maintainer: "The Jamulus Development Team" <[email protected]>
 Installed-Size: 2292
 Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libqt5core5a (>= 5.12.2), libqt5network5 (>= 5.8.0), libqt5xml5 (>= 5.0.2), libstdc++6 (>= 7), adduser
...

I then did a test install of these packages on the three versions of Debian and three of Ubuntu. Debian 10 and Ubuntu 18 correctly refused to install due to dependencies. Debian 11/12 and Ubuntu 20/22 all installed and ran correctly.

So I will update linux/debian/control to use the automatic dependency variables again instead of manual versions.

@pljones pljones added this to the Release 3.11.0 milestone Feb 23, 2024
@pljones pljones added the tooling Changes to the automated build system label Feb 23, 2024
@softins
Copy link
Member Author

softins commented Mar 2, 2024

Are there still concerns with this, or can we move forward with approval and merging?

@ann0see
Copy link
Member

ann0see commented Mar 2, 2024

Same issue as with macOS, but I think upgrading Linux is much easier.
I'm going to check it works on Debian stable.

Copy link
Member

@ann0see ann0see left a comment

Choose a reason for hiding this comment

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

Maybe also check that COMPILING.md is up to date.

@ann0see
Copy link
Member

ann0see commented Mar 2, 2024

CONTRIBUTING.md needs to be updated.

@softins
Copy link
Member Author

softins commented Mar 2, 2024

Maybe also check that COMPILING.md is up to date.

I can't see anything in that file that would be affected by this change.

@ann0see
Copy link
Member

ann0see commented Mar 2, 2024

It's the minimum version in CONTRIBUTING.md

@softins
Copy link
Member Author

softins commented Mar 2, 2024

It's the minimum version in CONTRIBUTING.md

Yes, indeed, I've just updated that. It was in COMPILING.md that I couldn't see any changes needed.

@softins softins requested a review from pljones March 2, 2024 23:25
@ann0see ann0see merged commit db69591 into jamulussoftware:main Mar 3, 2024
15 checks passed
@softins softins deleted the build-on-ubuntu-20 branch March 5, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Changes to the automated build system
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants