Summary: | dev-util/perf-5.4.20 : ui/.../gtk.h:8:10: fatal error: gtk/gtk.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Naohiro Aota <naota> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | alexander, dlan, gmt, hjckr, oli.huber, peter.volkov, sandino |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
dev-util:perf-5.4.20:20200224-131917.log emerge-history.txt environment etc.portage.tbz2 |
Description
Toralf Förster
2020-02-24 19:13:11 UTC
Created attachment 615628 [details]
emerge-info.txt
Created attachment 615630 [details]
dev-util:perf-5.4.20:20200224-131917.log
Created attachment 615632 [details]
emerge-history.txt
Created attachment 615634 [details]
environment
Created attachment 615636 [details]
etc.portage.tbz2
Same happened to me also. Same here. The problem is that the feature detection fails to fail properly. There's a proper fix in tip: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=93e843f95f095aeb533ab67ac4718f848d38dfa0 Alternatively add an EXTRA_CFLAG for now: @@ -166,7 +167,7 @@ perf_make() { emake V=1 VF=1 \ CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ prefix="${EPREFIX}/usr" bindir_relative="bin" \ - EXTRA_CFLAGS="${CFLAGS}" \ + EXTRA_CFLAGS="${CFLAGS} -Wno-deprecated-declarations" \ ARCH="${arch}" \ JDIR="${java_dir}" \ LIBCLANGLLVM=$(usex clang 1 "") \ I noticed that after fixing the build actually trying to run the GTK UI resulted in failures to load libperf-gtk.so. Plenty of rebuilding and debugging yielded that apparently default portage LDFLAGS are to blame, since a plain kernel-tree build works (after patching for other bugs, of course). For more success hard-use working LDFLAGS stolen from the default in-tree build. I couldn't get filter-ldflags or EXTRA_LDFLAGS to work properly - the magic bit here is probably the -E: @@ -167,6 +168,7 @@ perf_make() { emake V=1 VF=1 \ CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" LD="$(tc-getLD)" \ prefix="${EPREFIX}/usr" bindir_relative="bin" \ + LDFLAGS="-Wl,-E,-z,noexecstack" \ EXTRA_CFLAGS="${CFLAGS} -Wno-deprecated-declarations" \ ARCH="${arch}" \ JDIR="${java_dir}" \ One also may want to apply the following, otherwise exiting the GTK UI will balk with a missing symbol: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=604e2139a1026793b8c2172bd92c7e9d039a5cf0 I'm looking into arch pkgbuild that is working: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/linux-tools Maybe upgrading to version 5.5 should solve the issues, applying the necessary patches provided by upstream. For me only upgrade worked: --- perf-5.4.20.ebuild 2020-02-15 18:54:58.379457505 +0100 +++ perf-5.6.2.ebuild 2020-04-04 18:29:54.361961701 +0200 @@ -78,7 +78,7 @@ CONFIG_CHECK="~PERF_EVENTS ~KALLSYMS" src_unpack() { local paths=( tools/arch tools/build tools/include tools/lib tools/perf tools/scripts - include lib "arch/*/lib" + include lib scripts "arch/*/lib" ) # We expect the tar implementation to support the -j option (both @@ -117,11 +117,6 @@ src_unpack() { fi CC=${old_CC} fi - - pushd "${S_K}" >/dev/null || die - eapply "${FILESDIR}/perf-5.4.7-propagate-cflags.patch" - eapply "${FILESDIR}/perf-5.4.20-binutil-libs-2.34.patch" - popd || die } src_prepare() { (In reply to Jiří Moravec from comment #11) > For me only upgrade worked: Suggested solution worked for me as well. Looks like it's not perf to blame for this, but shared-mime-info: # This is what the Makefile is calling $ pkg-config --libs --cflags gtk+-2.0 Package shared-mime-info was not found in the pkg-config search path. Perhaps you should add the directory containing `shared-mime-info.pc' to the PKG_CONFIG_PATH environment variable Package 'shared-mime-info', required by 'gdk-pixbuf-2.0', not found Package 'shared-mime-info', required by 'gdk-pixbuf-2.0', not found # and this is what is listed as part of the package: $ qlist shared-mime-info /usr/share/doc/shared-mime-info-2.0/HACKING.md.bz2 /usr/share/doc/shared-mime-info-2.0/NEWS.bz2 /usr/share/doc/shared-mime-info-2.0/README.md.bz2 epsftws perf $ sudo emerge -1av shared-mime-info These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] x11-misc/shared-mime-info-2.0-r2::gentoo [2.0::gentoo] 0 KiB After I update shared-mime-info by hand, I can build perf with USE=gtk without problems. I guess this can be closed if others confirm that updating to shared-mime-info-2.0-r2 fixes this for other versions of perf as well. The ebuild should add gtk? ( x11-misc/shared-mime-info ) for this issue to be resolved works for me with all versions currently in the tree. |