Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936029 - x11-terms/kitty: fails to dlopen object file
Summary: x11-terms/kitty: fails to dlopen object file
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-14 08:25 UTC by julianeatong
Modified: 2024-07-16 01:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build.log (build.log,455.08 KB, text/x-log)
2024-07-15 22:37 UTC, julianeatong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description julianeatong 2024-07-14 08:25:48 UTC
Describe the bug
After installing Kitty 0.35.2 on my Gentoo system, I get errors about /usr/lib64/kitty/kitty/glfw-x11.so. My system is running AMD drivers on Mesa/OpenGL with the wayland backend. I have also enabled the wayland use flag's on the package x11-terms/kitty. Once the package is down installing, kitty fails to completely open resulting in...
[0.039] Traceback (most recent call last):
File "/usr/bin/../lib64/kitty/kitty/main.py", line 562, in main
_main()
File "/usr/bin/../lib64/kitty/kitty/main.py", line 550, in _main
init_glfw(opts, cli_opts.debug_keyboard, cli_opts.debug_rendering)
File "/usr/bin/../lib64/kitty/kitty/main.py", line 144, in init_glfw
init_glfw_module(glfw_module, debug_keyboard, debug_rendering, wayland_enable_ime=opts.wayland_enable_ime)
File "/usr/bin/../lib64/kitty/kitty/main.py", line 138, in init_glfw_module
if not glfw_init(glfw_path(glfw_module), edge_spacing, debug_keyboard, debug_rendering, wayland_enable_ime):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Failed to dlopen /usr/lib64/kitty/kitty/glfw-x11.so with error: /usr/lib64/kitty/kitty/glfw-x11.so: cannot open shared object file: No such file or directory.
I have tried installing media-libs/glfw, with both the X, or Wayland use flags and still get this dlopen error, no matter if I have glfw installed or not.

To Reproduce
Steps to reproduce the behavior:

Install Kitty 0.35.2 from the Gentoo Ebuild repositories.
Use Wayland/Mesa
Getting a resulting glfw-x11.so
See error
Screenshots
If applicable, add screenshots to help explain your problem.

Environment details

Press Ctrl+Shift+F6 (cmd+option+comma on macOS) in kitty, to copy debug output about kitty and its
configuration to the clipboard and paste it here. 

On older versions of kitty, run kitty --debug-config instead
Additional context
Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.
Comment 1 Ionen Wolkens gentoo-dev 2024-07-14 10:11:04 UTC
/usr/lib64/kitty/kitty/glfw-x11.so exist for me unless I disable USE=X, and when using wayland it didn't try to use it last I tried with USE=-X (albeit been a while since I tired wayland with USE=X disabled, so maybe something broke).

Is it something that newly started happening or it never worked for you? Fwiw the current version even been stabilized and feel like someone would've mentioned earlier if it was broken.

Either way, please provide output:

emerge --info

namei -m /usr/lib64/kitty/kitty/glfw-x11.so

and kitty's build.log to see if anything strange happened
Comment 2 Ionen Wolkens gentoo-dev 2024-07-14 10:20:31 UTC
(In reply to Ionen Wolkens from comment #1)
> (albeit been a while since I tired wayland with USE=X
> disabled, so maybe something broke).
Actually just tried now, still works fine with wayland regardless of if USE=X is enabled or not (under plasma 6 anyway).
Comment 3 Ionen Wolkens gentoo-dev 2024-07-14 10:26:41 UTC
Oh, also please output of

lddtree /usr/lib64/kitty/kitty/glfw-x11.so

Guess it's possible the shared libraries it's using went missing and giving a misleading error. Could happen if force removed some libraries or some dependency is wrong.
Comment 4 julianeatong 2024-07-14 22:12:20 UTC
Here is the output of emerge --info
Portage 3.0.65 (python 3.12.3-final-0, default/linux/amd64/23.0/systemd, gcc-13, glibc-2.39-r6, 6.5.8-arch1-1 x86_64)
=================================================================
System uname: Linux-6.5.8-arch1-1-x86_64-AMD_Ryzen_7_7840HS_w-_Radeon_780M_Graphics-with-glibc2.39
KiB Mem:    65011280 total,  60195996 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 14 Jul 2024 07:30:00 +0000
Head commit of repository gentoo: 2b4e08e644f622b7a360c2d016a85d461189abef
Timestamp of repository guru: Sun, 14 Jul 2024 00:48:43 +0000
Head commit of repository guru: e3a55397ad2a01b447da57979e9eb81d32a11242

sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.12.3-r1::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.7-r1::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: #rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 3

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: 
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 
    sync-uri: 

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=znver4 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/portage/make.conf /etc/portage/package.use /etc/portage/package.use/* /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d"s

This is from a chroot, under arch as I can not get the terminal emulator working at all in my normal system.
Comment 5 julianeatong 2024-07-14 22:13:55 UTC
CXXFLAGS="-O2 -march=znver4 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -march=znver4 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=znver4 -pipe"
GENTOO_MIRRORS=
LANG="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8 -l7"
PKGDIR="/var/cache/binpkgs"
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="/var/tmp"
SHELL="/usr/bin/zsh"
USE="amd64 cet libtirpc test-rust wayland" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 avx512_bf16 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 6 julianeatong 2024-07-14 22:14:21 UTC
f: /usr/lib64/kitty/kitty/glfw-x11.so
 drwxr-xr-x /
 drwxr-xr-x usr
 drwxr-xr-x lib64
 drwxr-xr-x kitty
 drwxr-xr-x kitty
             glfw-x11.so - No such file or directory
lddtree /usr/lib64/kitty/kitty/glfw-x11.so
lddtree: /usr/lib64/kitty/kitty/glfw-x11.so: file does not exist
Comment 7 Ionen Wolkens gentoo-dev 2024-07-15 00:27:06 UTC
Do you not have USE=X right now? (you did mention trying it) -- the file "shouldn't" be missing entirely if it's enabled and only gets yanked with USE=-X. Can't see what's enabled or what happened given still missing kitty's build.log.

Also seeing what kind of error you get when the file exists may be more interesting. I assume wayland failed for some reason, and then it tried x11 which also failed regardless of if glfw-x11.so exists or not.

Does, e.g. x11-apps/mesa-progs' glxgears works? Just to see if acceleration/xwayland works.

Also just to be sure, you're not trying to make it work from a chroot, and we're talking about the normal system right? (need extra steps to access the display in a chroot)
Comment 8 julianeatong 2024-07-15 22:37:02 UTC
Created attachment 897751 [details]
Build.log
Comment 9 Ionen Wolkens gentoo-dev 2024-07-16 01:13:22 UTC
That build log is with USE=-X (and also seems truncated?), so you'd obviously be missing that file. I was mostly curious whether it was being deleted even with USE=X, but I guess it's not.

I do assume it simply failed to use wayland for some reason and then fell back to use x11, but given you have it disabled it cannot load glfw-x11.so (for me it works fine with wayland with USE="wayland -X", so I don't know what's the issuef or you). That aside, generally I wouldn't disable USE=X on packages even if you use wayland, it allows them use xwayland when necessary.

You will likely need to debug this on your side given I don't think there's anything wrong with the packaging so far, please also see other things I said in comment #7.