Skip to content

Commit

Permalink
games-util/steam-client-meta: Make libudev-compat[abi_x86_32] dep unc…
Browse files Browse the repository at this point in the history
…onditional

This works around the libgudev compatibility issue. There is more than one way
to work around it, but this seems like the best.

Closes: #336
Closes: https://bugs.gentoo.org/910699
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
  • Loading branch information
chewi committed Aug 7, 2023
1 parent f5d8189 commit 6641eea
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -20,6 +20,7 @@ IUSE="+desktop-portal +dialogs +pulseaudio +steamruntime steamvr trayicon video_
# find ~/.steam/root/ -exec readelf -d {} + 2>/dev/null | grep Shared | sort -u | fgrep -v -f <(ls -1 ~/.steam/root/ubuntu12_32/)

RDEPEND="
sys-libs/libudev-compat[abi_x86_32]
virtual/opengl[abi_x86_32]
virtual/ttf-fonts
Expand Down Expand Up @@ -50,23 +51,21 @@ RDEPEND="
media-libs/fontconfig[abi_x86_32]
media-libs/freetype[abi_x86_32]
media-libs/libpng-compat:1.2[abi_x86_32]
media-libs/libva:0/2[abi_x86_32]
media-libs/openal[abi_x86_32]
media-video/pipewire:0/0.4[abi_x86_32]
net-misc/curl[abi_x86_32]
net-misc/networkmanager[abi_x86_32]
net-print/cups[abi_x86_32]
sys-apps/dbus[abi_x86_32,X]
sys-libs/libudev-compat[abi_x86_32]
sys-libs/zlib[abi_x86_32]
virtual/libusb[abi_x86_32]
x11-libs/gdk-pixbuf[abi_x86_32]
x11-libs/gtk+:2[abi_x86_32,cups]
x11-libs/libICE[abi_x86_32]
x11-libs/libSM[abi_x86_32]
media-libs/libva:0/2[abi_x86_32]
x11-libs/libvdpau[abi_x86_32]
x11-libs/libX11[abi_x86_32]
x11-libs/libXScrnSaver[abi_x86_32]
x11-libs/libXcomposite[abi_x86_32]
x11-libs/libXcursor[abi_x86_32]
x11-libs/libXdamage[abi_x86_32]
Expand All @@ -76,6 +75,7 @@ RDEPEND="
x11-libs/libXinerama[abi_x86_32]
x11-libs/libXrandr[abi_x86_32]
x11-libs/libXrender[abi_x86_32]
x11-libs/libXScrnSaver[abi_x86_32]
x11-libs/libXtst[abi_x86_32]
x11-libs/pango[abi_x86_32]
Expand Down

7 comments on commit 6641eea

@stefan11111
Copy link

Choose a reason for hiding this comment

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

I know that steam needed some libudev symbols to function properly.
From what I can see, this isn't the case anymore.
I don't know how this change affects users who use udev.
I don't use udev and instead use a static /dev, so I've had to work around this issue myself.

@chewi
Copy link
Collaborator Author

@chewi chewi commented on 6641eea Aug 7, 2023

Choose a reason for hiding this comment

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

I did this based on this post from a month ago and a discussion I had on IRC. I don't think the situation has changed since. This will force you to have udev installed (with or without systemd) but that was probably already the case anyway. Perhaps you were avoiding it by using the Steam runtime, but is an old Ubuntu version of libudev better than a newer Gentoo one? I don't think it forces you to actually use udev either way.

@stefan11111
Copy link

Choose a reason for hiding this comment

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

I was doing this until today when I found out that steam works without libudev:
https://forums.gentoo.org/viewtopic-t-1161822-highlight-steam.html
When I made those posts, steam would open but be unusable without a libudev shared library and some symbols defined in it.
I wrote this to work around the issue:
https://github.com/stefan11111/fake-libudev
However, when I noticed the new package to be installed, I removed my version of libudev(and didn't install libudev-compat) and tried running steam. This time, everything worked, so valve must have fixed something between when I wrote those posts on the Gentoo forum and today.
I am using steam runtime, so that probably one reason I got away with using steam and no udev.
I don't have udev installed.
I will try to build steam without steam runtime and report back.

As for how I'll deal with this, libudev-compat doesn't have any systemd code in it by itself, so if it's needed, I'll just have it not link to any systemd code or keep using my version. For now, I have added it to my package.provided.

@chewi
Copy link
Collaborator Author

@chewi chewi commented on 6641eea Aug 8, 2023

Choose a reason for hiding this comment

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

Thanks, that's interesting. I've asked in the Valve thread whether they believe this is still an issue or not.

@chewi
Copy link
Collaborator Author

@chewi chewi commented on 6641eea Aug 8, 2023

Choose a reason for hiding this comment

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

I've had a reply from Simon at Collabora, who is the expert in this area, and he says there are several factors that can determine whether you are affected or not, so you may have just got lucky. He says that the approach I have taken is the best option for Gentoo. The issue may get fixed in the next Steam beta.

@stefan11111
Copy link

Choose a reason for hiding this comment

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

I tried to install steam without steamruntime.
Steam depends on pipewire, which depends on libudev, so that's the problem.
I assume you have both udev and libgudev installed. What is pulling in libgudev on your system? From the threads linked, it seems like the problem is with libgudev.

@chewi
Copy link
Collaborator Author

@chewi chewi commented on 6641eea Aug 16, 2023

Choose a reason for hiding this comment

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

It's these.

gnome-base/gvfs-1.50.4-r1 (udev ? >=dev-libs/libgudev-147)
media-gfx/gimp-2.10.34-r2 (udev ? dev-libs/libgudev)
media-libs/gst-plugins-base-1.22.3 (gbm ? >=dev-libs/libgudev-147)
media-plugins/gst-plugins-v4l2-1.22.3 (udev ? >=dev-libs/libgudev-208)
sys-fs/udisks-2.9.4-r1 (>=dev-libs/libgudev-165:0/0)
sys-power/upower-0.99.20 (kernel_linux ? >=dev-libs/libgudev-236)
x11-misc/colord-1.4.6-r1 (dev-libs/libgudev)

I don't think Steam itself uses libgudev directly. It's only a problem because if something does load it then that loads libudev.so.1 before libudev.so.0, which causes the problem.

Please sign in to comment.