diff mbox series

[bug#72943] gnu: gd: Requires.private to propagated inputs

Message ID 20240901191119.29870-1-rutherther@protonmail.com
State New
Headers show
Series [bug#72943] gnu: gd: Requires.private to propagated inputs | expand

Commit Message

Rutherther Sept. 1, 2024, 7:11 p.m. UTC
The package gd provides a pkg-config file with all
its inputs in Requires.private. I think that this means that packages that depend
on gd also need these as inputs to build. This is causing trouble for example in php,
failing in configure phase with
```
checking for gdlib >= 2.1.0... no
configure: error: Package requirements (gdlib >= 2.1.0) were not met:

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

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
```

After this, php is able to configure, though it still fails in the check
phase, where 3 tests fail. These tests are related to gd, so there seems
to be other problem as well, but I see also other tests for gd disabled,
so maybe it will be fine also disabling these three to fix this, I am not sure.
---
 gnu/packages/gd.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Enge Sept. 5, 2024, 8:41 p.m. UTC | #1
Hello,

I have applied Carlos's second patch of
   https://issues.guix.gnu.org/72943
which gives an explanation why we skip the tests,
and NoƩ's patch of
   https://issues.guix.gnu.org/72968
adding the missing inputs.

As php currently does not build after the core-updates merge and this issue
has been turning up regularly over the past few days, I have taken the
liberty to push the commits directly without going through QA; I have
tested that the package builds and works with one of my local php projects.

I am closing the second issue, which is thus handled.
And I am leaving the first issue open; while the immediate php problem is
(hopefully) solved, it remains to be discussed whether we should propagate
the gd inputs in the longer term.

My understanding is that given the pkg-config file, we normally would
propagate the inputs. On the other hand, propagated inputs tend to create
problems (for instance, when two different packages propagate two different
versions of the same input library); and I do not quite understand why
with over 5000 packages depending on gd, most of them do not seem to be
affected. Maybe these do not use pkg-config to check for gd?
So it may be a better option to only patch the affected packages (if any
are left) and leave gd as it is.

Andreas
diff mbox series

Patch

diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm
index 98d34cfa71..7ced0774bd 100644
--- a/gnu/packages/gd.scm
+++ b/gnu/packages/gd.scm
@@ -85,7 +85,7 @@  (define-public gd
                                          "\\.la$")))))))
     (native-inputs
      (list pkg-config))
-    (inputs
+    (propagated-inputs
      (list fontconfig
            freetype
            libjpeg-turbo