perf cannot find libperf-gtk.so although it is installed: $ perf report --gtk GTK browser requested but could not find libperf-gtk.so $ ltrace perf report --gtk 2>&1 | grep libperf-gtk dlopen("libperf-gtk.so", 1) = nil $ qlist -e perf | grep -i gtk /usr/libexec/perf-core/libperf-gtk.so It seems to be as in bug #548144 from 2015-04-29, closed as obsolete in 2020-11-19. Reproducible: Always
Indeed, at the time I could not reproduce with newer versions (it worked for me), but I just tried again with perf 6.10.4 and now I can reproduce this. Thanks for reporting, I will look into it and fix it. gentoo ~ $ perf report --gtk GTK browser requested but could not find libperf-gtk.so gentoo ~ $ qlist perf | grep gtk /usr/libexec/perf-core/libperf-gtk.so gentoo ~ $ perf version perf version 6.10.4
FWIW, I see this: gentoo ~ $ ltrace -s 128 perf report --gtk 2>&1 | grep dlopen dlopen("libperf-gtk.so", 1) = nil dlopen("/usr/libexec/perf-core/libperf-gtk.so", 1) = nil So it should have opened it the second time.
Hm, apparently not for version 6.7: ❯ perf record sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.002 MB perf.data (16 samples) ] ❯ ltrace perf report --gtk 2>&1 | grep libperf-gtk dlopen("libperf-gtk.so", 1) = nil exit(0GTK browser requested but could not find libperf-gtk.so ltrace perf report --gtk 2>&1 8.82s user 6.09s sys 92% cpu 16.127 total 11 MB RSS max grep --color=auto libperf-gtk 1.27s user 1.37s sys 16% cpu 16.125 total 11 MB RSS max ❯ perf version perf version 6.7
Sorry, my mistake missing "-s" to ltrace: ❯ ltrace -s 128 perf report --gtk 2>&1 | grep dlopen dlopen("libperf-gtk.so", 1) = nil dlopen("/usr/libexec/perf-core/libperf-gtk.so", 1) = nil
It seems that this bug is different than the previous one. There is a symbol missing, which causes dlopen to fail even when the library is found: gentoo ~ $ LD_DEBUG=symbols perf report --gtk 2>&1 | grep '(fatal)' 678815: /usr/libexec/perf-core/libperf-gtk.so: error: symbol lookup error: undefined symbol: hashmap_find (fatal) I will follow this up with upstream.