anyc / steam-overlay

Gentoo overlay for Valve's Steam client and Steam-based games
GNU General Public License v2.0
201 stars 44 forks source link

Store and Community tabs are black when using native runtime #230

Closed gcarq closed 5 years ago

gcarq commented 5 years ago

I'm getting a black screen when opening the Store and Community tabs while using the native runtime. This issue doesn't occur when using the steam runtime.

The logs suggest the issue comes from x11-libs/pango when opening the mentioned tabs:

./steamwebhelper: symbol lookup error: /usr/lib64/libpangoft2-1.0.so.0: undefined symbol: hb_buffer_set_cluster_level

The related packages are built as follow:

$ emerge --info games-util/steam-meta media-libs/freetype media-libs/harfbuzz x11-libs/cairo x11-libs/pango
Portage 2.3.62 (python 3.6.8-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-8.3.0, glibc-2.29-r2, 5.0.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.7-gentoo-x86_64-AMD_Ryzen_7_1800X_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32879692 total,  18541264 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 08 Apr 2019 20:30:01 +0000
Head commit of repository gentoo: 7a4ffbffc1336d3036ce4339691ac533212d2bc4
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p1) 2.32.0
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.8::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

localrepo
    location: /usr/local/portage
    masters: gentoo

gcarq
    location: /var/lib/layman/gcarq
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j10 --load-average 14.4"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs candy ccache clean-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now -O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition"
MAKEOPTS="-j10"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac acl acpi alsa amd64 amdgpu bash-completion berkdb branding bzip2 cairo cdda cdr cli crypt cryptsetup cups custom-cflags cxx dbus declarative dri dts dvd dvdr emboss encode exif fam flac fortran gdbm gif glamor graphite grub gtk iconv jit jpeg kde khronos-headers kipi kwallet lcms libnotify libtirpc lm_sensors lto mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opencl opengl openmp pam pango pcre pdf pgo phonon plasma png policykit ppds pulseaudio qml qt5 readline sdl seccomp spell ssl startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-1" POSTGRES_TARGETS="postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

games-util/steam-meta-0-r20160817::steam-overlay was built with the following:
USE="-steamruntime" ABI_X86="(64)"

media-libs/freetype-2.9.1-r3::gentoo was built with the following:
USE="X adobe-cff bzip2 cleartype_hinting png -bindist -debug -doc -fontforge -harfbuzz -infinality -static-libs -utils" ABI_X86="32 (64) (-x32)"
CFLAGS="-O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition -fno-strict-aliasing -fno-strict-aliasing"
CXXFLAGS="-O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition -fno-strict-aliasing -fno-strict-aliasing"

media-libs/harfbuzz-2.3.1::gentoo was built with the following:
USE="cairo glib graphite icu introspection truetype -debug -static-libs -test" ABI_X86="32 (64) (-x32)"
CXXFLAGS="-O2 -pipe -march=native -flto=5 -fuse-linker-plugin -ftree-vectorize -ftree-slp-vectorize -fno-semantic-interposition -std=c++14"

x11-libs/cairo-1.16.0-r3::gentoo was built with the following:
USE="X glib opengl svg xcb (-aqua) -debug (-gles2) -static-libs -utils -valgrind" ABI_X86="32 (64) (-x32)"

x11-libs/pango-1.42.4::gentoo was built with the following:
USE="X introspection -test" ABI_X86="32 (64) (-x32)"
chewi commented 5 years ago

Thanks for reporting. Evidently these libraries aren't as compatible as I'd hoped. Your flags look the same as mine so I'll try to determine is a particular version is needed.

gcarq commented 5 years ago

Thanks for the quick response. Let me know if I should test with a specific pango version.

chewi commented 5 years ago

Okay, I see what's happened. I didn't LD_PRELOAD libharfbuzz.so.0 as it's not a direct dependency of libcef.so, which is what I'm trying to satisfy. The problem is that steamwebhelper still adds the ubuntu12_64 directory to the front of LD_LIBRARY_PATH so /usr/lib64/libpangoft2-1.0.so.0 picks up the bundled libharfbuzz.so.0 instead. I wanted to avoid preloading too many libraries as that can also cause problems but it may be unavoidable. I'll try to think up another trick to make this work better.

chewi commented 5 years ago

I've just pushed a libsteam-preload branch to this overlay. Please could you test out the change I've made in steam-launcher-1.0.0.59-r2.

gcarq commented 5 years ago

I checked out the libsteam-preload branch and installed the ebuild with:

# ebuild steam-launcher/steam-launcher-1.0.0.59-r2.ebuild merge

The merge process was successful, however at first I had an issue with libdl when I started steam:

$ steam
id: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
readlink: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
dirname: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
Repairing installation, linking /home/michi/.steam/steam to /home/michi/.local/share/Steam
rm: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
readlink: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
dirname: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
Setting up Steam content in /home/michi/.local/share/Steam
mkdir: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
tar: symbol lookup error: /usr/lib64/libsteam-preload.so: undefined symbol: dlsym
Failed to extract /usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz, aborting installation.

Linking libsteam-preload.so against libdl fixed the start up error:

diff --git a/games-util/steam-launcher/steam-launcher-1.0.0.59-r2.ebuild b/games-util/steam-launcher/steam-launcher-1.0.0.59-r2.ebuild
index a4cfc01..c378ee3 100644
--- a/games-util/steam-launcher/steam-launcher-1.0.0.59-r2.ebuild
+++ b/games-util/steam-launcher/steam-launcher-1.0.0.59-r2.ebuild
@@ -113,7 +113,7 @@ src_prepare() {

 src_compile() {
        $(tc-getCC) ${CFLAGS} ${LDFLAGS} -fPIC -DGLIBDIR="${EPREFIX}/usr/$(get_libdir)" -shared \
-                               -Wl,-soname=libsteam-preload.so -o libsteam-preload.so "${FILESDIR}"/libsteam-preload.c || die
+                               -Wl,-soname=libsteam-preload.so -o libsteam-preload.so "${FILESDIR}"/libsteam-preload.c -ldl || die
 }

 src_install() {

With that diff everything works as expected and the Store and Community tabs are visible. Thanks!

chewi commented 5 years ago

D'oh, should have remembered that! I wonder why it worked for me. Thanks for following it through, I'll get it fixed up shortly.

chewi commented 5 years ago

In master now.