GNU bug report logs - #73157
[PATCH] gnu: mscgen: Fix dependencies.

Previous Next

Package: guix-patches;

Reported by: Sébastien Lerique <sl <at> eauchat.org>

Date: Mon, 9 Sep 2024 21:19:02 UTC

Severity: normal

Tags: patch

Merged with 73164

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73157 in the body.
You can then email your comments to 73157 AT debbugs.gnu.org in the normal way.

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

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


Report forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Mon, 09 Sep 2024 21:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Lerique <sl <at> eauchat.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 09 Sep 2024 21:19:02 GMT) Full text and rfc822 format available.

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

From: Sébastien Lerique <sl <at> eauchat.org>
To: guix-patches <at> gnu.org
Cc: Sébastien Lerique <sl <at> eauchat.org>
Subject: [PATCH] gnu: mscgen: Fix dependencies.
Date: Mon,  9 Sep 2024 23:15:43 +0200
* gnu/packages/graph.scm (mscgen)
[inputs]: Add fontconfig, freetype, ijg-libjpeg, libpng, zlib.

Change-Id: If185bcb2f786f6493c20040b47e93440987d7243
---
 gnu/packages/graph.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 5c985eaf5b..e987e656a0 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -53,10 +53,12 @@ (define-module (gnu packages graph)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -813,7 +815,7 @@ (define-public mscgen
     (native-inputs
      (list pkg-config))
     (inputs
-     (list gd))
+     (list fontconfig freetype gd ijg-libjpeg libpng zlib))
     (home-page "https://www.mcternan.me.uk/mscgen/")
     (synopsis "Message Sequence Chart Generator")
     (description "Mscgen is a small program that parses Message Sequence Chart

base-commit: 590904cca15922e6474fbd3a71af9b3a45b268af
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Tue, 10 Sep 2024 05:45:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sébastien Lerique <sl <at> eauchat.org>
Cc: 73157 <at> debbugs.gnu.org
Subject: Re: [bug#73157] [PATCH] gnu: mscgen: Fix dependencies.
Date: Tue, 10 Sep 2024 14:43:03 +0900
Hello,

Sébastien Lerique <sl <at> eauchat.org> writes:

> * gnu/packages/graph.scm (mscgen)
> [inputs]: Add fontconfig, freetype, ijg-libjpeg, libpng, zlib.
>
> Change-Id: If185bcb2f786f6493c20040b47e93440987d7243
> ---
>  gnu/packages/graph.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
> index 5c985eaf5b..e987e656a0 100644
> --- a/gnu/packages/graph.scm
> +++ b/gnu/packages/graph.scm
> @@ -53,10 +53,12 @@ (define-module (gnu packages graph)
>    #:use-module (gnu packages datastructures)
>    #:use-module (gnu packages docbook)
>    #:use-module (gnu packages flex)
> +  #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages gd)
>    #:use-module (gnu packages graphics)
>    #:use-module (gnu packages graphviz)
>    #:use-module (gnu packages gtk)
> +  #:use-module (gnu packages image)
>    #:use-module (gnu packages linux)
>    #:use-module (gnu packages machine-learning)
>    #:use-module (gnu packages maths)
> @@ -813,7 +815,7 @@ (define-public mscgen
>      (native-inputs
>       (list pkg-config))
>      (inputs
> -     (list gd))
> +     (list fontconfig freetype gd ijg-libjpeg libpng zlib))
>      (home-page "https://www.mcternan.me.uk/mscgen/")
>      (synopsis "Message Sequence Chart Generator")
>      (description "Mscgen is a small program that parses Message Sequence Chart
>
> base-commit: 590904cca15922e6474fbd3a71af9b3a45b268af

I've built this locally, and checked if references were retained to the
added inputs; it seems ijg-libjpeg is not retained as a reference, which
means it is unused at run time and could be left out (or perhaps it
tries to dynamically load it, in which case the dlopen calls could be
patched, but I doubt so).

--8<---------------cut here---------------start------------->8---
$ guix gc -R /gnu/store/jbdbq8kxy5956wkqg4qrvfdks776gfb1-mscgen-0.20 |
grep ijg-libjpeg
-> no output
--8<---------------cut here---------------end--------------->8---

Could you verify the above, and if my assumption is correct, send a v2
without the added ijg-libjpeg?

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Tue, 10 Sep 2024 08:16:02 GMT) Full text and rfc822 format available.

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

From: Sébastien Lerique <sl <at> eauchat.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 73157 <at> debbugs.gnu.org
Subject: Re: [bug#73157] [PATCH] gnu: mscgen: Fix dependencies.
Date: Tue, 10 Sep 2024 10:15:19 +0200
Hi! And thanks.

> I've built this locally, and checked if references were retained to the
> added inputs; it seems ijg-libjpeg is not retained as a reference, which
> means it is unused at run time and could be left out (or perhaps it
> tries to dynamically load it, in which case the dlopen calls could be
> patched, but I doubt so).
>
> --8<---------------cut here---------------start------------->8---
> $ guix gc -R /gnu/store/jbdbq8kxy5956wkqg4qrvfdks776gfb1-mscgen-0.20 |
> grep ijg-libjpeg
> -> no output
> --8<---------------cut here---------------end--------------->8---
>
> Could you verify the above, and if my assumption is correct, send a v2
> without the added ijg-libjpeg?
>

So just removing ijg-libjpeg results in

  Package 'libjpeg', required by 'gdlib', not found

and replacing it with libjpeg-turbo works. "libjpeg" on its own is just
not found (and not defined in the guix source I see
590904cca15922e6474fbd3a71af9b3a45b268af ).

Should it be the turbo one?

-- 
Sébastien Lerique
https://slvh.fr/




Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Tue, 10 Sep 2024 08:49:02 GMT) Full text and rfc822 format available.

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

From: Sébastien Lerique <sl <at> eauchat.org>
To: 73157 <at> debbugs.gnu.org
Cc: Sébastien Lerique <sl <at> eauchat.org>
Subject: [PATCH v2] gnu: mscgen: Fix dependencies.
Date: Tue, 10 Sep 2024 10:48:21 +0200
* gnu/packages/graph.scm (mscgen)
[inputs]: Add fontconfig, freetype, libjpeg-turbo, libpng, zlib.

Change-Id: If185bcb2f786f6493c20040b47e93440987d7243
---
 gnu/packages/graph.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 5c985eaf5b..02033c25b3 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -53,10 +53,12 @@ (define-module (gnu packages graph)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages graphics)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages maths)
@@ -813,7 +815,7 @@ (define-public mscgen
     (native-inputs
      (list pkg-config))
     (inputs
-     (list gd))
+     (list fontconfig freetype gd libjpeg-turbo libpng zlib))
     (home-page "https://www.mcternan.me.uk/mscgen/")
     (synopsis "Message Sequence Chart Generator")
     (description "Mscgen is a small program that parses Message Sequence Chart

base-commit: 590904cca15922e6474fbd3a71af9b3a45b268af
-- 
2.46.0





Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Thu, 12 Sep 2024 01:26:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Sébastien Lerique <sl <at> eauchat.org>
Cc: 73157 <at> debbugs.gnu.org
Subject: Re: [bug#73157] [PATCH] gnu: mscgen: Fix dependencies.
Date: Thu, 12 Sep 2024 10:24:38 +0900
Hi Sébastien,

Sébastien Lerique <sl <at> eauchat.org> writes:

> Hi! And thanks.
>
>> I've built this locally, and checked if references were retained to the
>> added inputs; it seems ijg-libjpeg is not retained as a reference, which
>> means it is unused at run time and could be left out (or perhaps it
>> tries to dynamically load it, in which case the dlopen calls could be
>> patched, but I doubt so).
>>
>> --8<---------------cut here---------------start------------->8---
>> $ guix gc -R /gnu/store/jbdbq8kxy5956wkqg4qrvfdks776gfb1-mscgen-0.20 |
>> grep ijg-libjpeg
>> -> no output
>> --8<---------------cut here---------------end--------------->8---
>>
>> Could you verify the above, and if my assumption is correct, send a v2
>> without the added ijg-libjpeg?
>>
>
> So just removing ijg-libjpeg results in
>
>   Package 'libjpeg', required by 'gdlib', not found
>
> and replacing it with libjpeg-turbo works. "libjpeg" on its own is just
> not found (and not defined in the guix source I see
> 590904cca15922e6474fbd3a71af9b3a45b268af ).
>
> Should it be the turbo one?

It should be turbo to match the default libjpeg used in Guix; but rather
than being propagated from mscgen, it should probably be propagated from
gdlib, which seems to have it listed in its pkg-config files:

--8<---------------cut here---------------start------------->8---
$ find $(guix build gd) -name '*.pc' -execdir cat {} +
refix=/gnu/store/8rl0dz3982ms15j2j50myr89dkc3h5y5-gd-2.3.3
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: gd
Description: GD graphics library
Version: 2.3.3
Requires:
Requires.private:   zlib  libpng  freetype2 >= 9.8.3  fontconfig  libjpeg
Cflags: -I${includedir}
Libs.private:  
Libs: -L${libdir} -lgd
--8<---------------cut here---------------end--------------->8---

Anything listed in pkg-config 'Requires' or 'Requires.private' should be
propagated for the pkg-config machinery to work as expected.  This topic
is brushed in the manual (see info "(guix) package References"), where
'propagated-inputs' are documented.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Thu, 12 Sep 2024 06:26:02 GMT) Full text and rfc822 format available.

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

From: Rutherther <rutherther <at> protonmail.com>
To: "73157 <at> debbugs.gnu.org" <73157 <at> debbugs.gnu.org>,
 "sl <at> eauchat.org" <sl <at> eauchat.org>,
 "maxim.cournoyer <at> gmail.com" <maxim.cournoyer <at> gmail.com>
Subject: [PATCH] gnu: mscgen: Fix dependencies.
Date: Thu, 12 Sep 2024 06:25:13 +0000
Hello all, 

This was also an issue with php. I already submitted a patch adding these to propagated inputs of gd https://issues.guix.gnu.org/72943, but it got rejected in favor of adding the dependencies to php itself. That is because a lot of packages depend on gd and not many are affected. See the associated issue also for an alternative solution with patch to gd's pkgconfig file. 

Regards, 
Rutherther




Information forwarded to guix-patches <at> gnu.org:
bug#73157; Package guix-patches. (Thu, 12 Sep 2024 12:12:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Rutherther <rutherther <at> protonmail.com>
Cc: "sl <at> eauchat.org" <sl <at> eauchat.org>,
 "73157 <at> debbugs.gnu.org" <73157 <at> debbugs.gnu.org>
Subject: Re: [PATCH] gnu: mscgen: Fix dependencies.
Date: Thu, 12 Sep 2024 21:09:42 +0900
Hi,

Rutherther <rutherther <at> protonmail.com> writes:

> Hello all, 
>
> This was also an issue with php. I already submitted a patch adding
> these to propagated inputs of gd https://issues.guix.gnu.org/72943,
> but it got rejected in favor of adding the dependencies to php
> itself. That is because a lot of packages depend on gd and not many
> are affected. See the associated issue also for an alternative
> solution with patch to gd's pkgconfig file.

Thanks for the reference.  I guess for now we are covered.

-- 
Thanks,
Maxim




Merged 73157 73164. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 25 Sep 2024 16:06:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Oct 2024 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 239 days ago.

Previous Next


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