[SRU] Possible missing dependencies of libsdl2-dev in Jammy

Bug #1976198 reported by Lin Manfu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libsdl2 (Debian)
Fix Released
Unknown
libsdl2 (Ubuntu)
Fix Released
High
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
* People using the library to build custom applications

[Test Plan]
* try to build Simutrans-Extended app from github code

[Where problems could occur]
* Without some dependencies being installed (libdecor-0-dev libdrm-dev libgbm-dev libxfixes-dev), the build will fail

[ other info ]
UBUNTU RELEASE

Ubuntu 22.04 LTS (Kubuntu but I think that's irrelevant)

PACKAGES AND VERSIONS
libsdl2-dev 2.0.20+dfsg-2build1
libsdl2-2.0-0 2.0.20+dfsg-2build1

STEPS TO REPRODUCE

(This is how I discovered the issue, but there is probably a much more minimal reproduction case)
1. Download the Simutrans-Extended repo: https://github.com/jamespetts/simutrans-extended
2. Download the dependencies, at a minimum libsdl2-dev
3. Following the instructions there for building with autotools

EXPECTED RESULTS

Simutrans-Extended compiles correctly, as it did on Focal Fossa.

ACTUAL RESULTS

When I tried to build it on Jammy Jellyfish, the build failed with the following errors from the linker:

    /usr/bin/ld: cannot find -ldrm: No such file or directory
    /usr/bin/ld: cannot find -lgbm: No such file or directory
    /usr/bin/ld: cannot find -ldecor-0: No such file or directory

Installing the libdrm-dev, libgbm-dev, and libdecor-0-dev packages solved that problem. But I wonder whether it might be a packaging bug. I follow Simutrans-Extended development quite closely and we have not intentionally introduced dependencies on those packages; I think they have been brought in by SDL2.

If a program using sdl2-dev used to be able to compile without those packages, but now requires them, it seems to me that they are now dependencies of sdl2-dev. Or at least be 'suggests'. But I am not an expert on this.

COMMENTS

Those libraries are not direct dependencies of Simutrans. However, Ubuntu's sdl2-0-0 package has added dependencies on libgbm1, libdrm2, and libdecor-0-0.

Compare the Focal dependencies.... https://packages.ubuntu.com/focal/libsdl2-2.0-0
......with the Jammy dependencies: https://packages.ubuntu.com/jammy/libsdl2-2.0-0

The Jammy libsdl2-dev package does **not** list dependencies on the appropriate development packages: https://packages.ubuntu.com/jammy/libsdl2-dev

I notice that SDL's own build guide lists those packages as dependencies for building SDL2 itself on Focal Fossa: https://github.com/libsdl-org/SDL/blob/main/docs/README-linux.md
But that change was made in February 2021 so it affects Ubuntu's version of SDL2 in Jammy, not Focal: https://github.com/libsdl-org/SDL/commit/2f4e9294aa260635d876b5699846adc458f555db

I initially asked about this on AskUbuntu and a comment there confirmed that the required .so files are in (for example) libgbm-dev, not lib-gbm1: https://askubuntu.com/questions/1410876/is-ubuntus-libsdl2-dev-package-missing-dependencies-or-have-i-made-a-mistake?noredirect=1#comment2451919_1410876

I might file a bug report upstream with Debian if I can figure out their bugtracking system.

Lin Manfu (linmanfu)
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the bug report. Indeed those libraries are listed in the .pc requirements and should be depends, it also has been reported to Debian on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1012088

Changed in libsdl2 (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Changed in libsdl2 (Debian):
status: Unknown → New
Changed in libsdl2 (Ubuntu Jammy):
status: New → In Progress
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

The fix has been included in Debian and synced for kinetic in https://bugs.launchpad.net/ubuntu/+source/libsdl2/2.0.22+dfsg-4~build1

Changed in libsdl2 (Ubuntu):
status: Confirmed → Fix Committed
summary: - Possible missing dependencies of libsdl2-dev in Jammy
+ [SRU] Possible missing dependencies of libsdl2-dev in Jammy
Changed in libsdl2 (Debian):
status: New → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

This looks fine and I'm accepting. I wonder though if we can stage it to bundle it with an update that directly impacts users? Otherwise every qemu user will have to download this update for no benefit to them.

I don't feel too strongly about this. I'll set the tag, but if time has passed and nothing has appeared to bundle it with, or if another SRU team member thinks it needs releasing earlier, please go ahead and drop the tag.

tags: added: block-proposed-jammy
Revision history for this message
Robie Basak (racb) wrote :

In the meantime a straightforward workaround is available to users affected by this bug, which is to install the required dependencies manually.

Changed in libsdl2 (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Lin, or anyone else affected,

Accepted libsdl2 into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libsdl2/2.0.20+dfsg-2ubuntu1.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

 Depends: libasound2-dev, libdbus-1-dev, libdecor-0-dev, libdrm-dev, libegl1-mesa-dev, libgbm-dev, libgl-dev, libgles-dev, libglu1-mesa-dev, libibus-1.0-dev, libpulse-dev, libsdl2-2.0-0 (= 2.0.20+dfsg-2ubuntu1.22.04.1), libsndio-dev, libudev-dev, libwayland-dev, libx11-dev, libxcursor-dev, libxext-dev, libxfixes-dev, libxi-dev, libxinerama-dev, libxkbcommon-dev, libxrandr-dev, libxss-dev, libxt-dev, libxv-dev, libxxf86vm-dev, libc6 (>= 2.34), libopengl0, libx11-6

its ok now!

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :
Download full text (3.9 KiB)

upgrade log from clean jammy chroot (libsdl2-dev installed):

root@Unimatrix08-Focal:/# apt update ; apt dist-upgrade
Get:1 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-proposed InRelease [270 kB]
Hit:4 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:5 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [221 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [102 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages [23.8 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages [119 kB]
Fetched 957 kB in 2s (588 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  libdecor-0-dev libdrm-dev libdrm-intel1 libgbm-dev libpciaccess-dev libpciaccess0
The following packages will be upgraded:
  libsdl2-2.0-0 libsdl2-dev
2 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 2363 kB/2609 kB of archives.
After this operation, 1175 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libdecor-0-dev amd64 0.1.0-3build1 [5544 B]
Get:2 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libgbm-dev amd64 22.0.1-1ubuntu2.1 [9282 B]
Get:3 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 libsdl2-dev amd64 2.0.20+dfsg-2ubuntu1.22.04.1 [1767 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 libsdl2-2.0-0 amd64 2.0.20+dfsg-2ubuntu1.22.04.1 [582 kB]
Fetched 2363 kB in 0s (6058 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libdecor-0-dev:amd64.
(Reading database ... 14837 files and directories currently installed.)
Preparing to unpack .../0-libdecor-0-dev_0.1.0-3build1_amd64.deb ...
Unpacking libdecor-0-dev:amd64 (0.1.0-3build1) ...
Selecting previously unselected package libpciaccess0:amd64.
Preparing to unpack .../1-libpciaccess0_0.16-3_amd64.deb ...
Unpacking libpciaccess0:amd64 (0.16-3) ...
Selecting previously unselected package libdrm-intel1:amd64.
Preparing to unpack .../2-libdrm-intel1_2.4.110-1ubuntu1_amd64.deb ...
Unpacking libdrm-intel1:amd64 (2.4.110-1ubuntu1) ...
Selecting previously unselected package libpciaccess-dev:amd64.
Preparing to unpack .../3-libpciaccess-dev_0.16-3_amd64.deb ...
Unpacking libpciaccess-dev:amd64 (0.16-3) ...
Selecting previously unselected package libdrm-dev:amd64.
Preparing to unpack .../4-libdrm-dev_2.4.110-1ubuntu1_amd64.deb ...
Unpacking libdrm-dev:amd64 (2.4.110-1ubuntu1) ...
Selecting previously unselected package libgbm-dev:amd64.
Preparing to unpack .../5-libgbm-dev_22.0.1-1ubuntu2.1_amd64.deb ...
Unpacking libgbm-dev:amd64 (22.0.1-1ubuntu2.1) ...
Preparing to...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote (last edit ):

@Robie, I would say that missing depends on a -dev impact users since it gives you a non working environment unless you figure out you need to install extra binaries the deb isn't pulling for you

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libsdl2 - 2.0.22+dfsg-4

---------------
libsdl2 (2.0.22+dfsg-4) unstable; urgency=medium

  [ Gianfranco Costamagna ]
  * Ignore tests if the system is Ubuntu and architecture arm64,
    requiring some real new hw to complete successfully
    (workaround for LP: #1976288)

  [ Simon McVittie ]
  * d/control: Remove Sam Hocevar from Uploaders,
    with thanks for past contributions (Closes: #1011583)
  * d/tests/installed-tests: Assert that at least one test was run
  * d/control: Add missing dependencies for static linking
    (Closes: #1012088, LP: #1976198)
  * d/tests/cmake: Exercise static linking to SDL
  * Standards-Version: 4.6.1 (no changes required)
  * Only skip testatomic on Ubuntu, not the rest of the test suite.
    This lets us get at least some confidence that the package is working.

 -- Simon McVittie <email address hidden> Mon, 30 May 2022 16:43:30 +0100

Changed in libsdl2 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (libsdl2/2.0.20+dfsg-2ubuntu1.22.04.1)

All autopkgtests for the newly accepted libsdl2 (2.0.20+dfsg-2ubuntu1.22.04.1) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

ffmpeg/7:4.4.1-3ubuntu5 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#libsdl2

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Here's a counterargument.

Anyone upgrading from say middle of June on will get the same amount of packages to update regardless of whether this bug is fixed or not.

If this bug is fixed before Ubuntu 22.04.1, then anyone installing from the new release images wouldn't have anything extra to download either.

The vast majority of people that will use Ubuntu 22.04 LTS have not installed it yet.

My opinion is that this is a FTBFS kind of bug. Reverse dependencies of libsdl2-dev might not build until this bug is fixed. Is it the position of the Ubuntu SRU team that FTBFS bugs only need to get fixed in jammy-proposed and not jammy-updates?

Revision history for this message
Robie Basak (racb) wrote :

> If this bug is fixed before Ubuntu 22.04.1, then anyone installing from the new release images wouldn't have anything extra to download either.

I think that's a good reason to release updates that are staged this way prior to rolling point releases.

> My opinion is that this is a FTBFS kind of bug. Reverse dependencies of libsdl2-dev might not build until this bug is fixed.

This is hypothetical, and thus difficult for me to reason about. If there's an actual case in the archive that can be identified, then that would help me to consider this point. Right now, the only users I understand to be affected are developers attempting to use distribution packages as dependencies for builds of outside projects. To be clear, I think is a use case that ought to be supported. It's just about the trade-off involved.

> Is it the position of the Ubuntu SRU team that FTBFS bugs only need to get fixed in jammy-proposed and not jammy-updates?

It's a good question. I can't speak for the entire SRU team. I can't think of a reason that it would be necessary to push FTBFS fixes to the updates pockets, except perhaps for the point release case that you've identified above.

Anyway, I don't feel strongly about this. Feel free to remove the tag if you wish.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hello, I'm removing the tag. We are talking about an additional download of around 2MB of size.

The benefit of fixing FTBFS on unrelated software outweigh the download size to me.

tags: removed: block-proposed-jammy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

I myself also don't feel strongly in this particular case. Normally I don't want to release pure-FTBFS fixes for no good reason, but here I'll "Just Do It™" because I'm worried I'd forget about it before the point-release. Point releases have a lot of moving parts, so it's easy to miss out small things like these. Plus, 2MB of additional size should be bearable for libsdl2 consumers.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for libsdl2 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libsdl2 - 2.0.20+dfsg-2ubuntu1.22.04.1

---------------
libsdl2 (2.0.20+dfsg-2ubuntu1.22.04.1) jammy; urgency=medium

  * d/control: Add missing dependencies for static linking
    (Closes: #1012088, LP: #1976198)

 -- Gianfranco Costamagna <email address hidden> Mon, 30 May 2022 21:34:17 +0200

Changed in libsdl2 (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.