lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEdQ38Ec8mWkoy7hDE1ew6vEtXmEMSWp6u2HBzqdqtCBX3jTtA@mail.gmail.com>
Date:   Thu, 21 Apr 2022 14:02:49 -0700
From:   Matt Turner <mattst88@...il.com>
To:     Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc:     linux-perf-users@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Jelle van der Waa <jvanderwaa@...hat.com>
Subject: Re: [PATCH] tools: port perf ui from GTK 2 to GTK 3

On Wed, Apr 20, 2022 at 10:08 AM Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
>
> Em Thu, Apr 14, 2022 at 10:00:03PM -0700, Matt Turner escreveu:
> > From: Jelle van der Waa <jvanderwaa@...hat.com>
> >
> > GTK 2 is a legacy API and the newer version is GTK 3 which changes a few
> > API functions. gtk_tree_view_set_rules_hint is no longer required since
> > theme's are now responsible to handle this, gtk_vbox_new is deprecated
> > and replaced by passing the orientation to gtk_box_new. Apart from these
> > changes the accessing of the screen changed in GTK which requires using
> > new functions for getting geometry. Lastly the GTK_STOCK_OK define is
> > deprecated in GTK 3.
> >
> > Signed-off-by: Jelle van der Waa <jvanderwaa@...hat.com>
> > Signed-off-by: Matt Turner <mattst88@...il.com>
> > ---
> > Originally sent in 2019. I've rebased it and given it a test.
> >
> > One problem I've noticed is that C++ symbol names are often broken.
> > E.g.:
> >
> > (perf:3254940): Gtk-WARNING **: 21:47:46.663: Failed to set text from
> > markup due to error parsing markup: Error on line 1 char 95:
> > “std::char_traits<char” is not a valid name: “<”
> >
> > Presumably we need to call g_markup_escape_text() somewhere, but I
> > struggled to find the right place.
> >
> > Without the patch, the GTK-2 version repeatedly segfaults, so this is an
> > improvement regardless.
>
> I'm trying to test build this but failing:
>
> 1. uninstalled gtk2-devel, which removed several other packages
>
> 2. installed gtk3-devel, which installed several other packages
>
> 3.:
>
> Auto-detecting system features:
> ...                         dwarf: [ on  ]
> ...            dwarf_getlocations: [ on  ]
> ...                         glibc: [ on  ]
> ...                          gtk3: [ OFF ]
> ...                        libbfd: [ on  ]
> ...                libbfd-buildid: [ on  ]
>
> Looking at how that OFF is deduced:
>
> ⬢[acme@...lbox perf]$ cat /tmp/build/perf/feature/test-
> Display all 150 possibilities? (y or n)
> ⬢[acme@...lbox perf]$ cat /tmp/build/perf/feature/test-all.make.output
> In file included from test-all.c:74:
> test-gtk3.c:3:10: fatal error: gtk/gtk.h: No such file or directory
>     3 | #include <gtk/gtk.h>
>       |          ^~~~~~~~~~~
> compilation terminated.
> ⬢[acme@...lbox perf]$
>
> ⬢[acme@...lbox perf]$ find /usr/include -name gtk.h
> /usr/include/gtk-3.0/gtk/gtk.h
> ⬢[acme@...lbox perf]$ rpm -qf /usr/include/gtk-3.0/gtk/gtk.h
> gtk3-devel-3.24.31-2.fc35.x86_64
> ⬢[acme@...lbox perf]$
>
> And that pkg-config line produces:
>
> ⬢[acme@...lbox perf]$ pkg-config --libs --cflags gtk+-3.0
> -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
> ⬢[acme@...lbox perf]$
>
> I'm testing this on fedora 35 silverblue, in a perf build container:
>
> ⬢[acme@...lbox perf]$ rpm -qa | grep gtk
> gtk-update-icon-cache-3.24.31-2.fc35.x86_64
> libcanberra-gtk3-0.30-27.fc35.x86_64
> gtk3-3.24.31-2.fc35.x86_64
> libcanberra-gtk2-0.30-27.fc35.x86_64
> gtk2-2.24.33-7.fc35.x86_64
> gtk3-devel-3.24.31-2.fc35.x86_64
> ⬢[acme@...lbox perf]$
>
> Ideas?

Just to be clear, are you building with 'GTK3=1 make'? Since commit
4751bddd3f98 ("perf tools: Make GTK2 support opt-in") it's required to
enable GTK support explicitly. (IMO, leaving it disabled by default
makes sense to me, given some of the problems)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