develooper Front page | perl.par | Postings from January 2008

Re: [rt.cpan.org #32589] gtk2 dependencies break pp executable

From:
Steffen Mueller
Date:
January 24, 2008 07:46
Subject:
Re: [rt.cpan.org #32589] gtk2 dependencies break pp executable
Message ID:
4798B1E4.6080807@sneakemail.com
Hi Radek, hi par@perl.org,

I'm forwarding this to the mailing list* because I have never packaged
Gtk and don't use Windows. But most importantly, the
packaging-dlls-twice problem was reported before. I'm very busy in the
coming weeks, so I can't spare the time to look up what came of it, sorry.

Radek via RT wrote:
> Wed Jan 23 14:04:19 2008: Request 32589 was acted upon.
> Transaction: Ticket created by rahe
>        Queue: Module-ScanDeps
>      Subject: gtk2 dependencies break pp executable
>    Broken in: 0.74, 0.75, 0.76, 0.77, 0.78, 0.81
>     Severity: Important
>  Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32589 >
[...]
> after making an executable with gtk2 dependencies I get the following 
> messages when the exe is run:
> 
> GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion `quark > 0' 
> failed at script/test.pl line 18.
> GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion `quark > 
> 0' failed at script/test.pl line 18.
> Can't locate object method "signal_connect" via package "Gtk2::Window" 
> at script/test.pl line 19.
> 
> Gtk2.dll, Glib.dll and Cairo.dll libraries must be included with -l 
> parameter to pp. They are consequently packed both in lib/auto/$path 
> and shlib/MSWin32-x86-multi-thread directories.
> Version 0.73 packs them only in shlib/MSWin32-x86-multi-thread and this 
> executable then runs smoothly.
> 
> The following patch resolves the problem.
> 
> --- ScanDepsOrig.pm	2008-01-23 18:19:33.221903700 +0000
> +++ ScanDeps.pm	2008-01-23 18:28:34.961451200 +0000
> @@ -906,6 +906,7 @@
>              my ($path, $basename) = ($1, $2);
>  
>              foreach (_glob_in_inc("auto/$path")) {
> +	        next if $_->{file} =~ m{(Glib)|(Cairo)|(Gtk2)} and $^O 
> eq 'MSWin32';
>                  next if $_->{file} =~ m{\bauto/$path/.*/};  # weed out 
> subdirs
>                  next if $_->{name} =~ m/(?:^|\/)\.(?:exists|
> packlist)$/;
>                  my $ext = lc($1) if $_->{name} =~ /(\.[^.]+)$/;
> 
> OS is windows with perl v5.10.0.

I'm not sure I'd be in favour of that patch. It's mostly a stop-gap
measure. It should be fixed in a more general way. No, sorry, I don't
have a better patch right now. :(

Cheers,
Steffen

* I'll probably do that with other bug reports, too, for the time being.
ENOTIME.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About