[PATCH gnome-team 0/3] Fix qemu

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Vivien Kraus
Owner
unassigned
Submitted by
Vivien Kraus
Severity
normal

Debbugs page

Vivien Kraus wrote 1 years ago
(address . guix-patches@gnu.org)
cover.1694877577.git.vivien@planete-kraus.eu
Dear guix,

Qemu on gnome-team is a mess. Glib uses pcre2, but it lists pcre (not 2) as a
required.private pkg-config input. In turn, qemu uses pcre (not 2), and more
specifically its static output. There is not yet a static output for pcre2, so
it cannot be changed.

That’s why I fixed glib (requires a full recompilation of everything), fixed
pcre2 to add a static output (an even fuller recompilation), to finally fix
qemu.

What do you think?

Best regards,

Vivien

Vivien Kraus (3):
gnu: glib: fix required.private reference to pcre.
gnu: pcre2: install static libraries.
gnu: qemu: Switch to pcre2.

gnu/packages/glib.scm | 7 ++++++-
gnu/packages/pcre.scm | 16 +++++++++++++---
gnu/packages/virtualization.scm | 2 +-
3 files changed, 20 insertions(+), 5 deletions(-)


base-commit: e9ff5d51e3297089e66c124195e1f1b42dbded65
--
2.41.0
Vivien Kraus wrote 1 years ago
[PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
(address . 66034@debbugs.gnu.org)
1683acded2289fca76c221a997c6735b355f5a27.1694877577.git.vivien@planete-kraus.eu
* gnu/packages/glib.scm (glib) [#:phases 'patch-pkg-config-files]: Replace the
reference to libpcre-8 to libpcre2-8.
---
gnu/packages/glib.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 8af89d60e0..dcc61802a4 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -449,7 +449,12 @@ (define glib
(("^bindir=.*")
"")
(("=\\$\\{bindir\\}/")
- "=")))))))
+ "="))
+ ;; Update the required.private pcre pkg-config name
+ (substitute*
+ (list (search-input-file outputs "lib/pkgconfig/glib-2.0.pc"))
+ (("libpcre-8")
+ "libpcre2-8")))))))
(native-inputs
(list dbus
gettext-minimal
--
2.41.0
Vivien Kraus wrote 1 years ago
[PATCH gnome-team 2/3] gnu: pcre2: install static libraries.
(address . 66034@debbugs.gnu.org)
051fe4a2bba91549c26246e071c1575f14c9ca38.1694877577.git.vivien@planete-kraus.eu
* gnu/packages/pcre.scm (pcre2)[#:configure-flags]: Remove "--disable-static".
[#:phases 'move-static-libs]: Same as pcre.
[outputs]: Add a "static" output.
---
gnu/packages/pcre.scm | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)

Toggle diff (41 lines)
diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm
index ee48ad0e2b..c7471169d9 100644
--- a/gnu/packages/pcre.scm
+++ b/gnu/packages/pcre.scm
@@ -102,6 +102,7 @@ (define-public pcre2
(base32
"0s4x2l6g0sb9piwkr3sxqwdswz2g6bk1hhwngv0kv4w38wybir0l"))))
(build-system gnu-build-system)
+ (outputs '("out" "static"))
(inputs (list bzip2 readline zlib))
(arguments
(list #:configure-flags
@@ -114,14 +115,23 @@ (define-public pcre2
;; riscv64-linux is an unsupported architecture.
#$@(if (target-riscv64?)
#~()
- #~("--enable-jit"))
- "--disable-static")
+ #~("--enable-jit")))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda _
(substitute* "RunGrepTest"
- (("/bin/echo") (which "echo"))))))))
+ (("/bin/echo") (which "echo")))))
+ (add-after 'install 'move-static-libs
+ (lambda _
+ (let ((source (string-append #$output "/lib"))
+ (static (string-append #$output:static "/lib")))
+ (mkdir-p static)
+ (for-each (lambda (lib)
+ (link lib (string-append static "/"
+ (basename lib)))
+ (delete-file lib))
+ (find-files source "\\.a$"))))))))
(synopsis "Perl Compatible Regular Expressions")
(description
"The PCRE library is a set of functions that implement regular expression
--
2.41.0
Vivien Kraus wrote 1 years ago
[PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2.
(address . 66034@debbugs.gnu.org)
295660c04d49fb96a446201cee89a70e337328e4.1694877577.git.vivien@planete-kraus.eu
* gnu/packages/virtualization.scm (qemu) [native-inputs]: Replace the static
output of pcre with that of pcre2.
---
gnu/packages/virtualization.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index f5bdedd45e..49817fdbcd 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -481,7 +481,7 @@ (define-public qemu
;; The following static libraries are required to build
;; the static output of QEMU.
`(,glib "static")
- `(,pcre "static")
+ `(,pcre2 "static")
`(,zlib "static")))
(home-page "https://www.qemu.org")
(synopsis "Machine emulator and virtualizer")
--
2.41.0
Liliana Marie Prikler wrote 1 years ago
Re: [bug#66034] [PATCH gnome-team 0/3] Fix qemu
c836cd78a6301ab178121694d3e4dc7ed625b977.camel@gmail.com
Am Samstag, dem 16.09.2023 um 17:19 +0200 schrieb Vivien Kraus:
Toggle quote (12 lines)
> Dear guix,
>
> Qemu on gnome-team is a mess. Glib uses pcre2, but it lists pcre (not
> 2) as a required.private pkg-config input. In turn, qemu uses pcre
> (not 2), and more specifically its static output. There is not yet a
> static output for pcre2, so it cannot be changed.
>
> That’s why I fixed glib (requires a full recompilation of
> everything), fixed pcre2 to add a static output (an even fuller
> recompilation), to finally fix qemu.
>
> What do you think?
Thanks for catching this. As always, I'll do my ChangeLog rewordings,
but assuming it builds on CI, it should be fine to push this. The Vala
update from another thread also forces a world rebuild, so it's fine.
Anyone aiming to upgrade libxml2 while we're at it?

Cheers
Liliana Marie Prikler wrote 1 years ago
Re: [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
89a69bc554af84b3f7ea979ab4df8a05dffe23c7.camel@gmail.com
Am Samstag, dem 16.09.2023 um 11:55 +0200 schrieb Vivien Kraus:
Toggle quote (3 lines)
> * gnu/packages/glib.scm (glib) [#:phases 'patch-pkg-config-files]:
> Replace the reference to libpcre-8 to libpcre2-8.
> ---
Logic-wise LGTM, but…
Toggle quote (17 lines)
>  gnu/packages/glib.scm | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> index 8af89d60e0..dcc61802a4 100644
> --- a/gnu/packages/glib.scm
> +++ b/gnu/packages/glib.scm
> @@ -449,7 +449,12 @@ (define glib
>                  (("^bindir=.*")
>                   "")
>                  (("=\\$\\{bindir\\}/")
> -                 "=")))))))
> +                 "="))
> +              ;; Update the required.private pcre pkg-config name
> +              (substitute*
> +                  (list (search-input-file outputs
> "lib/pkgconfig/glib-2.0.pc"))
Is there a reason to use a list here? Also, can we not do this
earlier?
Toggle quote (2 lines)
> +                (("libpcre-8")
> +                 "libpcre2-8")))))))
This fits in one line.

