Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 710718 - dev-util/perf-5.4.20 : ui/.../gtk.h:8:10: fatal error: gtk/gtk.h: No such file or directory
Summary: dev-util/perf-5.4.20 : ui/.../gtk.h:8:10: fatal error: gtk/gtk.h: No such fil...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Naohiro Aota
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-24 19:13 UTC by Toralf Förster
Modified: 2020-11-19 15:32 UTC (History)
7 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.92 KB, text/plain)
2020-02-24 19:13 UTC, Toralf Förster
Details
dev-util:perf-5.4.20:20200224-131917.log (dev-util:perf-5.4.20:20200224-131917.log,776.30 KB, text/plain)
2020-02-24 19:13 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,120.48 KB, text/plain)
2020-02-24 19:13 UTC, Toralf Förster
Details
environment (environment,125.44 KB, text/plain)
2020-02-24 19:13 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.14 KB, application/x-bzip)
2020-02-24 19:13 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-02-24 19:13:11 UTC
In file included from ui/gtk/browser.c:6:
ui/gtk/gtk.h:8:10: fatal error: gtk/gtk.h: No such file or directory
    8 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_developer-20200221-195709

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.0 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Mon, 24 Feb 2020 12:38:58 +0000

emerge -qpvO dev-util/perf
[ebuild  N    ] dev-util/perf-5.4.20  USE="crypt demangle doc gtk zlib -audit -clang -debug -java -lzma -numa -perl -python -slang -systemtap -unwind" PYTHON_TARGETS="python2_7 python3_6 -python3_7"
Comment 1 Toralf Förster gentoo-dev 2020-02-24 19:13:15 UTC
Created attachment 615628 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-24 19:13:19 UTC
Created attachment 615630 [details]
dev-util:perf-5.4.20:20200224-131917.log
Comment 3 Toralf Förster gentoo-dev 2020-02-24 19:13:22 UTC
Created attachment 615632 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-02-24 19:13:25 UTC
Created attachment 615634 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-02-24 19:13:27 UTC
Created attachment 615636 [details]
etc.portage.tbz2
Comment 6 Samuel Bernardo 2020-03-02 23:03:24 UTC
Same happened to me also.
Comment 7 Nikolay Kichukov 2020-03-04 09:35:53 UTC
Same here.
Comment 8 Holger Hoffstätte 2020-03-05 17:32:58 UTC
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 "") \
Comment 9 Holger Hoffstätte 2020-03-05 21:10:37 UTC
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
Comment 10 Samuel Bernardo 2020-03-07 20:06:25 UTC
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.
Comment 11 Jiří Moravec 2020-04-04 16:50:12 UTC
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() {
Comment 12 pva 2020-04-13 06:22:52 UTC
(In reply to Jiří Moravec from comment #11)
> For me only upgrade worked:

Suggested solution worked for me as well.
Comment 13 Guilherme Amadio gentoo-dev 2020-06-16 09:55:02 UTC
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.
Comment 14 Sandino Araico Sanchez 2020-06-16 10:04:30 UTC
The ebuild should add gtk? ( x11-misc/shared-mime-info ) for this issue to be resolved
Comment 15 Guilherme Amadio gentoo-dev 2020-11-19 15:32:03 UTC
works for me with all versions currently in the tree.