Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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
with
$ pmvers PAR PAR::Packer PAR: 0.994 PAR::Packer: 1.000
i still encounter the Cairo.dll renaming problem. So after visiting peculiarities.com and rt.cpan.org, I modified buildEXE.pl 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/test.pl"; 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/DynaLoader.pm 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/DynaLoader.pm line 223. cannot register alias Gtk2::Pango::Attribute for the unregistered type + (null) at C:/perl/5.10.1/lib/MSWin32-x86-multi-thread/DynaLoader.pm +line 223. Compilation failed in require at script/test.pl line 11. BEGIN failed--compilation aborted at script/test.pl 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.


In reply to Re^3: Fail to pp cairo, pango on windows by Anonymous Monk
in thread Fail to pp cairo, pango on windows by llancet

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found