Cheers
Vivien Kraus wrote 1 years ago
e4f56294cd812d203939b1fde0f323ef3c5aff17.camel@planete-kraus.eu
Le samedi 16 septembre 2023 à 20:52 +0200, Liliana Marie Prikler a
écrit :
Toggle quote (25 lines)
> Am Samstag, dem 16.09.2023 um 11:55 +0200 schrieb Vivien Kraus:
> > * gnu/packages/glib.scm (glib) [#:phases 'patch-pkg-config-files]:
> > Replace the reference to libpcre-8 to libpcre2-8.
> > ---
> Logic-wise LGTM, but…
> >  gnu/packages/glib.scm | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> > index 8af89d60e0..dcc61802a4 100644
> > --- a/gnu/packages/glib.scm
> > +++ b/gnu/packages/glib.scm
> > @@ -449,7 +449,12 @@ (define glib
> >                  (("^bindir=.*")
> >                   "")
> >                  (("=\\$\\{bindir\\}/")
> > -                 "=")))))))
> > +                 "="))
> > +              ;; Update the required.private pcre pkg-config name
> > +              (substitute*
> > +                  (list (search-input-file outputs
> > "lib/pkgconfig/glib-2.0.pc"))
> Is there a reason to use a list here?  Also, can we not do this
> earlier?

I am confused. This is not required at all, glib already points to the
correct libpcre2-8.pc. I don’t know why I thought this would not be the
case; maybe I checked the glib output on the wrong branch.

Anyway, can you just ignore this patch, or do you prefer that I send
the series again, without this one?

Vivien
Liliana Marie Prikler wrote 1 years ago
b8d9219abb2648233420971ff4f9b96e4318bb63.camel@gmail.com
Am Sonntag, dem 17.09.2023 um 06:07 +0200 schrieb Vivien Kraus:
Toggle quote (35 lines)
> Le samedi 16 septembre 2023 à 20:52 +0200, Liliana Marie Prikler a
> écrit :
> > Am Samstag, dem 16.09.2023 um 11:55 +0200 schrieb Vivien Kraus:
> > > * gnu/packages/glib.scm (glib) [#:phases 'patch-pkg-config-
> > > files]:
> > > Replace the reference to libpcre-8 to libpcre2-8.
> > > ---
> > Logic-wise LGTM, but…
> > >  gnu/packages/glib.scm | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
> > > index 8af89d60e0..dcc61802a4 100644
> > > --- a/gnu/packages/glib.scm
> > > +++ b/gnu/packages/glib.scm
> > > @@ -449,7 +449,12 @@ (define glib
> > >                  (("^bindir=.*")
> > >                   "")
> > >                  (("=\\$\\{bindir\\}/")
> > > -                 "=")))))))
> > > +                 "="))
> > > +              ;; Update the required.private pcre pkg-config
> > > name
> > > +              (substitute*
> > > +                  (list (search-input-file outputs
> > > "lib/pkgconfig/glib-2.0.pc"))
> > Is there a reason to use a list here?  Also, can we not do this
> > earlier?
>
> I am confused. This is not required at all, glib already points to
> the correct libpcre2-8.pc. I don’t know why I thought this would not
> be the case; maybe I checked the glib output on the wrong branch.
>
> Anyway, can you just ignore this patch, or do you prefer that I send
> the series again, without this one?
Nah, it's fine, I'll skip it.
Liliana Marie Prikler wrote 1 years ago
Re: [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2.
2b30c77ce407398fc953eab02d2c5be79f59b3f2.camel@gmail.com
Am Samstag, dem 16.09.2023 um 14:27 +0200 schrieb Vivien Kraus:
Toggle quote (4 lines)
> * gnu/packages/virtualization.scm (qemu) [native-inputs]: Replace the
> static
> output of pcre with that of pcre2.
> ---
Pushed without the 1/3, as discussed.

Cheers
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 66034@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66034
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help