Subject: | doesn't compile on strawberry |
Modules uses function calls from perl-Cairo, but doesn't explicitly link the library, having these functions dynamically resolved later - it works on unix, but not on windows. The problem seems like this:
CairoGObject.o:CairoGObject.c:(.text+0x3a9): undefined reference to `cairo_surface_to_sv'
collect2.exe: error: ld returned 1 exit status
gmake: *** [Makefile:491: blib\arch\auto\Cairo\GObject\GObject.xs.dll] Error 1
this can be fixed by the patch below:
--- a 2019-05-29 18:18:43.869124900 +0200
+++ makefile.PL 2019-05-29 18:17:03.406361600 +0200
@@ -8,6 +8,7 @@
use strict;
use warnings;
+use Config;
use ExtUtils::MakeMaker;
our %build_reqs = (
@@ -84,6 +85,8 @@
mkdir 'build', 0777;
+$pkgcfg{libs} .= " $Config{sitelib}/auto/Cairo/Cairo$Config{_a}" if $^O =~ /win32/i;
+
my $dep = ExtUtils::Depends->new('Cairo::GObject', qw/Cairo Glib/);
$dep->set_inc($pkgcfg{cflags});
$dep->set_libs($pkgcfg{libs});