[PATCH] gnu: mscgen: Fix dependencies.

  • Done
  • quality assurance status badge
Details
4 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Rutherther
  • Sébastien Lerique
Owner
unassigned
Submitted by
Sébastien Lerique
Severity
normal
Merged with
S
S
Sébastien Lerique wrote on 9 Sep 23:15 +0200
(address . guix-patches@gnu.org)(name . Sébastien Lerique)(address . sl@eauchat.org)
895158e3b7dfe85ec77db0cb6763bb02b612be7e.1725916543.git.sl@eauchat.org
* 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(-)

Toggle diff (30 lines)
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
M
M
Maxim Cournoyer wrote on 10 Sep 07:43 +0200
(name . Sébastien Lerique)(address . sl@eauchat.org)(address . 73157@debbugs.gnu.org)
87mskg5ajc.fsf@gmail.com
Hello,

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

Toggle quote (37 lines)
> * 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).

Toggle snippet (5 lines)
$ guix gc -R /gnu/store/jbdbq8kxy5956wkqg4qrvfdks776gfb1-mscgen-0.20 |
grep ijg-libjpeg
-> no output

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

--
Thanks,
Maxim
S
S
Sébastien Lerique wrote on 10 Sep 10:15 +0200
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 73157@debbugs.gnu.org)
87seu7diw8.fsf@eauchat.org
Hi! And thanks.

Toggle quote (16 lines)
> 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
S
S
Sébastien Lerique wrote on 10 Sep 10:48 +0200
[PATCH v2] gnu: mscgen: Fix dependencies.
(address . 73157@debbugs.gnu.org)(name . Sébastien Lerique)(address . sl@eauchat.org)
78ffafd60159ca22a828c896ab41f3bd24ca6034.1725958101.git.sl@eauchat.org
* 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(-)

Toggle diff (30 lines)
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
M
M
Maxim Cournoyer wrote on 12 Sep 03:24 +0200
Re: [bug#73157] [PATCH] gnu: mscgen: Fix dependencies.
(name . Sébastien Lerique)(address . sl@eauchat.org)(address . 73157@debbugs.gnu.org)
8734m5y889.fsf@gmail.com
Hi Sébastien,

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

Toggle quote (28 lines)
> 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:

Toggle snippet (16 lines)
$ 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

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
R
R
Rutherther wrote on 12 Sep 08:25 +0200
[PATCH] gnu: mscgen: Fix dependencies.
fPG6AZfbxkm1a-MIJVmtbCDR3gY79PcCR0NvHTSxuvorOE0_9nIh2Xio3gMlu6V_lvmSySbrZFu4NjwbxBPafzHVDAA7-7ualNu6FCOPIjI=@protonmail.com
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
M
M
Maxim Cournoyer wrote on 12 Sep 14:09 +0200
(name . Rutherther)(address . rutherther@protonmail.com)
87frq5ul89.fsf@gmail.com
Hi,

Rutherther <rutherther@protonmail.com> writes:

Toggle quote (9 lines)
> 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
L
L
Ludovic Courtès wrote on 25 Sep 18:05 +0200
control message for bug #73157
(address . control@debbugs.gnu.org)
87ikujsoqp.fsf@gnu.org
merge 73157 73164
quit
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 73157
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