libsdl2:i386 isn't installable on 64-bit systems with newer graphics stack

Bug #1536081 reported by Seth Dusek
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libsdl2 (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
High
Gianfranco Costamagna

Bug Description

[Impact]
* People can't use libsdl2 multiarch libraries when lts-* stacks are installed

[Test Case]
* Install libsdl2 and libsdl2:i386 with *-mesa-lts-* stacks

[Regression Potential]
* None, this is a one-time runtime relax fix, that is just needed here
(xenial has a replacement for the binaries, not new packages, and hwe stack replaces the previous one).

Only trusty is affected, and this just relax such dependency because of the new packages introduced.

[Other info]
Basically, I need libsdl2:i386 for witcher2, but I can't because when I try to install it this happens

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdl2-2.0-0:i386 : Depends: libwayland-egl1-mesa:i386 (>= 10.0.2) or
                               libwayland-egl1:i386
E: Unable to correct problems, you have held broken packages

I am on nvidia drivers, so obviously I cant use mesa.

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

this should be fixed in xenial, I tried and it seems to be working correctly.

Changed in libsdl2 (Ubuntu):
status: New → Fix Released
Revision history for this message
Seth Dusek (shibe-s) wrote :

Yes but it isn't fixed on trusty and I need to get it to work on trusty

Vlad Orlov (monsta)
tags: added: trusty
Revision history for this message
Vlad Orlov (monsta) wrote :

Yes, it's completely valid bug in Trusty for users of 64-bit systems who want to install 32-bit version of libsdl2.

The problem lies in the latest graphics stack backported from Utopic/Vivid/Wily. The workaround is to manually install the right 32-bit libwayland-egl1-mesa-lts-* package. Check which graphics stack you have:

- if you have libwayland-egl1-mesa-lts-utopic, install libwayland-egl1-mesa-lts-utopic:i386
- if you have libwayland-egl1-mesa-lts-vivid, install libwayland-egl1-mesa-lts-vivid:i386
- if you have libwayland-egl1-mesa-lts-wily, install libwayland-egl1-mesa-lts-wily:i386

And of course, Xenial isn't affected by this problem at all because it's the latest version, and surely there are no any graphics stack backports. So labeling this issue as 'fixed in Xenial' is simply technically incorrect.

Revision history for this message
Vlad Orlov (monsta) wrote :

Seth, I think you can re-label it as 'Confirmed' (because you're the reporter).

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

this will require a lot of work to be working on trusty. A release distro can't handle changes like this one.

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

you can use a ppa instead.

Revision history for this message
Vlad Orlov (monsta) wrote :

Why lot of work?

I just made it depend on virtual package libwayland-egl1 instead of current libwayland-egl1-mesa (>= 10.0.2) | libwayland-egl1
and that seemed to do the trick. That virtual package is provided by libwayland-egl1-mesa and all three libwayland-egl1-mesa-lts-* packages, so it should be fine.

Revision history for this message
Vlad Orlov (monsta) wrote :

Here's the debdiff with my changes.

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

subscribing sponsors, I don't have enough knowledge to test this patch, even if it seems good to me

Revision history for this message
Vlad Orlov (monsta) wrote :

Can you also mark this bug as 'Confirmed' instead of 'Fix Released'? It's not really fixed; in the future, when Xenial gets new graphics stacks from Xenial+1, Xenial+2, etc., we'll see it all again. :-/

Changed in libsdl2 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Vlad Orlov (monsta) wrote :

Thanks.

BTW, it's actually easy to test:
1. Have 64-bit Trusty installation with some new graphics stack (I've tested in Xubuntu 14.04.4 with *-lts-wily stack).
2. Install libsdl2-2.0-0.
3. Try to install libsdl2-2.0-0:i386.

Without the fix, apt will apparently try to install libwayland-egl1-mesa:i386.

The following packages have unmet dependencies:
 libsdl2-2.0-0:i386 : Depends: libwayland-egl1-mesa:i386 (>= 10.0.2) or
                               libwayland-egl1:i386
E: Unable to correct problems, you have held broken packages

It isn't possible as libwayland-egl1-mesa-lts-wily:amd64 is installed, and so libwayland-egl1-mesa-lts-wily:i386 is needed instead of libwayland-egl1-mesa:i386.

With the fix applied, libwayland-egl1-mesa-lts-wily:i386 will be chosen and the installation of libsdl2-2.0-0:i386 should succeed.

Vlad Orlov (monsta)
tags: added: patch
Mathew Hodson (mhodson)
Changed in libsdl2 (Ubuntu):
importance: Undecided → Medium
Mathew Hodson (mhodson)
Changed in libsdl2 (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti)
Changed in libsdl2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Vlad Orlov (monsta) wrote :

Would be nice to get it patched not only in Trusty, but in Xenial as well - for the future backports of graphics stacks from Yakkety and next releases.

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

well, libsdl2 is fixed in some different ways I guess.

Mathew Hodson (mhodson)
Changed in libsdl2 (Ubuntu Trusty):
importance: Undecided → Medium
Mathew Hodson (mhodson)
tags: added: packaging
Mathew Hodson (mhodson)
tags: added: unmetdeps
removed: packaging
Revision history for this message
Robie Basak (racb) wrote :

Thank you for the patch and sorry for the delay. We're making an effort to clear out languishing items in the sponsorship queue today.

The patch looks mostly OK but the bug needs SRU information before the patch can be uploaded. See https://wiki.ubuntu.com/StableReleaseUpdates#Procedure for details.

I'm trying to get an initial response to as many outstanding requests today as I can, so I'll move on for now. But I'll mark this as one to come back to if we have time today. If we don't get to it, please try to follow the SRU procedure if you can and then resubscribe ~ubuntu-sponsors to the bug when done.

Revision history for this message
Vlad Orlov (monsta) wrote :

[Impact]

The bug prevents users from installing libsdl2:i386 on 64-bit systems with newer graphics stack (in particular, libwayland-egl1-mesa-lts-* package).

32-bit libsdl2 is usually needed for games or gaming console emulators, or Wine, or some proprietary software which only comes in 32-bit packages.

The debdiff which is attached to this report contains the patch which fixes the problem.
It makes libsdl2 explicitly depend on virtual package libwayland-egl1 which is provided by libwayland-egl1-mesa and all libwayland-egl1-mesa-lts-* packages.
That allows installing libsdl2:i386 with any graphics stacks available in Trusty repos.

[Test Case]

Steps to reproduce:

- have 64-bit Trusty installation with some new graphics stack
- install libsdl2-2.0-0
- try to install libsdl2-2.0-0:i386

Expected result:

- libsdl2-2.0-0:i386 is installed successfully

What really happens:

- apt-get shows error message about unmet dependencies:

The following packages have unmet dependencies:
 libsdl2-2.0-0:i386 : Depends: libwayland-egl1-mesa:i386 (>= 10.0.2) or
                               libwayland-egl1:i386
E: Unable to correct problems, you have held broken packages

Apparently, apt-get always chooses to install libwayland-egl1-mesa:i386 which is impossible as libwayland-egl1-mesa-lts-*:amd64 is installed, so libwayland-egl1-mesa-lts-*:i386 is needed instead.
That's why explicit dependency on libwayland-egl1 (virtual package) is added in the patch.

[Regression Potential]

I've tested the patch with the graphics stack from Wily before, and now also tested with Xenial's stack.
It works fine with both.

The patch only adds one new dependency on a virtual package which is already provided in all graphics stacks.
I don't think there could be a place for regressions there.

Vlad Orlov (monsta)
summary: - libsdl2:i386 needs egl-mesa
+ libsdl2:i386 isn't installable on 64-bit systems with newer graphics
+ stack
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

sorry, but I can't accept this patch.

First: this breaks people not using the lts stack (or the hwe one in xenial), second, something in the dependency chain is built against the old stack

e.g.: installing the libsdl2-dev:i386 package on a xenial chroot with -hwe enabled, results in:

dependencies not satisfied:
apt-get install libegl1-mesa-dev:i386 libmirclient-dev:i386 libmircommon-dev:i386 libxkbcommon-dev:i386

The following packages will be REMOVED:
  libegl1-mesa-dev libgles2-mesa-dev libmirclient-dev libmircommon-dev libsdl2-dev libxkbcommon-dev

so, if you really want them coinstallable, at least libxkbcommon-dev needs to become multiarch ready, and this will be "fixed" at least for next ubuntu releases.

BTW that -lts-* renaming has been removed in xenial+ releases, now the updates have the same name, so it should be affecting only trusty right now.
(and I don't honestly plan to put all this effort in fixing trusty, I would appreciate if you can confirm xenial is ok)

Changed in libsdl2 (Ubuntu Trusty):
status: New → Incomplete
Revision history for this message
Vlad Orlov (monsta) wrote :

Hmm, it should not break with the original stack, otherwise the patch wouldn't be useful. Just in case, I decided to test it by downgrading the graphics stack from Xenial to the default one. Installed the original kernel too (though it shouldn't matter here). Both libsdl2-2.0-0 and libsdl2-2.0-0:i386 were left installed, as expected. How did you test it to make something break?

As for -dev packages, isn't it a separate issue that's already present? I think I've seen this somewhere: someone tries to install -dev:i386 of some library, but it conflicts with -dev:amd64. I just reproduced it by trying to install libwayland-dev:i386 - it wants to remove libwayland-dev:amd64.

I know about new -hwe scheme in Xenial. But this patch isn't meant for Xenial. It's only for Trusty. But anyway, -hwe packages in Xenial are currently only for kernel and xorg. I don't see any -hwe packages for libwayland-egl1-mesa, for example.

Revision history for this message
Vlad Orlov (monsta) wrote :

Speaking of multiarch issue, libsdl2-dev isn't multiarch-compatible as it has /usr/bin/sdl2-config, a script that has hardcoded arch-specific library paths inside. This has to be fixed separately as it's not related to dependencies on -lts or -hwe packages.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :
Download full text (5.6 KiB)

This works in xenial:
apt-get install libgl1-mesa-dev libwayland-dev libwayland-egl1-mesa libgl1-mesa-dev:i386 libwayland-dev:i386 libwayland-egl1-mesa:i386 libsdl2-2.0-0 libsdl2-2.0-0:i386

root@Unimatrix04-Xenial:/# dpkg -l |grep mesa
ii libegl1-mesa:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the EGL API -- runtime
ii libegl1-mesa:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the EGL API -- runtime
ii libgl1-mesa-dev:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dev:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dri:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-dri:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- GLX runtime
ii libgl1-mesa-glx:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- GLX runtime
ii libglapi-mesa:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the GL API -- shared library
ii libglapi-mesa:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the GL API -- shared library
ii libwayland-egl1-mesa:amd64 17.0.7-0ubuntu0.16.04.1 amd64 implementation of the Wayland EGL platform -- runtime
ii libwayland-egl1-mesa:i386 17.0.7-0ubuntu0.16.04.1 i386 implementation of the Wayland EGL platform -- runtime
ii mesa-common-dev:amd64 17.0.7-0ubuntu0.16.04.1 amd64 Developer documentation for Mesa
ii mesa-common-dev:i386 17.0.7-0ubuntu0.16.04.1 i386 Developer documentation for Mesa
root@Unimatrix04-Xenial:/# dpkg -l |grep mesa
ii libegl1-mesa:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the EGL API -- runtime
ii libegl1-mesa:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the EGL API -- runtime
ii libgl1-mesa-dev:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dev:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- GLX development files
ii libgl1-mesa-dri:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-dri:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- DRI modules
ii libgl1-mesa-glx:amd64 17.0.7-0ubuntu0.16.04.1 amd64 free implementation of the OpenGL API -- GLX runtime
ii libgl1-mesa-glx:i386 17.0.7-0ubuntu0.16.04.1 i386 free implementation of the OpenGL API -- GLX runtime
ii libglapi-mesa:...

Read more...

Revision history for this message
Vlad Orlov (monsta) wrote :

Yes, this works because there are no -hwe packages for Mesa/Wayland libs. The existing packages were updated via xenial-updates instead.

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

so, no issue for xenial, good!

in the meanwhile libsdl2-dev is becoming multiarch:
https://anonscm.debian.org/cgit/pkg-sdl/packages/libsdl2.git/commit/?id=d461026ee1fcbc930d51c6ce51d343ef9ef7fcc2

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

trusty machine:
# dpkg --add-architecture i386
# apt-get update

add my ppa:
https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa/

$ apt-get install libsdl2-2.0-0 libsdl2-2.0-0:i386 libegl1-mesa-lts-xenial:i386 libegl1-mesa-lts-xenial
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsdl2-2.0-0 is already the newest version.
libsdl2-2.0-0:i386 is already the newest version.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libegl1-mesa : Conflicts: libegl1-x11
                Conflicts: libegl1-x11:i386
 libegl1-mesa:i386 : Conflicts: libegl1-x11
                     Conflicts: libegl1-x11:i386
 libegl1-mesa-lts-xenial : Conflicts: libegl1-mesa
                           Conflicts: libegl1-mesa:i386
                           Conflicts: libegl1-x11
                           Conflicts: libegl1-x11:i386
 libegl1-mesa-lts-xenial:i386 : Conflicts: libegl1-mesa
                                Conflicts: libegl1-mesa:i386
                                Conflicts: libegl1-x11
                                Conflicts: libegl1-x11:i386
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

if we can solve this, I think I can sponsor it

Revision history for this message
Vlad Orlov (monsta) wrote :

Hmm but it says it's already installed?

> libsdl2-2.0-0 is already the newest version.
> libsdl2-2.0-0:i386 is already the newest version.

Revision history for this message
Vlad Orlov (monsta) wrote :

Is it a machine with the default Trusty stack? I think you'd need to install xserver-xorg-lts-xenial and libwayland-egl1-mesa-lts-xenial at the same time then, and maybe add even more packages to it:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Ubuntu_14.04_LTS_-_Trusty_Tahr

Revision history for this message
Vlad Orlov (monsta) wrote :

Or try this:

$ sudo apt-get install libwayland-egl1-mesa-lts-xenial libwayland-egl1-mesa-lts-xenial:i386 xserver-xorg-lts-xenial xserver-xorg-core-lts-xenial

I don't get any conflicts from that, either w/o libsdl2 at all, or with it installed from your PPA.

Changed in libsdl2 (Ubuntu Trusty):
status: Incomplete → In Progress
assignee: nobody → LocutusOfBorg (costamagnagianfranco)
importance: Medium → High
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Ok, this is fine for me now, I uploaded the fix in trusty, now release team will have a look

description: updated
Revision history for this message
Vlad Orlov (monsta) wrote :

Thanks, waiting for it to land in -proposed.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Seth, or anyone else affected,

Accepted libsdl2 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libsdl2/2.0.2+dfsg1-3ubuntu1.2 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 and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

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

Changed in libsdl2 (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-trusty
Revision history for this message
Vlad Orlov (monsta) wrote :

Testing in 64-bit Trusty VM with lts-xenial stack installed, including kernel, xorg and mesa.

Test 1:

- remove my locally built libsdl2-2.0-0 and libsdl2-2.0-0:i386
- install these packages from trusty-proposed (2.0.2+dfsg1-3ubuntu1.2)
- all good, no conflicts, packages installed successfully

Test 2:

- remove libsdl2-2.0-0:i386
- remove 32-bit mesa packages:
  libegl1-mesa-lts-xenial:i386
  libgbm1-lts-xenial:i386
  libgl1-mesa-dri-lts-xenial:i386
  libwayland-egl1-mesa-lts-xenial:i386
- install libsdl2-2.0-0:i386 again
- all good, lts-xenial:i386 mesa packages are pulled in again,
  no attempts to install the default Trusty mesa stack

Revision history for this message
Vlad Orlov (monsta) wrote :

One more test to make sure everything works with the default Trusty stack as well.
Install the default Trusty packages for xorg and mesa/wayland, replacing Xenial ones:

$ sudo apt-get install libwayland-egl1-mesa libwayland-egl1-mesa:i386 xserver-xorg xserver-xorg-core xserver-xorg-video-all xserver-xorg-input-all virtualbox-guest-x11 virtualbox-guest-dkms virtualbox-guest-utils

All went good, both libsdl2-2.0-0 and libsdl2-2.0-0:i386 were left intact.

----

Since it's a VM, explicit installation of virtualbox-guest-* packages is needed. Changing the graphics stack removes lts-xenial guest additions packages, but the default ones aren't pulled in automatically. This part isn't needed on baremetal of course.

tags: added: verification-done verification-done-trusty
removed: verification-needed verification-needed-trusty
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

I can confirm the virtualbox part, being the vbox maintainer and the person who created such packages :)

Revision history for this message
Vlad Orlov (monsta) wrote :

Yes, I remember bug 1424769 :)

Revision history for this message
Vlad Orlov (monsta) wrote :

Something's wrong... the package is stuck in the "Done" queue for a week, since 18th August.

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

just wait, a week is the minimum time to wait for a fix go in release

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

This bug was fixed in the package libsdl2 - 2.0.2+dfsg1-3ubuntu1.2

---------------
libsdl2 (2.0.2+dfsg1-3ubuntu1.2) trusty; urgency=medium

  * Explicitly depend on virtual package libwayland-egl1 to avoid
    multiarch issues with new graphics stacks (LP: #1536081).

 -- Vlad Orlov <email address hidden> Tue, 19 Apr 2016 14:43:45 +0300

Changed in libsdl2 (Ubuntu Trusty):
status: Fix Committed → Fix Released
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 has now been 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
Vlad Orlov (monsta) wrote :

Thanks to everyone involved :)

Revision history for this message
iSage (isage-dna) wrote :

That's great and all, except it's (now) broken in xenial when you try to install both libsdl2-dev and libsdl2-dev:i386:
The following packages have unmet dependencies:
 libsdl2-dev:i386 : Depends: libegl1-mesa-dev:i386 but it is not going to be installed
                    Depends: libgles2-mesa-dev:i386 but it is not going to be installed
                    Depends: libmirclient-dev:i386 but it is not going to be installed
                    Depends: libxkbcommon-dev:i386 but it is not going to be installed

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

This is because of hwe stack :/

Revision history for this message
Flyte (o-launchpad-net) wrote :

> This is because of hwe stack :/

What does that mean? Is there a way to install both libsdl2-dev:amd64 and libsdl2-dev:i386 on xenial?

As far as I can tell my machine uses linux-generic and not linux-hwe-generic and I have the same issue. Is there a way to work around this?

Thanks

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

This is due probably to xorg-hwe and mesa-hwe, not to linux-hwe.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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