Perl Packager, pp, compilation

M

mathieu.lory

Hello,

I developped a Perl application and I would like to use it under
different computers (and differents OS) whose haven't Perl on it.
So, I want to compile my script.

I saw "Perl Packager" sur CPAN :
http://search.cpan.org/~autrijus/PAR-0.85/script/pp

I can use it locally, the binary works well on my computer, but not on
other computers.

This is the error message when I run it on other computer :
Can't load
'/tmp/par-mathieu/cache-708ca5057424e91f75390798270f708076161471/e86591d6.so'
for module Gtk2::MozEmbed: libgtkembedmoz.so: Ne peut ouvrir le fichier
d'objet partagé: Aucun fichier ou répertoire de ce type at
/usr/lib/perl/5.8/DynaLoader.pm line 225.
at /usr/share/perl5/PAR/Heavy.pm line 107
Compilation failed in require at script/script.pl line 5.,

But, with pp command, I've added the libgtkembedmoz.so to the .PAR file
(with --addlist parameter)

I also use these depedencies :
Mozilla::DOM
Gtk2::MozEmbed

Please, could you help me compiling my script ?
 
B

Ben Morrow

Quoth (e-mail address removed):
I saw "Perl Packager" sur CPAN :
http://search.cpan.org/~autrijus/PAR-0.85/script/pp

I can use it locally, the binary works well on my computer, but not on
other computers.

This is the error message when I run it on other computer :
Can't load
'/tmp/par-mathieu/cache-708ca5057424e91f75390798270f708076161471/e86591d6.so'
for module Gtk2::MozEmbed: libgtkembedmoz.so: Ne peut ouvrir le fichier
d'objet partagé: Aucun fichier ou répertoire de ce type at
/usr/lib/perl/5.8/DynaLoader.pm line 225.
at /usr/share/perl5/PAR/Heavy.pm line 107
Compilation failed in require at script/script.pl line 5.,

But, with pp command, I've added the libgtkembedmoz.so to the .PAR file
(with --addlist parameter)

You don't use -A for dependant libraries, you use -l, e.g.

pp -o mozembed -l gtkembedmoz mozembed.pl

Ben
 
M

mathieu.lory

Ben Morrow a écrit :
You don't use -A for dependant libraries, you use -l, e.g.
pp -o mozembed -l gtkembedmoz mozembed.pl

Thanks for your help Ben, It's work now. But I've another strange error
: my application crash at startup, with only 2 warnings :

*** This build of Glib was compiled with glib 2.9.5, but is currently
running with 2.8.3, which is too old. We'll continue, but expect
problems!
*** This build of Gtk2 was compiled with gtk+ 2.8.16, but is currently
running with 2.8.6, which is too old. We'll continue, but expect
problems!

So, I don't understand the problem, because As I know, all the libs are
included to the package, so it can't be a problem of version ! no ?

then, for Gtk2 : "was compiled with gtk+ 2.8.16, but is currently
running with 2.8.6, which is too old" => 2.8.16 is older than 2.8.6 ?
really ?
 
B

Ben Morrow

Quoth (e-mail address removed):
Ben Morrow a écrit :

Thanks for your help Ben, It's work now. But I've another strange error
: my application crash at startup, with only 2 warnings :

*** This build of Glib was compiled with glib 2.9.5, but is currently
running with 2.8.3, which is too old. We'll continue, but expect
problems!
*** This build of Gtk2 was compiled with gtk+ 2.8.16, but is currently
running with 2.8.6, which is too old. We'll continue, but expect
problems!

So, I don't understand the problem, because As I know, all the libs are
included to the package, so it can't be a problem of version ! no ?

Did you include *all* the required libraries? On my system, a program
which links libgtkembedmoz.so needs at least

-lgtkembedmoz -lxpcom -lplds4 -lplc4 -lnspr4 -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0

(along with some runtime linker flags to let it find those libraries),
plus a whole lot of other stuff like -lglitz and -lexpat that those
libraries pull in, plus a whole lot more stuff like -lm, -ldl and -lX11
that are definitely part of the operating system and which it would be a
very bad idea to attempt to put in a package.

Now that I've thought about it a little further, what you are trying to
do is likely to be rather difficult. You need to decide what you are
going to require the client to have installed: gtkembedmoz? Mozilla?
Gtk? Gdk? Glib? X? Things you require to be present on the client system
will obviously have to be the correct version, so you will need to find
out what those need to be. Things you don't require to be present you
must include; and you will need to include all their dependencies. You
can use the ldd tool to find these if you are on Linux; if you aren't
I'm sure there is some equivalent tool for your platform. You must also
be aware that if you package something (say, Mozilla) and the client
already has it installed, then things may not work as the user expects.
For instance, any plugins they have installed may or may not be found by
your packaged version; and they may or may not work correctly. In the
worst case, your packaged version will find some plugin or some user
setting that is incompatible and causes it to break.
then, for Gtk2 : "was compiled with gtk+ 2.8.16, but is currently
running with 2.8.6, which is too old" => 2.8.16 is older than 2.8.6 ?
really ?

No, it's saying 2.8.6 is too old, as 2.8.6 is older than 2.8.16. The
sentence is not terribly clear, so if English is not your native tongue
I'm not surprised you misunderstood it :).

Ben
 
M

mathieu.lory

Ben Morrow a écrit :
Did you include *all* the required libraries? On my system, a program
which links libgtkembedmoz.so needs at least

-lgtkembedmoz -lxpcom -lplds4 -lplc4 -lnspr4 -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0

Thanks to your help, I've included them now ; I don't have my previous
warning about versions, but... My app crash at startup. I thinks it's a
problem with gtk or with the compilation, because app works fine under
computer where it compile from.
I haven't any error message in the console, only a dialog box like this
(but in french) : "application has quit, you can inform developpers or
restart application now ..."
that are definitely part of the operating system and which it would be a
very bad idea to attempt to put in a package.
If it's a bad idea...
sentence is not terribly clear, so if English is not your native tongue
I'm not surprised you misunderstood it :).
No, it's not my mother tongue :) didn't you guess it ? :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

perl588 PAR PP bug? 1
pp syntax issue? 2
pp failing 3
PAR and Sybase::CTlib on HP-UX 1
stand alone executable using pp doesn't stand alone 2
PAR and pp problem 4
AS Perl + PAR perl58.dll? 0
PAR packer Error 3

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top