unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
  2023-09-16 15:19 [bug#66034] [PATCH gnome-team 0/3] Fix qemu Vivien Kraus via Guix-patches via
@ 2023-09-16  9:55 ` Vivien Kraus via Guix-patches via
  2023-09-16 18:52   ` Liliana Marie Prikler
  2023-09-16 12:25 ` [bug#66034] [PATCH gnome-team 2/3] gnu: pcre2: install static libraries Vivien Kraus via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-16  9:55 UTC (permalink / raw)
  To: 66034; +Cc: liliana.prikler, maxim.cournoyer, rg

* 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(-)

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




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 2/3] gnu: pcre2: install static libraries.
  2023-09-16 15:19 [bug#66034] [PATCH gnome-team 0/3] Fix qemu Vivien Kraus via Guix-patches via
  2023-09-16  9:55 ` [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre Vivien Kraus via Guix-patches via
@ 2023-09-16 12:25 ` Vivien Kraus via Guix-patches via
  2023-09-16 12:27 ` [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2 Vivien Kraus via Guix-patches via
  2023-09-16 17:30 ` [bug#66034] [PATCH gnome-team 0/3] Fix qemu Liliana Marie Prikler
  3 siblings, 0 replies; 9+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-16 12:25 UTC (permalink / raw)
  To: 66034; +Cc: liliana.prikler, maxim.cournoyer, rg

* 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(-)

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




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2.
  2023-09-16 15:19 [bug#66034] [PATCH gnome-team 0/3] Fix qemu Vivien Kraus via Guix-patches via
  2023-09-16  9:55 ` [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre Vivien Kraus via Guix-patches via
  2023-09-16 12:25 ` [bug#66034] [PATCH gnome-team 2/3] gnu: pcre2: install static libraries Vivien Kraus via Guix-patches via
@ 2023-09-16 12:27 ` Vivien Kraus via Guix-patches via
  2023-09-24 10:00   ` bug#66034: " Liliana Marie Prikler
  2023-09-16 17:30 ` [bug#66034] [PATCH gnome-team 0/3] Fix qemu Liliana Marie Prikler
  3 siblings, 1 reply; 9+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-16 12:27 UTC (permalink / raw)
  To: 66034; +Cc: liliana.prikler, maxim.cournoyer, rg

* 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(-)

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




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 0/3] Fix qemu
@ 2023-09-16 15:19 Vivien Kraus via Guix-patches via
  2023-09-16  9:55 ` [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre Vivien Kraus via Guix-patches via
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-16 15:19 UTC (permalink / raw)
  To: 66034; +Cc: liliana.prikler, maxim.cournoyer, rg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 0/3] Fix qemu
  2023-09-16 15:19 [bug#66034] [PATCH gnome-team 0/3] Fix qemu Vivien Kraus via Guix-patches via
                   ` (2 preceding siblings ...)
  2023-09-16 12:27 ` [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2 Vivien Kraus via Guix-patches via
@ 2023-09-16 17:30 ` Liliana Marie Prikler
  3 siblings, 0 replies; 9+ messages in thread
From: Liliana Marie Prikler @ 2023-09-16 17:30 UTC (permalink / raw)
  To: Vivien Kraus, 66034; +Cc: rg, maxim.cournoyer

Am Samstag, dem 16.09.2023 um 17:19 +0200 schrieb Vivien Kraus:
> 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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
  2023-09-16  9:55 ` [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre Vivien Kraus via Guix-patches via
@ 2023-09-16 18:52   ` Liliana Marie Prikler
  2023-09-17  4:07     ` Vivien Kraus via Guix-patches via
  0 siblings, 1 reply; 9+ messages in thread
From: Liliana Marie Prikler @ 2023-09-16 18:52 UTC (permalink / raw)
  To: Vivien Kraus, 66034; +Cc: rg, maxim.cournoyer

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?
> +                (("libpcre-8")
> +                 "libpcre2-8")))))))
This fits in one line.

Cheers

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
  2023-09-16 18:52   ` Liliana Marie Prikler
@ 2023-09-17  4:07     ` Vivien Kraus via Guix-patches via
  2023-09-17  5:19       ` Liliana Marie Prikler
  0 siblings, 1 reply; 9+ messages in thread
From: Vivien Kraus via Guix-patches via @ 2023-09-17  4:07 UTC (permalink / raw)
  To: Liliana Marie Prikler, 66034; +Cc: rg, maxim.cournoyer

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?

Vivien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre.
  2023-09-17  4:07     ` Vivien Kraus via Guix-patches via
@ 2023-09-17  5:19       ` Liliana Marie Prikler
  0 siblings, 0 replies; 9+ messages in thread
From: Liliana Marie Prikler @ 2023-09-17  5:19 UTC (permalink / raw)
  To: Vivien Kraus, 66034; +Cc: rg, maxim.cournoyer

Am Sonntag, dem 17.09.2023 um 06:07 +0200 schrieb Vivien Kraus:
> 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.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66034: [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2.
  2023-09-16 12:27 ` [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2 Vivien Kraus via Guix-patches via
@ 2023-09-24 10:00   ` Liliana Marie Prikler
  0 siblings, 0 replies; 9+ messages in thread
From: Liliana Marie Prikler @ 2023-09-24 10:00 UTC (permalink / raw)
  To: Vivien Kraus, 66034-done; +Cc: rg, maxim.cournoyer

Am Samstag, dem 16.09.2023 um 14:27 +0200 schrieb Vivien Kraus:
> * 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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-09-24 10:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-16 15:19 [bug#66034] [PATCH gnome-team 0/3] Fix qemu Vivien Kraus via Guix-patches via
2023-09-16  9:55 ` [bug#66034] [PATCH gnome-team 1/3] gnu: glib: fix required.private reference to pcre Vivien Kraus via Guix-patches via
2023-09-16 18:52   ` Liliana Marie Prikler
2023-09-17  4:07     ` Vivien Kraus via Guix-patches via
2023-09-17  5:19       ` Liliana Marie Prikler
2023-09-16 12:25 ` [bug#66034] [PATCH gnome-team 2/3] gnu: pcre2: install static libraries Vivien Kraus via Guix-patches via
2023-09-16 12:27 ` [bug#66034] [PATCH gnome-team 3/3] gnu: qemu: Switch to pcre2 Vivien Kraus via Guix-patches via
2023-09-24 10:00   ` bug#66034: " Liliana Marie Prikler
2023-09-16 17:30 ` [bug#66034] [PATCH gnome-team 0/3] Fix qemu Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).