Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937869 - dev-util/perf-6.7: GTK browser requested but could not find libperf-gtk.so
Summary: dev-util/perf-6.7: GTK browser requested but could not find libperf-gtk.so
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Guilherme Amadio
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-13 11:46 UTC by Stefan Huber
Modified: 2024-08-15 06:51 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2024-08-13 11:46:12 UTC
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
Comment 1 Guilherme Amadio gentoo-dev 2024-08-14 06:58:28 UTC
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
Comment 2 Guilherme Amadio gentoo-dev 2024-08-14 07:11:15 UTC
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.
Comment 3 Stefan Huber 2024-08-14 07:53:26 UTC
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
Comment 4 Stefan Huber 2024-08-14 07:55:49 UTC
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
Comment 5 Guilherme Amadio gentoo-dev 2024-08-15 06:51:23 UTC
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.