GNU bug report logs - #58299
[patch] add gst-plugins-base-gl (gst-plugins with opengl support)

Previous Next

Package: guix;

Reported by: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>

Date: Wed, 5 Oct 2022 08:28:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 58299 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#58299; Package guix. (Wed, 05 Oct 2022 08:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 05 Oct 2022 08:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: bug-guix <at> gnu.org
Subject: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
Date: Wed, 05 Oct 2022 10:25:44 +0200
[Message part 1 (text/plain, inline)]
Hi,

the following patch adds a base gstreamer plugins package with opengl support:

[0001-gnu-gst-plugins-base-gl-add-package-version-that-inc.patch (text/x-patch, inline)]
From 515535c638bd079839882a7a3c2fcf89defee984 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Wed, 24 Nov 2021 01:58:32 +0100
Subject: [PATCH] gnu: gst-plugins-base-gl: add package version that includes
 opengl.

* gnu/packages/gstreamerr.scm (gst-plugins-base-gl): -Dgl=enabled, input: mesa
---
 gnu/packages/gstreamer.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..0d442a1e04 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -626,6 +626,17 @@ (define-public gst-plugins-base
 for the GStreamer multimedia library.")
     (license license:lgpl2.0+)))
 
+(define-public gst-plugins-base-gl
+  (package (inherit gst-plugins-base)
+    (name "gst-plugins-base-gl")
+    (inputs
+     `(("mesa" ,mesa) ;; required for libgstgl
+       ,@(package-inputs gst-plugins-base)))
+    (arguments
+     `(,@(package-arguments gst-plugins-base)
+       #:tests? #f ;; check fails with gl
+       #:configure-flags '("-Dgl=enabled"))))) ;; requires mesa)
+
 (define-public gst-plugins-good
   (package
     (name "gst-plugins-good")
-- 
2.37.3

[Message part 3 (text/plain, inline)]
Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#58299; Package guix. (Wed, 05 Oct 2022 09:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 58299 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
To: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>, 58299 <at> debbugs.gnu.org
Subject: Re: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
Date: Wed, 05 Oct 2022 11:58:15 +0200
Am Mittwoch, dem 05.10.2022 um 10:25 +0200 schrieb Dr. Arne
Babenhauserheide:
> +(define-public gst-plugins-base-gl
> +  (package (inherit gst-plugins-base)
> +    (name "gst-plugins-base-gl")
Is there a cycle between gst-plugins-base and mesa otherwise?  If not,
we could merge them on staging.
> +    (inputs
> +     `(("mesa" ,mesa) ;; required for libgstgl
> +       ,@(package-inputs gst-plugins-base)))
Prefer modify-inputs.
> +    (arguments
> +     `(,@(package-arguments gst-plugins-base)
> +       #:tests? #f ;; check fails with gl
> +       #:configure-flags '("-Dgl=enabled"))))) ;; requires mesa)
Prefer substitute-keyword-arguments.  Also, why do the checks fail with
gl?  Is one of them broken?

Cheers





Information forwarded to bug-guix <at> gnu.org:
bug#58299; Package guix. (Wed, 05 Oct 2022 22:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 58299 <at> debbugs.gnu.org (full text, mbox):

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 58299 <at> debbugs.gnu.org
Subject: Re: [patch] add gst-plugins-base-gl (gst-plugins with opengl support)
Date: Wed, 05 Oct 2022 18:04:09 +0200
[Message part 1 (text/plain, inline)]
Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at> writes:

> Am Mittwoch, dem 05.10.2022 um 10:25 +0200 schrieb Dr. Arne
> Babenhauserheide:
>> +(define-public gst-plugins-base-gl
>> +  (package (inherit gst-plugins-base)
>> +    (name "gst-plugins-base-gl")
> Is there a cycle between gst-plugins-base and mesa otherwise?  If not,
> we could merge them on staging.

There’s no cycle, but gst-plugins-base-gl cannot be installed without
mesa and mesa is large.


> Prefer modify-inputs.
> Prefer substitute-keyword-arguments.  

Is it better like this?

[0001-gnu-gst-plugins-base-gl-add-package-version-that-inc.patch (text/x-patch, inline)]
From 3c50c737ad24e361b85c8120a20275e91b72c737 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Wed, 24 Nov 2021 01:58:32 +0100
Subject: [PATCH] gnu: gst-plugins-base-gl: add package version that includes
 opengl.

* gnu/packages/gstreamerr.scm (gst-plugins-base-gl): -Dgl=enabled, input: mesa
---
 gnu/packages/gstreamer.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a1503602ad..73d20f836e 100644
--- a/gnu/packages/gstreamer.scm
+++ b/gnu/packages/gstreamer.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages gstreamer)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages aidc)
@@ -626,6 +627,19 @@ (define-public gst-plugins-base
 for the GStreamer multimedia library.")
     (license license:lgpl2.0+)))
 
+(define-public gst-plugins-base-gl
+  (package
+    (inherit gst-plugins-base)
+    (name "gst-plugins-base-gl")
+    (inputs
+     (modify-inputs (package-inputs gst-plugins-base)
+       (append mesa))) ;; required for libgstgl
+    (arguments
+     (substitute-keyword-arguments (package-arguments gst-plugins-base)
+       ((#:tests? _ #f) #f) ;; check fails with gl
+       ((#:configure-flags flags ''())
+        #~(cons* "-Dgl=enabled" #$flags)))))) ;; requires mesa
+
 (define-public gst-plugins-good
   (package
     (name "gst-plugins-good")
-- 
2.37.3

[Message part 3 (text/plain, inline)]
> Also, why do the checks fail with gl? Is one of them broken?

I don’t know which broke it — I did not have enough time to search deeper.

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#58299; Package guix. (Thu, 06 Oct 2022 08:06:01 GMT) Full text and rfc822 format available.

Message #14 received at 58299 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>, 58299 <at> debbugs.gnu.org
Subject: Re: bug#58299: [patch] add gst-plugins-base-gl (gst-plugins with
 opengl support)
Date: Thu, 6 Oct 2022 10:05:10 +0200
[Message part 1 (text/plain, inline)]

On 05-10-2022 10:25, Dr. Arne Babenhauserheide wrote:
> Hi,
> 
> the following patch adds a base gstreamer plugins package with opengl support:

Not sure how I received this, as I unsubscribed from guix-patches, but a 
note:

IIUC, you are enabling extra plugins -- so gst-plugins-base-gl also 
contains the non-gl plugins.

Take some non-gl plugin 'foo', of which there is a copy in both 
gst-plugins-base-gl and gst-plugins-base.

This can potentially lead to a situation where an application loads two 
copies of foo into the same process (of gst-plugins-base and 
gst-plugins-base-gl).  This can lead to bugs, see e.g. 
<https://issues.guix.gnu.org/47115#22>.

I don't know if gst stuff cares (and maybe gst refuses to load plugins 
it already has loaded), but it is potentially risky.

To avoid this, I propose to let gst-plugins-base-gl _only_ contain 
plugins that use gl.


> +     `(("mesa" ,mesa) ;; required for libgstgl

Maybe my local Guix is out-of-date, but mesa is already in 
gst-plugin-base's inputs.  If it's actually unused by gst-plugin-base, I 
suppose it could be removed on core-updates, to avoid the large mesa.

> +    (inputs
> +     (modify-inputs (package-inputs gst-plugins-base)
> +       (append mesa))) ;; required for libgstgl

I recommend 'prepend' instead of 'append' for being a tiny bit faster 
(prepend doesn't need to iterate through the old input list).

Also, a modified description and synopsis, to help users deciding 
between gst-plugins-base, gst-plugins-base-gl or both.

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 1 year and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.