Discussion:
Building error in graphics/p5-PerlMagick
D'Arcy J.M. Cain
2014-09-17 10:14:36 UTC
Permalink
Something looked odd to me so I tried a test and now it is odder. I
removed fontconfig from my system. This involved removing many other
dependent packages but I was surprised that ImageMagick was not one of
them. So then I tried to build the subject package without fontconfig
installed. Since ImageMagick was already installed it did not build it
and thus not fontconfig. I had to make this change to
graphics/p5-PerlMagick first.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/p5-PerlMagick/Makefile,v
retrieving revision 1.104
diff -u -r1.104 Makefile
--- Makefile 22 Aug 2014 11:24:36 -0000 1.104
+++ Makefile 17 Sep 2014 10:07:51 -0000
@@ -31,5 +31,6 @@

BUILDLINK_API_DEPENDS.ImageMagick+= ImageMagick>=${DISTVERSION}
.include "../../graphics/ImageMagick/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"

First question, any harm in committing that change?

Second question, when I did pkg_delete on fontconfig, shouldn't it have
failed until ImageMagick was deleted first? Doesn't including the
fontconfig buildlink file generate a dependency on fontconfig?
--
D'Arcy J.M. Cain <***@NetBSD.org>
http://www.NetBSD.org/ IM:***@Vex.Net
Thomas Klausner
2014-09-17 10:45:42 UTC
Permalink
Post by D'Arcy J.M. Cain
Something looked odd to me so I tried a test and now it is odder. I
removed fontconfig from my system. This involved removing many other
dependent packages but I was surprised that ImageMagick was not one of
them. So then I tried to build the subject package without fontconfig
installed. Since ImageMagick was already installed it did not build it
and thus not fontconfig. I had to make this change to
graphics/p5-PerlMagick first.
Does p5-PerlMagick use fontconfig itself, or does it only pull it in
when linking to ImageMagick?
That's usually the main criteria for adding a bl3.mk.
Post by D'Arcy J.M. Cain
Second question, when I did pkg_delete on fontconfig, shouldn't it have
failed until ImageMagick was deleted first? Doesn't including the
fontconfig buildlink file generate a dependency on fontconfig?
I have two ideas about that:

How do you update your packages?

Did you at some point switch from native to modular xorg and not
recompile ImageMagick?

Thomas
D'Arcy J.M. Cain
2014-09-17 13:19:44 UTC
Permalink
On Wed, 17 Sep 2014 12:45:42 +0200
Post by Thomas Klausner
Does p5-PerlMagick use fontconfig itself, or does it only pull it in
when linking to ImageMagick?
That's usually the main criteria for adding a bl3.mk.
It seems to want it itself but does that matter? If a package A pulls
in a buildlink from package B doesn't it effectively pull in every
buildlink that package B does? In other words, don't includes nest?
Post by Thomas Klausner
Post by D'Arcy J.M. Cain
Second question, when I did pkg_delete on fontconfig, shouldn't it
have failed until ImageMagick was deleted first? Doesn't including
the fontconfig buildlink file generate a dependency on fontconfig?
How do you update your packages?
In this case I deleted /usr/pkg and /var/db/pkg* and built everything
from scratch. I then removed fontconfig, p5-PerlMagick and everything
that I was required to by pkg_delete and rebuilt p5-PerlMagick.
Post by Thomas Klausner
Did you at some point switch from native to modular xorg and not
recompile ImageMagick?
Nope. Native all along.
--
D'Arcy J.M. Cain <***@NetBSD.org>
http://www.NetBSD.org/ IM:***@Vex.Net
Thomas Klausner
2014-09-17 21:21:51 UTC
Permalink
Post by D'Arcy J.M. Cain
It seems to want it itself but does that matter? If a package A pulls
in a buildlink from package B doesn't it effectively pull in every
buildlink that package B does? In other words, don't includes nest?
Yes, if the buildlink3.mk is included by ImageMagick's buildlink3.mk,
it's available, and you don't have to include it yourself.

For PerlMagick, the following scenario is not probable, but for other
packages it could happen that A depends on B which pulls in C (which A
also needs) but at some point B stops depending on C. That'd break A
then. So we try to include all direct dependencies directly.
Post by D'Arcy J.M. Cain
Post by Thomas Klausner
How do you update your packages?
In this case I deleted /usr/pkg and /var/db/pkg* and built everything
from scratch. I then removed fontconfig, p5-PerlMagick and everything
that I was required to by pkg_delete and rebuilt p5-PerlMagick.
fontconfig has a builtin file, so perhaps some package(s) need a newer
version and pull in the pkgsrc version and others don't. Could that be
the cause of the problem you're seeing?
Thomas
D'Arcy J.M. Cain
2014-10-01 03:57:18 UTC
Permalink
On Wed, 17 Sep 2014 23:21:51 +0200
Post by Thomas Klausner
For PerlMagick, the following scenario is not probable, but for other
packages it could happen that A depends on B which pulls in C (which A
also needs) but at some point B stops depending on C. That'd break A
then. So we try to include all direct dependencies directly.
Right. So are you saying that it is OK to include it directly in
graphics/p5-PerlMagick then?
--
D'Arcy J.M. Cain <***@NetBSD.org>
http://www.NetBSD.org/ IM:***@Vex.Net
Thomas Klausner
2014-10-01 06:34:32 UTC
Permalink
Post by D'Arcy J.M. Cain
Right. So are you saying that it is OK to include it directly in
graphics/p5-PerlMagick then?
If it directly uses it, then include it directly.
As I understand you, it does, so: "yes".
Thomas

Loading...