Perl Packager, pp, compilation

Discussion in 'Perl Misc' started by mathieu.lory@gmail.com, Nov 14, 2006.

  1. Guest

    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 ?
     
    , Nov 14, 2006
    #1
    1. Advertising

  2. Ben Morrow Guest

    Quoth :
    >
    > 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

    --
    Musica Dei donum optimi, trahit homines, trahit deos. |
    Musica truces mollit animos, tristesque mentes erigit.|
    Musica vel ipsas arbores et horridas movet feras. |
     
    Ben Morrow, Nov 14, 2006
    #2
    1. Advertising

  3. Guest

    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 ?
     
    , Nov 15, 2006
    #3
  4. Ben Morrow Guest

    Quoth :
    > 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 ?


    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

    --
    The cosmos, at best, is like a rubbish heap scattered at random.
    Heraclitus
     
    Ben Morrow, Nov 16, 2006
    #4
  5. Guest

    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 ? :)
     
    , Nov 16, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alfred B. Stansbury

    Newbie needs help with perl compilation errors

    Alfred B. Stansbury, Oct 21, 2004, in forum: Perl
    Replies:
    1
    Views:
    756
    Joe Smith
    Oct 22, 2004
  2. C__chp
    Replies:
    4
    Views:
    524
    Puppet_Sock
    Feb 15, 2008
  3. Replies:
    6
    Views:
    99
    Ilya Zakharevich
    Jul 11, 2003
  4. felipe200112
    Replies:
    0
    Views:
    266
    felipe200112
    Apr 19, 2004
  5. Replies:
    5
    Views:
    448
    Tim McDaniel
    Mar 20, 2009
Loading...

Share This Page