IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage Perl Discussion :

Créer un exécutable à partir de sources Perl [Tutoriel]


Sujet :

Langage Perl

  1. #41
    Membre confirmé
    Avatar de cmcmc
    Homme Profil pro
    Inscrit en
    Juillet 2013
    Messages
    316
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2013
    Messages : 316
    Points : 641
    Points
    641
    Par défaut
    Citation Envoyé par develop' peur ! Voir le message
    je n'ai aucun retour quand je lance le script soit comme ceci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    perl -MCarp::Always omp_install.pl
    soit en intégrant :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    use Carp::Always dans mon script
    C'est normal aussi... D'après tes messages précédents le problème ne se pose qu'avec l'exécutable généré par pp. Est-ce que le fait de rajouter use Carp::Always; dans ton script principal change quelque chose dans les messages renvoyés par cet exécutable ?

    Par ailleurs peux-tu indiquer avec quelle version de Perl tu travailles (premières lignes renvoyée par perl -v) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    Taisha:~/perl/forum $ perl -v
     
    This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int
    (with 13 registered patches, see perl -V for more detail)
     
    Copyright 1987-2009, Larry Wall
    ...
    ainsi que la version de PAR::Packer :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Taisha:~/perl/forum $ perl -MPAR::Packer\ 9999
    PAR::Packer version 9999 required--this is only version 1.008.
    BEGIN failed--compilation aborted.
    Taisha:~/perl/forum $
    Sauf indication contraire tous les codes que je présente sont utilisables et testés (mais sans garantie d'aucune sorte)
    J'apporte beaucoup de soin à la rédaction de mes posts et apprécie les retours donc merci de s'il vous paraissent pertinents ou utiles
    Lazyness, Impatience and Hubris are good for you

  2. #42
    Membre à l'essai Avatar de develop' peur !
    Profil pro
    Inscrit en
    Février 2008
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 16
    Points : 12
    Points
    12
    Par défaut
    Citation Envoyé par cmcmc Voir le message
    C'est normal aussi... D'après tes messages précédents le problème ne se pose qu'avec l'exécutable généré par pp. Est-ce que le fait de rajouter use Carp::Always; dans ton script principal change quelque chose dans les messages renvoyés par cet exécutable ?

    Par ailleurs peux-tu indiquer avec quelle version de Perl tu travailles (premières lignes renvoyée par perl -v) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    Taisha:~/perl/forum $ perl -v
     
    This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int
    (with 13 registered patches, see perl -V for more detail)
     
    Copyright 1987-2009, Larry Wall
    ...
    ainsi que la version de PAR::Packer :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    Taisha:~/perl/forum $ perl -MPAR::Packer\ 9999
    PAR::Packer version 9999 required--this is only version 1.008.
    BEGIN failed--compilation aborted.
    Taisha:~/perl/forum $

    Bonjour cmcmc
    Désolé pour cette réponse tardive
    Je n'ai strictement aucun message sur mon executable quand je place Carp::Always rien nada ! si ce n'est évidemment le sujet de cet échange
    Perl 5.14.2
    PAR:acker version 9999 required--this is only version 1.028

  3. #43
    Membre confirmé
    Avatar de cmcmc
    Homme Profil pro
    Inscrit en
    Juillet 2013
    Messages
    316
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2013
    Messages : 316
    Points : 641
    Points
    641
    Par défaut
    Citation Envoyé par develop' peur ! Voir le message
    Je n'ai strictement aucun message sur mon executable quand je place Carp::Always rien nada ! si ce n'est évidemment le sujet de cet échange
    Donc si je comprends bien après avoir ajouté use Carp::Always au début de omp_install.pl, et packé ce programme avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    pp -o omp_install -M utf8_heavy.pl omp_install.pl
    tu as toujours le message d'erreur au lancement
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Use of uninitialized value in do "file" at /usr/local/share/perl/5.14.2/PAR.pm line 636.
    mais pas de backtrace, c'est bien ça ?

    Essaie de rajouter dans omp_install.pl le bloc suivant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    END { print +"-"x50,"\n"; print "'$_' => $INC{$_}\n" for sort keys %INC}
    et compare les résultats obtenus pour le script utilisé directement et pour la version packée.

    L'idée est de chercher s'il y a un fichier chargé par le script utilisé directement qui n'apparaît pas dans l'exécution du programme packé. Tu devrais obtenir quelque chose du type
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Taisha:~/perl/forum $ cat trypp.pl
    use strict;
    use warnings;
    use Carp::Always;
    END { print +"-"x50,"\n"; print "'$_' => $INC{$_}\n" for sort keys %INC}
    use Foo;
    use Bar;
    print "bla bla bla\n";
    Taisha:~/perl/forum $
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Taisha:~/perl/forum $ perl trypp.pl
    bla bla bla
    --------------------------------------------------
    'Bar.pm' => Bar.pm
    'Carp.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Carp.pm
    'Carp/Always.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/vendor/lib/Carp/Always.pm
    'Exporter.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Exporter.pm
    'Exporter/Heavy.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Exporter/Heavy.pm
    'Foo.pm' => Foo.pm
    'strict.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/strict.pm
    'warnings.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/warnings.pm
    Taisha:~/perl/forum $
    Il va y avoir beaucoup plus de choses dans la version packée, c'est normal. Le but est de vérifier que tous les fichiers référencés ci-dessus apparaissent également ci-dessous :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    Taisha:~/perl/forum $ pp -o trypp trypp.pl
    Taisha:~/perl/forum $ ./trypp
    bla bla bla
    --------------------------------------------------
    'Archive/Zip.pm' => /loader/HASH(0x105cab20)/Archive/Zip.pm
    'Archive/Zip/Archive.pm' => /loader/HASH(0x105cabb0)/Archive/Zip/Archive.pm
    'Archive/Zip/DirectoryMember.pm' => /loader/HASH(0x105cac40)/Archive/Zip/DirectoryMember.pm
    'Archive/Zip/FileMember.pm' => /loader/HASH(0x105cacd0)/Archive/Zip/FileMember.pm
    'Archive/Zip/Member.pm' => /loader/HASH(0x105cad60)/Archive/Zip/Member.pm
    'Archive/Zip/NewFileMember.pm' => /loader/HASH(0x105cadf0)/Archive/Zip/NewFileMember.pm
    'Archive/Zip/StringMember.pm' => /loader/HASH(0x105cae80)/Archive/Zip/StringMember.pm
    'Archive/Zip/ZipFileMember.pm' => /loader/HASH(0x105caf10)/Archive/Zip/ZipFileMember.pm
    'AutoLoader.pm' => /loader/HASH(0x104d70f0)/AutoLoader.pm
    'Bar.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Bar.pm
    'Carp.pm' => /loader/HASH(0x104a6e18)/Carp.pm
    'Carp/Always.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Carp/Always.pm
    'Carp/Heavy.pm' => /loader/HASH(0x104d7180)/Carp/Heavy.pm
    'Compress/Raw/Zlib.pm' => /loader/HASH(0x1051d608)/Compress/Raw/Zlib.pm
    'Compress/Zlib.pm' => /loader/HASH(0x1051d698)/Compress/Zlib.pm
    'Config.pm' => /loader/HASH(0x1051d728)/Config.pm
    'Config_git.pl' => /loader/HASH(0x1051d7b8)/Config_git.pl
    'Config_heavy.pl' => /loader/HASH(0x1051d848)/Config_heavy.pl
    'Cwd.pm' => /loader/HASH(0x1051d8d8)/Cwd.pm
    'DynaLoader.pm' => /loader/HASH(0x1051d968)/DynaLoader.pm
    'Errno.pm' => /loader/HASH(0x1051d9f8)/Errno.pm
    'Exporter.pm' => /loader/HASH(0x104d7210)/Exporter.pm
    'Exporter/Heavy.pm' => /loader/HASH(0x104d72a0)/Exporter/Heavy.pm
    'Fcntl.pm' => /loader/HASH(0x1051da88)/Fcntl.pm
    'File/Basename.pm' => /loader/HASH(0x104d7330)/File/Basename.pm
    'File/Copy.pm' => /loader/HASH(0x104d73c0)/File/Copy.pm
    'File/Find.pm' => /loader/HASH(0x104d7450)/File/Find.pm
    'File/Glob.pm' => /loader/HASH(0x1051db18)/File/Glob.pm
    'File/GlobMapper.pm' => /loader/HASH(0x1051dba8)/File/GlobMapper.pm
    'File/Path.pm' => /loader/HASH(0x104d74e0)/File/Path.pm
    'File/Spec.pm' => /loader/HASH(0x104d7570)/File/Spec.pm
    'File/Spec/Cygwin.pm' => /loader/HASH(0x104d7600)/File/Spec/Cygwin.pm
    'File/Spec/Unix.pm' => /loader/HASH(0x104d7690)/File/Spec/Unix.pm
    'File/Temp.pm' => /loader/HASH(0x104d7720)/File/Temp.pm
    'FileHandle.pm' => /loader/HASH(0x104d77b0)/FileHandle.pm
    'Foo.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Foo.pm
    'IO.pm' => /loader/HASH(0x1051dc38)/IO.pm
    'IO/Compress/Adapter/Deflate.pm' => /loader/HASH(0x1051dcc8)/IO/Compress/Adapter/Deflate.pm
    'IO/Compress/Base.pm' => /loader/HASH(0x1051dd58)/IO/Compress/Base.pm
    'IO/Compress/Base/Common.pm' => /loader/HASH(0x1051dde8)/IO/Compress/Base/Common.pm
    'IO/Compress/Gzip.pm' => /loader/HASH(0x1051de78)/IO/Compress/Gzip.pm
    'IO/Compress/Gzip/Constants.pm' => /loader/HASH(0x1051df08)/IO/Compress/Gzip/Constants.pm
    'IO/Compress/RawDeflate.pm' => /loader/HASH(0x1051df98)/IO/Compress/RawDeflate.pm
    'IO/Compress/Zlib/Extra.pm' => /loader/HASH(0x105ca850)/IO/Compress/Zlib/Extra.pm
    'IO/File.pm' => /loader/HASH(0x105cb030)/IO/File.pm
    'IO/Handle.pm' => /loader/HASH(0x105cb0c0)/IO/Handle.pm
    'IO/Seekable.pm' => /loader/HASH(0x105cb150)/IO/Seekable.pm
    'IO/Uncompress/Adapter/Inflate.pm' => /loader/HASH(0x105cb1e0)/IO/Uncompress/Adapter/Inflate.pm
    'IO/Uncompress/Base.pm' => /loader/HASH(0x105cb270)/IO/Uncompress/Base.pm
    'IO/Uncompress/Gunzip.pm' => /loader/HASH(0x105cb300)/IO/Uncompress/Gunzip.pm
    'IO/Uncompress/RawInflate.pm' => /loader/HASH(0x105cb390)/IO/Uncompress/RawInflate.pm
    'List/Util.pm' => /loader/HASH(0x105cb420)/List/Util.pm
    'PAR.pm' => /loader/HASH(0x10615dd8)/PAR.pm
    'PAR/Dist.pm' => /loader/HASH(0x105cafa0)/PAR/Dist.pm
    'PAR/Filter.pm' => /loader/HASH(0x10615e68)/PAR/Filter.pm
    'PAR/Filter/PodStrip.pm' => /loader/HASH(0x105ca8e0)/PAR/Filter/PodStrip.pm
    'PAR/Heavy.pm' => /loader/HASH(0x105ca970)/PAR/Heavy.pm
    'PAR/SetupProgname.pm' => /loader/HASH(0x105caa00)/PAR/SetupProgname.pm
    'PAR/SetupTemp.pm' => /loader/HASH(0x105caa90)/PAR/SetupTemp.pm
    'PerlIO.pm' => /loader/HASH(0x1051d068)/PerlIO.pm
    'PerlIO/scalar.pm' => /loader/HASH(0x105cb4b0)/PerlIO/scalar.pm
    'Scalar/Util.pm' => /loader/HASH(0x105cb540)/Scalar/Util.pm
    'SelectSaver.pm' => /loader/HASH(0x1051d0f8)/SelectSaver.pm
    'Symbol.pm' => /loader/HASH(0x1051d188)/Symbol.pm
    'Tie/Hash/NamedCapture.pm' => /loader/HASH(0x1051d218)/Tie/Hash/NamedCapture.pm
    'Time/Local.pm' => /loader/HASH(0x1051d2a8)/Time/Local.pm
    'UNIVERSAL.pm' => /loader/HASH(0x1051d338)/UNIVERSAL.pm
    'Win32.pm' => /loader/HASH(0x105cb5d0)/Win32.pm
    'XSLoader.pm' => /loader/HASH(0x105cb660)/XSLoader.pm
    'attributes.pm' => /loader/HASH(0x1051d3c8)/attributes.pm
    'auto/Compress/Raw/Zlib/autosplit.ix' => /loader/HASH(0x105cb6f0)/auto/Compress/Raw/Zlib/autosplit.ix
    'auto/Compress/Zlib/autosplit.ix' => /loader/HASH(0x105cb780)/auto/Compress/Zlib/autosplit.ix
    'auto/DynaLoader/dl_findfile.al' => /loader/HASH(0x10615838)/auto/DynaLoader/dl_findfile.al
    'base.pm' => /loader/HASH(0x1051d458)/base.pm
    'bytes.pm' => /loader/HASH(0x1051d4e8)/bytes.pm
    'constant.pm' => /loader/HASH(0x1051d578)/constant.pm
    'integer.pm' => /loader/HASH(0x106159e8)/integer.pm
    'lib.pm' => /loader/HASH(0x106158c8)/lib.pm
    'main' => CODE(0x10e9b9a0)
    'overload.pm' => /loader/HASH(0x10615a78)/overload.pm
    're.pm' => /loader/HASH(0x10615958)/re.pm
    'strict.pm' => /loader/HASH(0x10615b08)/strict.pm
    'utf8.pm' => /loader/HASH(0x10615b98)/utf8.pm
    'vars.pm' => /loader/HASH(0x10615c28)/vars.pm
    'warnings.pm' => /loader/HASH(0x10615cb8)/warnings.pm
    'warnings/register.pm' => /loader/HASH(0x10615d48)/warnings/register.pm
    Taisha:~/perl/forum $
    S'il manque effectivement un fichier, ajoute-le comme on l'a fait précédemment pour utf8_heavy.pl avec l'option -M dans ta ligne de commande pp.

    Sinon, essaie peut-être d'installer une version plus récente de Perl avec perlbrew, et de voir si ça fait une différence.
    Sauf indication contraire tous les codes que je présente sont utilisables et testés (mais sans garantie d'aucune sorte)
    J'apporte beaucoup de soin à la rédaction de mes posts et apprécie les retours donc merci de s'il vous paraissent pertinents ou utiles
    Lazyness, Impatience and Hubris are good for you

  4. #44
    Membre extrêmement actif
    Profil pro
    Développeur
    Inscrit en
    Mars 2012
    Messages
    1 969
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Mars 2012
    Messages : 1 969
    Points : 3 375
    Points
    3 375
    Par défaut
    Hello all

    Je venais de tester tkpp sans savoir que c'était djibril

    J'apporte peut-être une pierre à l'édifice...
    C'est un problème d'accès mais peut-être autre chose en amont.


    Ma config (sous Mac SnowLeopard (64 bits) mais via PerlBrew => version 5.20 au lieu de la 5.10)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    
    perl -v
    
    This is perl 5, version 20, subversion 2 (v5.20.2) built for darwin-2level
    (with 1 registered patch, see perl -V for more detail)
    
    Copyright 1987-2015, Larry Wall

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    perl -V
    Summary of my perl5 (revision 5 version 20 subversion 2) configuration:
       
      Platform:
        osname=darwin, osvers=10.8.0, archname=darwin-2level
        uname='darwin :D-:D-hotcryxs-macbook-pro.local 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:32:41 pdt 2011; root:xnu-1504.15.3~1release_x86_64 x86_64 '
        config_args='-de -Dprefix=/Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2 -Aeval:scriptdir=/Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/bin'
        hint=recommended, useposix=true, d_sigaction=define
        useithreads=undef, usemultiplicity=undef
        use64bitint=define, use64bitall=define, uselongdouble=undef
        usemymalloc=n, bincompat5005=undef
      Compiler:
        cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
        optimize='-O3',
        cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
        ccversion='', gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)', gccosandvers=''
        intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
        d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
        ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
        alignbytes=8, prototype=define
      Linker and Libraries:
        ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
        libpth=/usr/local/lib /usr/lib /opt/local/lib
        libs=-ldbm -ldl -lm -lutil -lc
        perllibs=-ldl -lm -lutil -lc
        libc=, so=dylib, useshrplib=false, libperl=libperl.a
        gnulibc_version=''
      Dynamic Linking:
        dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
        cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'
    
    
    Characteristics of this binary (from libperl): 
      Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                            PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                            PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
                            USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
                            USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                            USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
      Locally applied patches:
    	Devel::PatchPerl 1.34
      Built under darwin
      Compiled at Apr 28 2015 12:07:58
      %ENV:
        PERL5LIB=""
        PERLBREW_LIB=""
        PERLBREW_MANPATH="/Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/man"
        PERLBREW_PATH="/Users/hotcryx/perl5/perlbrew/bin:/Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/bin"
        PERLBREW_PERL="perl-5.20.2"
        PERLBREW_ROOT="/Users/hotcryx/perl5/perlbrew"
        PERLBREW_SKIP_INIT="1"
        PERLBREW_VERSION="0.73"
        PERL_LOCAL_LIB_ROOT=""
      @INC:
        /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/darwin-2level
        /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2
        /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/lib/5.20.2/darwin-2level
        /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/lib/5.20.2
        .

    Le code (simple) à tester

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    #!/usr/bin/perl
     
    use strict;
    use warnings;
    use Tk;
     
    my $mw = new MainWindow;
    #my $ent = $mw -> Entry() -> pack();
     
    MainLoop;

    L'erreur

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    pp -o testTk /Users/hotcryx/_DATA/DEV/PERL/testTk.pl
    /var/folders/9l/9lTXTtnCGs8hlpiCR87KTk+++TI/-Tmp-/parlpVF9: private subdirectory /var/folders/9l/9lTXTtnCGs8hlpiCR87KTk+++TI/-Tmp-//par-666162726973696f is unsafe (please remove it and retry your operation)
    /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/bin/pp: Failed to extract a parl from 'PAR::StrippedPARL::Static' to file '/var/folders/9l/9lTXTtnCGs8hlpiCR87KTk+++TI/-Tmp-/parlNP4S8D9' at /Users/hotcryx/perl5/perlbrew/perls/perl-5.20.2/lib/site_perl/5.20.2/PAR/Packer.pm line 1167, <DATA> line 1.

    La solution

    [CODE]sudo pp -o testTk /Users/hotcryx/_DATA/DEV/PERL/testTk.pl


    Test (fonctionne)

    Rem: je n'ai pas retesté tkpp en sudo

    ++
    Si la réponse vous a aidé, pensez à cliquer sur +1

  5. #45
    Membre à l'essai Avatar de develop' peur !
    Profil pro
    Inscrit en
    Février 2008
    Messages
    16
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 16
    Points : 12
    Points
    12
    Par défaut
    Citation Envoyé par cmcmc Voir le message
    Donc si je comprends bien après avoir ajouté use Carp::Always au début de omp_install.pl, et packé ce programme avec
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    pp -o omp_install -M utf8_heavy.pl omp_install.pl
    tu as toujours le message d'erreur au lancement
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Use of uninitialized value in do "file" at /usr/local/share/perl/5.14.2/PAR.pm line 636.
    mais pas de backtrace, c'est bien ça ?

    Essaie de rajouter dans omp_install.pl le bloc suivant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    END { print +"-"x50,"\n"; print "'$_' => $INC{$_}\n" for sort keys %INC}
    et compare les résultats obtenus pour le script utilisé directement et pour la version packée.

    L'idée est de chercher s'il y a un fichier chargé par le script utilisé directement qui n'apparaît pas dans l'exécution du programme packé. Tu devrais obtenir quelque chose du type
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Taisha:~/perl/forum $ cat trypp.pl
    use strict;
    use warnings;
    use Carp::Always;
    END { print +"-"x50,"\n"; print "'$_' => $INC{$_}\n" for sort keys %INC}
    use Foo;
    use Bar;
    print "bla bla bla\n";
    Taisha:~/perl/forum $
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Taisha:~/perl/forum $ perl trypp.pl
    bla bla bla
    --------------------------------------------------
    'Bar.pm' => Bar.pm
    'Carp.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Carp.pm
    'Carp/Always.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/vendor/lib/Carp/Always.pm
    'Exporter.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Exporter.pm
    'Exporter/Heavy.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/Exporter/Heavy.pm
    'Foo.pm' => Foo.pm
    'strict.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/strict.pm
    'warnings.pm' => C:/strawberry-perl-5.22.0.1-32bit-portable/perl/lib/warnings.pm
    Taisha:~/perl/forum $
    Il va y avoir beaucoup plus de choses dans la version packée, c'est normal. Le but est de vérifier que tous les fichiers référencés ci-dessus apparaissent également ci-dessous :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    Taisha:~/perl/forum $ pp -o trypp trypp.pl
    Taisha:~/perl/forum $ ./trypp
    bla bla bla
    --------------------------------------------------
    'Archive/Zip.pm' => /loader/HASH(0x105cab20)/Archive/Zip.pm
    'Archive/Zip/Archive.pm' => /loader/HASH(0x105cabb0)/Archive/Zip/Archive.pm
    'Archive/Zip/DirectoryMember.pm' => /loader/HASH(0x105cac40)/Archive/Zip/DirectoryMember.pm
    'Archive/Zip/FileMember.pm' => /loader/HASH(0x105cacd0)/Archive/Zip/FileMember.pm
    'Archive/Zip/Member.pm' => /loader/HASH(0x105cad60)/Archive/Zip/Member.pm
    'Archive/Zip/NewFileMember.pm' => /loader/HASH(0x105cadf0)/Archive/Zip/NewFileMember.pm
    'Archive/Zip/StringMember.pm' => /loader/HASH(0x105cae80)/Archive/Zip/StringMember.pm
    'Archive/Zip/ZipFileMember.pm' => /loader/HASH(0x105caf10)/Archive/Zip/ZipFileMember.pm
    'AutoLoader.pm' => /loader/HASH(0x104d70f0)/AutoLoader.pm
    'Bar.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Bar.pm
    'Carp.pm' => /loader/HASH(0x104a6e18)/Carp.pm
    'Carp/Always.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Carp/Always.pm
    'Carp/Heavy.pm' => /loader/HASH(0x104d7180)/Carp/Heavy.pm
    'Compress/Raw/Zlib.pm' => /loader/HASH(0x1051d608)/Compress/Raw/Zlib.pm
    'Compress/Zlib.pm' => /loader/HASH(0x1051d698)/Compress/Zlib.pm
    'Config.pm' => /loader/HASH(0x1051d728)/Config.pm
    'Config_git.pl' => /loader/HASH(0x1051d7b8)/Config_git.pl
    'Config_heavy.pl' => /loader/HASH(0x1051d848)/Config_heavy.pl
    'Cwd.pm' => /loader/HASH(0x1051d8d8)/Cwd.pm
    'DynaLoader.pm' => /loader/HASH(0x1051d968)/DynaLoader.pm
    'Errno.pm' => /loader/HASH(0x1051d9f8)/Errno.pm
    'Exporter.pm' => /loader/HASH(0x104d7210)/Exporter.pm
    'Exporter/Heavy.pm' => /loader/HASH(0x104d72a0)/Exporter/Heavy.pm
    'Fcntl.pm' => /loader/HASH(0x1051da88)/Fcntl.pm
    'File/Basename.pm' => /loader/HASH(0x104d7330)/File/Basename.pm
    'File/Copy.pm' => /loader/HASH(0x104d73c0)/File/Copy.pm
    'File/Find.pm' => /loader/HASH(0x104d7450)/File/Find.pm
    'File/Glob.pm' => /loader/HASH(0x1051db18)/File/Glob.pm
    'File/GlobMapper.pm' => /loader/HASH(0x1051dba8)/File/GlobMapper.pm
    'File/Path.pm' => /loader/HASH(0x104d74e0)/File/Path.pm
    'File/Spec.pm' => /loader/HASH(0x104d7570)/File/Spec.pm
    'File/Spec/Cygwin.pm' => /loader/HASH(0x104d7600)/File/Spec/Cygwin.pm
    'File/Spec/Unix.pm' => /loader/HASH(0x104d7690)/File/Spec/Unix.pm
    'File/Temp.pm' => /loader/HASH(0x104d7720)/File/Temp.pm
    'FileHandle.pm' => /loader/HASH(0x104d77b0)/FileHandle.pm
    'Foo.pm' => /cygdrive/c/Users/cm/AppData/Local/Temp/par-cm/cache-7bbbd0e90f0fb3f8b5c15d140631cd6b935099d6/inc/lib/Foo.pm
    'IO.pm' => /loader/HASH(0x1051dc38)/IO.pm
    'IO/Compress/Adapter/Deflate.pm' => /loader/HASH(0x1051dcc8)/IO/Compress/Adapter/Deflate.pm
    'IO/Compress/Base.pm' => /loader/HASH(0x1051dd58)/IO/Compress/Base.pm
    'IO/Compress/Base/Common.pm' => /loader/HASH(0x1051dde8)/IO/Compress/Base/Common.pm
    'IO/Compress/Gzip.pm' => /loader/HASH(0x1051de78)/IO/Compress/Gzip.pm
    'IO/Compress/Gzip/Constants.pm' => /loader/HASH(0x1051df08)/IO/Compress/Gzip/Constants.pm
    'IO/Compress/RawDeflate.pm' => /loader/HASH(0x1051df98)/IO/Compress/RawDeflate.pm
    'IO/Compress/Zlib/Extra.pm' => /loader/HASH(0x105ca850)/IO/Compress/Zlib/Extra.pm
    'IO/File.pm' => /loader/HASH(0x105cb030)/IO/File.pm
    'IO/Handle.pm' => /loader/HASH(0x105cb0c0)/IO/Handle.pm
    'IO/Seekable.pm' => /loader/HASH(0x105cb150)/IO/Seekable.pm
    'IO/Uncompress/Adapter/Inflate.pm' => /loader/HASH(0x105cb1e0)/IO/Uncompress/Adapter/Inflate.pm
    'IO/Uncompress/Base.pm' => /loader/HASH(0x105cb270)/IO/Uncompress/Base.pm
    'IO/Uncompress/Gunzip.pm' => /loader/HASH(0x105cb300)/IO/Uncompress/Gunzip.pm
    'IO/Uncompress/RawInflate.pm' => /loader/HASH(0x105cb390)/IO/Uncompress/RawInflate.pm
    'List/Util.pm' => /loader/HASH(0x105cb420)/List/Util.pm
    'PAR.pm' => /loader/HASH(0x10615dd8)/PAR.pm
    'PAR/Dist.pm' => /loader/HASH(0x105cafa0)/PAR/Dist.pm
    'PAR/Filter.pm' => /loader/HASH(0x10615e68)/PAR/Filter.pm
    'PAR/Filter/PodStrip.pm' => /loader/HASH(0x105ca8e0)/PAR/Filter/PodStrip.pm
    'PAR/Heavy.pm' => /loader/HASH(0x105ca970)/PAR/Heavy.pm
    'PAR/SetupProgname.pm' => /loader/HASH(0x105caa00)/PAR/SetupProgname.pm
    'PAR/SetupTemp.pm' => /loader/HASH(0x105caa90)/PAR/SetupTemp.pm
    'PerlIO.pm' => /loader/HASH(0x1051d068)/PerlIO.pm
    'PerlIO/scalar.pm' => /loader/HASH(0x105cb4b0)/PerlIO/scalar.pm
    'Scalar/Util.pm' => /loader/HASH(0x105cb540)/Scalar/Util.pm
    'SelectSaver.pm' => /loader/HASH(0x1051d0f8)/SelectSaver.pm
    'Symbol.pm' => /loader/HASH(0x1051d188)/Symbol.pm
    'Tie/Hash/NamedCapture.pm' => /loader/HASH(0x1051d218)/Tie/Hash/NamedCapture.pm
    'Time/Local.pm' => /loader/HASH(0x1051d2a8)/Time/Local.pm
    'UNIVERSAL.pm' => /loader/HASH(0x1051d338)/UNIVERSAL.pm
    'Win32.pm' => /loader/HASH(0x105cb5d0)/Win32.pm
    'XSLoader.pm' => /loader/HASH(0x105cb660)/XSLoader.pm
    'attributes.pm' => /loader/HASH(0x1051d3c8)/attributes.pm
    'auto/Compress/Raw/Zlib/autosplit.ix' => /loader/HASH(0x105cb6f0)/auto/Compress/Raw/Zlib/autosplit.ix
    'auto/Compress/Zlib/autosplit.ix' => /loader/HASH(0x105cb780)/auto/Compress/Zlib/autosplit.ix
    'auto/DynaLoader/dl_findfile.al' => /loader/HASH(0x10615838)/auto/DynaLoader/dl_findfile.al
    'base.pm' => /loader/HASH(0x1051d458)/base.pm
    'bytes.pm' => /loader/HASH(0x1051d4e8)/bytes.pm
    'constant.pm' => /loader/HASH(0x1051d578)/constant.pm
    'integer.pm' => /loader/HASH(0x106159e8)/integer.pm
    'lib.pm' => /loader/HASH(0x106158c8)/lib.pm
    'main' => CODE(0x10e9b9a0)
    'overload.pm' => /loader/HASH(0x10615a78)/overload.pm
    're.pm' => /loader/HASH(0x10615958)/re.pm
    'strict.pm' => /loader/HASH(0x10615b08)/strict.pm
    'utf8.pm' => /loader/HASH(0x10615b98)/utf8.pm
    'vars.pm' => /loader/HASH(0x10615c28)/vars.pm
    'warnings.pm' => /loader/HASH(0x10615cb8)/warnings.pm
    'warnings/register.pm' => /loader/HASH(0x10615d48)/warnings/register.pm
    Taisha:~/perl/forum $
    S'il manque effectivement un fichier, ajoute-le comme on l'a fait précédemment pour utf8_heavy.pl avec l'option -M dans ta ligne de commande pp.

    Sinon, essaie peut-être d'installer une version plus récente de Perl avec perlbrew, et de voir si ça fait une différence.
    Bonjour cmcmc
    et bonne année 2016 !
    merci pour cette réponse, toutefois quand je fais ce que tu me dis, je n'ai visiblement aucun fichier module manquant dans ma version packée
    je suis sous Debian 7 et ma version de Perl est la plus récente disponible avec apt-get (5.14.2) sur cet OS
    Bon c'est pas grave je vais continuer mes recherches
    merci pour ton aide

  6. #46
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Avril 2013
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Secteur : Industrie

    Informations forums :
    Inscription : Avril 2013
    Messages : 1
    Points : 3
    Points
    3
    Par défaut Nickel du premier coup
    Bonjour,

    Je viens simplement remercier les rédacteur/contributeurs de l'article.

    RETEX :
    sur deux machines Windows (Beuuurk ) différentes :
    - machine 1 :: installation de 'Strawberry Perl 5.32.1.1 64bits' + execution du script d'installation "tout-en-un" de l'article
    - machine 2 :: installation de 'Strawberry Perl 5.32.1.1_PDL 64bits' en parallèle d'une install ActivePerl 5.6.1 + execution du script d'installation "tout-en-un" de l'article

    tout est parfaitement fonctionnel...
    Merci merci merci !

Discussions similaires

  1. Réponses: 11
    Dernier message: 03/06/2014, 13h46
  2. Créer un projet à partir de sources
    Par laclac dans le forum Débuter
    Réponses: 8
    Dernier message: 03/12/2008, 01h11
  3. créer un projet à partir de source sur une autre partition
    Par julien.63 dans le forum Eclipse PHP
    Réponses: 0
    Dernier message: 22/08/2007, 15h28
  4. [Maven2] Créer un jar à partir des sources
    Par Sniper37 dans le forum Maven
    Réponses: 3
    Dernier message: 25/08/2006, 14h36

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo