Message ID | 86ilsky0xb.fsf@163.com |
---|---|
State | Accepted |
Headers | show |
Series | [bug#54261] Acknowledgement ([PATCH]: Update GTK to 4.6.1.) | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]: > +;; TODO: Make this the default package in next release cycle. > +(define-public pango-next Did you mean core-updates cycle here? Greetings, Maxime
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]: > +(define-public pango-next > + (package > + (inherit pango) > + (name "pango") > + (version "1.50.4") Due to pkg-config requiring propagation (*), this can probably unfortunately often cause profile collisions. Greetings, Maxime (*) Could be avoided by symlinking pkg-config files into the pkg-config directories of their dependent libraries, as suggested by lilyp.
Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]: > - ("pango" ,pango) > + ("pango" ,pango-next) What if a program uses both 'pango' and gtk? Then IIUC, it would simultanuously use pango and pango-next in the same process, which can easily cause problems (see e.g. the bug report about segfaults involving multiple libcairos). Greetings, Maxime
Yes, so many packages depend on pango, we'd better to update it in 'core-updates'. Maxime Devos <maximedevos@telenet.be> writes: > [[PGP Signed Part:Undecided]] > Zhu Zihao schreef op vr 11-03-2022 om 23:15 [+0800]: >> +(define-public pango-next >> + (package >> + (inherit pango) >> + (name "pango") >> + (version "1.50.4") > > Due to pkg-config requiring propagation (*), this can probably > unfortunately often cause profile collisions. > > Greetings, > Maxime > > (*) Could be avoided by symlinking pkg-config files into the pkg-config > directories of their dependent libraries, as suggested by lilyp. > > [[End of PGP Signed Part]] Not only for pkg-config files, but also for headers. For example, the header of gtk4 may have following lines #include <pango.h> > What if a program uses both 'pango' and gtk? Then IIUC, it would > simultanuously use pango and pango-next in the same process, which can > easily cause problems (see e.g. the bug report about segfaults > involving multiple libcairos). If package A propagates C@1.0 and package B propagates C@2.0. Guix will raise an error. However, it doesn't care about something like guix shell gtk pango@1.48 IDK which pango will win the game. I've asked in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44327 and suggest to introduce priority mechanism like Nix. But Ludovic Courtès doesn't accept my suggestion.
Zhu Zihao schreef op za 12-03-2022 om 10:38 [+0800]: > > (*) Could be avoided by symlinking pkg-config files into the pkg- > config > > directories of their dependent libraries, as suggested by lilyp. > > > > [[End of PGP Signed Part]] > > Not only for pkg-config files, but also for headers. > > For example, the header of gtk4 may have following lines > > #include <pango.h> This is getting a little off-topic, but for headers, symlinking is not necessary, pango.h could be automatically replaced by the absolute file name /gnu/store/.../include/pango.h in gtk4's header, see attachement. (Idea suggested by lilyp on IRC). It needs some more work though, see TODO's and lack of documentation. Greetings, Maxime.
Zhu Zihao schreef op za 12-03-2022 om 10:38 [+0800]: > > What if a program uses both 'pango' and gtk? Then IIUC, it would > > simultanuously use pango and pango-next in the same process, which > can > > easily cause problems (see e.g. the bug report about segfaults > > involving multiple libcairos). > > If package A propagates C@1.0 and package B propagates C@2.0. Guix > will > raise an error. However, it doesn't care about something like > > guix shell gtk pango@1.48 > > IDK which pango will win the game. 'guix install' and 'guix shell' might not care, but how would this stop the segfaults caused by multiple versions of the same library in the same process? Also, gtk currently propagates pango@1.48.0, the same pango as pango@1.48, so this doesn't seem a good test to me. Instead: $ guix shell gtk pango@1.42.4 Looks like $GUIX_ENVIRONMENT/share/doc/ only contains pango-1.42.4 and not pango-1.48. Looks like a bug? Next I tried: $ guix shell pango@1.42.4 pango@1.48 this also does not complain and the share/doc only contains pango@42.4. Also looks buggy? I'll send a bug report. > > I've asked in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44327 and > suggest to introduce priority mechanism like Nix. But Ludovic Courtès > doesn't accept my suggestion How could a priority mechanism solve the segfaults? Greetings, Maxime.
Maxime Devos schreef op za 12-03-2022 om 10:32 [+0100]: > this also does not complain and the share/doc only contains > pango@42.4. > Also looks buggy? I'll send a bug report. Nevermind about the second part, looks like pango does not have a share/doc directory. Greetings, Maxime.
From 0c22cbd070d47b8c3b534caceb3eb05c8f7f6d41 Mon Sep 17 00:00:00 2001 From: Zhu Zihao <all_but_last@163.com> Date: Sat, 5 Mar 2022 22:40:46 +0800 Subject: [PATCH 2/2] gnu: gtk: Update to 4.6.1. * gnu/local.mk (dist_patch_DATA): Remove gtk-introspection-test.patch. * gnu/packages/patches/gtk-introspection-test.patch: Remove. * gnu/packages/gtk.scm (gtk): Update to 4.6.1. [source]: Remove stale patch. [arguments]<phases>: Add 'patch-rst2man' phase, correct the binary name of rst2man to 'rst2man.py' [inputs]: Add libjpeg-turbo, libpng, libtiff. [native-inputs]: Add python-docutils. [propagated-inputs]: Use pango-next. --- gnu/local.mk | 1 - gnu/packages/gtk.scm | 17 +++++++++----- .../patches/gtk-introspection-test.patch | 22 ------------------- 3 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 gnu/packages/patches/gtk-introspection-test.patch diff --git a/gnu/local.mk b/gnu/local.mk index c8026a1ec1..1e0bb0c00c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1244,7 +1244,6 @@ dist_patch_DATA = \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_PATH.patch \ %D%/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk-doc-respect-xml-catalog.patch \ - %D%/packages/patches/gtk-introspection-test.patch \ %D%/packages/patches/gtk4-respect-GUIX_GTK4_PATH.patch \ %D%/packages/patches/gtkglext-disable-disable-deprecated.patch \ %D%/packages/patches/gtksourceview-2-add-default-directory.patch \ diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index bc7b388a88..3d7706b9ee 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1076,7 +1076,7 @@ (define-public gtk+ (define-public gtk (package (name "gtk") - (version "4.4.1") + (version "4.6.1") (source (origin (method url-fetch) @@ -1084,10 +1084,9 @@ (define-public gtk (version-major+minor version) "/" name "-" version ".tar.xz")) (sha256 - (base32 "1x6xlc063nqp7cg6py4kq1kpw9pkq49ifk5kki0brc667ncdmahg")) + (base32 "0pzcs24j67f90kjcp6apgn6rffynxksjm1m7d3an7kdv3k90hmfq")) (patches - (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch" - "gtk-introspection-test.patch")))) + (search-patches "gtk4-respect-GUIX_GTK4_PATH.patch")))) (build-system meson-build-system) (outputs '("out" "bin" "doc")) (arguments @@ -1117,6 +1116,10 @@ (define-public gtk (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file (assoc-ref glib-or-gtk:%standard-phases 'generate-gdk-pixbuf-loaders-cache-file)) + (add-after 'unpack 'patch-rst2man + (lambda _ + (substitute* "docs/reference/gtk/meson.build" + (("find_program\\('rst2man'") "find_program('rst2man.py'")))) (add-after 'unpack 'patch (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) ;; Correct DTD resources of docbook. @@ -1194,6 +1197,7 @@ (define-public gtk ("pkg-config" ,pkg-config) ("python-pygobject" ,python-pygobject) ;; These python modules are required for building documentation. + ("python-docutils" ,python-docutils) ("python-jinja2" ,python-jinja2) ("python-markdown" ,python-markdown) ("python-markupsafe" ,python-markupsafe) @@ -1216,7 +1220,10 @@ (define-public gtk iso-codes json-glib libcloudproviders ;for cloud-providers support + libjpeg-turbo + libpng librsvg + libtiff python rest tracker)) ;for filechooser search support @@ -1239,7 +1246,7 @@ (define-public gtk ("libxkbcommon" ,libxkbcommon) ("libxrandr" ,libxrandr) ("libxrender" ,libxrender) - ("pango" ,pango) + ("pango" ,pango-next) ("vulkan-headers" ,vulkan-headers) ("vulkan-loader" ,vulkan-loader) ;for vulkan graphics API support ("wayland" ,wayland) ;for wayland display-backend diff --git a/gnu/packages/patches/gtk-introspection-test.patch b/gnu/packages/patches/gtk-introspection-test.patch deleted file mode 100644 index 570ea806a9..0000000000 --- a/gnu/packages/patches/gtk-introspection-test.patch +++ /dev/null @@ -1,22 +0,0 @@ -# Extend rather than stomp environment variables. -# Upstream status: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4268 -diff --git a/testsuite/introspection/meson.build b/testsuite/introspection/meson.build -index 6202fb7446..b59191eb0f 100644 ---- a/testsuite/introspection/meson.build -+++ b/testsuite/introspection/meson.build -@@ -1,9 +1,10 @@ -+env = environment() -+env.prepend('GI_TYPELIB_PATH', -+ join_paths(project_build_root, 'gtk'), -+ gi_dep.get_pkgconfig_variable('typelibdir')) -+env.prepend('LD_PRELOAD', join_paths(project_build_root, 'gtk', 'libgtk-4.so')) - - test('api', - find_program('api.py', dirs: meson.current_source_dir()), - suite: ['introspection'], -- env: [ -- 'GI_TYPELIB_PATH=@0@/gtk:@1@'.format(project_build_root, -- gi_dep.get_pkgconfig_variable('typelibdir')), -- 'LD_PRELOAD=@0@/gtk/libgtk-4.so'.format(project_build_root), -- ]) -+ env: env) -- 2.34.0