Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^3: Fail to pp cairo, pango on windows

by Anonymous Monk
on Nov 24, 2009 at 12:10 UTC ( #809059=note: print w/replies, xml ) Need Help??

in reply to Re^2: Fail to pp cairo, pango on windows
in thread Fail to pp cairo, pango on windows

You don't want libcairo.dll.a What you want is to use lisdlls (or dependencywalker) to find which dlls are loaded, which for me turned out to be
-l libglib-2.0-0.dll -l libgobject-2.0-0.dll -l libgthread-2.0-0.d +ll -l libcairo-2.dll -l libfontconfig-1.dll -l libexpat-1.dll -l +freetype6.dll -l libpng12-0.dll -l zlib1.dll -l libpango-1.0-0.dll + -l libgmodule-2.0-0.dll -l libpangocairo-1.0-0.dll -l libpangoft2 +-1.0-0.dll -l libpangowin32-1.0-0.dll -l libatk-1.0-0.dll -l libgd +k-win32-2.0-0.dll -l libgdk_pixbuf-2.0-0.dll -l libgio-2.0-0.dll - +l libgtk-win32-2.0-0.dll -l intl.dll
But that didn't work
$ pmvers PAR PAR::Packer PAR: 0.994 PAR::Packer: 1.000
i still encounter the Cairo.dll renaming problem. So after visiting and, I modified instead of patching Module::ScanDeps
#!/perl/bin/perl -w use strict; use FindBin; use pp; use Module::ScanDeps; # This subroutine relies on not being called for modules that have alr +eady been visited sub Module::ScanDeps::add_deps { package Module::ScanDeps; my %args = ((@_ and $_[0] =~ /^(?:modules|rv|used_by|warn_missing)$/) ? @_ : (rv => (ref($_[0]) ? shift(@_) : undef), modules => [@_])); my $rv = $args{rv} || {}; my $skip = $args{skip} || {}; my $used_by = $args{used_by}; foreach my $module (@{ $args{modules} }) { my $file = _find_in_inc($module) or _warn_of_missing_module($module, $args{warn_missing}), ne +xt; next if $skip->{$file}; if (exists $rv->{$module}) { _add_info( rv => $rv, module => $module, file => $file, used_by => $used_by, type => undef ); next; } my $type = _gettype($file); _add_info( rv => $rv, module => $module, file => $file, used_by => $used_by, type => $type ); if ($module =~ /(.*?([^\/]*))\.p[mh]$/i) { my ($path, $basename) = ($1, $2); foreach (_glob_in_inc("auto/$path")) { next if $_->{file} =~ m{(Glib)|(Cairo)|(Gtk2)|(GladeXM +L)} and $^O eq 'MSWin32'; next if $_->{file} =~ m{\bauto/$path/.*/}; # weed out + subdirs next if $_->{name} =~ m/(?:^|\/)\.(?:exists|packlist)$ +/; my ($ext,$type); $ext = lc($1) if $_->{name} =~ /(\.[^.]+)$/; if (defined $ext) { next if $ext eq lc(lib_ext()); $type = 'shared' if $ext eq lc(dl_ext()); $type = 'autoload' if ($ext eq '.ix' or $ext eq '. +al'); } $type ||= 'data'; _add_info( rv => $rv, module => "auto/$pat +h/$_->{name}", file => $_->{file}, used_by => $module, type => $type ); } } } # end for modules return $rv; } my $version = '1.0.0'; my $script = "$FindBin::Bin/"; my @libs = qw( Cairo/Cairo.dll Pango/Pango.dll Glib/Glib.dll Gtk2/Gtk2.dll Gtk2/GladeXML/GladeXML.dll ); @ARGV = (); push (@ARGV, '-z'); push (@ARGV, '9'); #~ push (@ARGV, '--gui'); push (@ARGV, '-N'); push (@ARGV, "ProductVersion=$version"); push (@ARGV, '-N'); push (@ARGV, "FileVersion=$version"); push @ARGV, qw! -l libglib-2.0-0.dll -l libgobject-2.0-0.dll -l libg +thread-2.0-0.dll -l libcairo-2.dll -l libfontconfig-1.dll -l libex +pat-1.dll -l freetype6.dll -l libpng12-0.dll -l zlib1.dll -l libp +ango-1.0-0.dll -l libgmodule-2.0-0.dll -l libpangocairo-1.0-0.dll +-l libpangoft2-1.0-0.dll -l libpangowin32-1.0-0.dll -l libatk-1.0-0 +.dll -l libgdk-win32-2.0-0.dll -l libgdk_pixbuf-2.0-0.dll -l libgi +o-2.0-0.dll -l libgtk-win32-2.0-0.dll -l intl.dll !; for my $file (@libs) { for my $dir (@INC) { my $lib = "$dir/auto/$file"; if (-f $lib) { push (@ARGV, '-l'); push (@ARGV, $lib); last; } } } push (@ARGV, '-o'); push (@ARGV, "$FindBin::Bin/test.exe"); push (@ARGV, "$script"); pp->go();
and resulting test.exe now dies with with
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `g_t +ype_from_name (name) == 0' failed at C:/perl/5.10.1/lib/MSWin32-x86-m +ulti-thread/ line 223. GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `g_t +ype_from_name (name) == 0' failed at C:/perl/5.10.1/lib/MSWin32-x86-m +ulti-thread/ line 223. cannot register alias Gtk2::Pango::Attribute for the unregistered type + (null) at C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/ +line 223. Compilation failed in require at script/ line 11. BEGIN failed--compilation aborted at script/ line 11.
It seems like PAR/Gtk2-perl teams could use an infusion of cash :)

You should use the Cava packager, I've tested it just now and it worked.

Replies are listed 'Best First'.
Re^4: Fail to pp cairo, pango on windows
by llancet (Friar) on Nov 27, 2009 at 01:02 UTC
    The Cava also don't work, with same error message...
      Hmm, well it works for me :/

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809059]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-02-24 22:01 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (363 votes). Check out past polls.