Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 111186
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.46
Fixed in: (no value)



Subject: Can't locate object method "easy_closure_global_cleanup" via package "Log::Log4perl"
I do not understand how that is possible. Because the method actually exists and with the system perl there is no error I add stack strace before line 70 to see more detailed info: $ cpan install Exception::Class Loading internal null logger. Install Log::Log4perl for logging messages Reading '/home/feelsafe/.cpan/Metadata' Database was generated on Wed, 13 Jan 2016 09:17:02 GMT Exception::Class is up to date (1.39). Show quoted text
>>>>STACK TRACE
Log::Log4perl /home/feelsafe/public_html/lib/Log/Log4perl.pm 5 Log::Log4perl::Logger::cleanup main /home/feelsafe/perl_bin/bin/cpan 15 Log::Log4perl::END main /home/feelsafe/perl_bin/bin/cpan 15 (eval) <<<<<STACK TRACE Can't locate object method "easy_closure_global_cleanup" via package "Log::Log4perl" at /home/feelsafe/public_html/lib/Log/Log4perl/Logger.pm line 70. END failed--call queue aborted at /home/feelsafe/perl_bin/bin/cpan line 15. The local perl compiled with next options: which perl /home/feelsafe/perl_bin/bin/perl feelsafe@vpn:~$ perl -V Summary of my perl5 (revision 5 version 22 subversion 1) configuration: Platform: osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-thread-multi uname='linux vpn.guru 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) x86_64 gnulinux ' config_args='-Dusetreads -DDEBUGGING' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=y, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2', optimize='-O2 -g', cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY MYMALLOC PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV PERL_TRACK_MEMPOOL USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Jan 13 2016 09:58:53 %ENV: PERL5LIB="/home/feelsafe/tmp/perl_libs/lib:/home/feelsafe/public_html/lib:/home/feelsafe/perl5/lib/perl5:/home/feelsafe/tmp/perl_libs/lib:/home/feelsafe/public_html/lib:/home/feelsafe/perl5/lib/perl5" PERL_MB_OPT="--install_base "/home/feelsafe/perl5"" PERL_MM_OPT="INSTALL_BASE=/home/feelsafe/perl5" @INC: /home/feelsafe/tmp/perl_libs/lib /home/feelsafe/public_html/lib /home/feelsafe/perl5/lib/perl5/x86_64-linux-thread-multi /home/feelsafe/perl5/lib/perl5 /home/feelsafe/tmp/perl_libs/lib /home/feelsafe/public_html/lib /home/feelsafe/perl5/lib/perl5/x86_64-linux-thread-multi /home/feelsafe/perl5/lib/perl5 /home/feelsafe/perl_bin/lib/site_perl/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/site_perl/5.22.1 /home/feelsafe/perl_bin/lib/5.22.1/x86_64-linux-thread-multi /home/feelsafe/perl_bin/lib/5.22.1 .
On 2016-01-14 02:03:09, kes-kes@yandex.ru wrote: Show quoted text
> I do not understand how that is possible. Because the method actually > exists and with the system perl there is no error > > I add stack strace before line 70 to see more detailed info: > > $ cpan install Exception::Class > Loading internal null logger. Install Log::Log4perl for logging > messages > Reading '/home/feelsafe/.cpan/Metadata' > Database was generated on Wed, 13 Jan 2016 09:17:02 GMT > Exception::Class is up to date (1.39).
> >>>> STACK TRACE
> Log::Log4perl /home/feelsafe/public_html/lib/Log/Log4perl.pm 5 > Log::Log4perl::Logger::cleanup > main /home/feelsafe/perl_bin/bin/cpan 15 Log::Log4perl::END > main /home/feelsafe/perl_bin/bin/cpan 15 (eval) > <<<<<STACK TRACE > Can't locate object method "easy_closure_global_cleanup" via package > "Log::Log4perl" at > /home/feelsafe/public_html/lib/Log/Log4perl/Logger.pm line 70. > END failed--call queue aborted at /home/feelsafe/perl_bin/bin/cpan > line 15. > > > The local perl compiled with next options: > which perl > /home/feelsafe/perl_bin/bin/perl > feelsafe@vpn:~$ perl -V > Summary of my perl5 (revision 5 version 22 subversion 1) > configuration: > > Platform: > osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux-thread- > multi > uname='linux vpn.guru 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt20- > 1+deb8u2 (2016-01-02) x86_64 gnulinux ' > config_args='-Dusetreads -DDEBUGGING' > hint=recommended, useposix=true, d_sigaction=define > useithreads=define, usemultiplicity=define > use64bitint=define, use64bitall=define, uselongdouble=undef > usemymalloc=y, bincompat5005=undef > Compiler: > cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING > -fno-strict-aliasing -pipe -fstack-protector-strong > -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 > -D_FORTIFY_SOURCE=2', > optimize='-O2 -g', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno- > strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' > ccversion='', gccversion='4.9.2', gccosandvers='' > intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, > doublekind=3 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, > longdblkind=3 > ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=8, prototype=define > Linker and Libraries: > ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib' > libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include- > fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu > /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib > libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc > perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc > libc=libc-2.19.so, so=so, useshrplib=false, libperl=libperl.a > gnulibc_version='2.19' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' > cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib > -fstack-protector-strong' > > > Characteristics of this binary (from libperl): > Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY MYMALLOC > PERLIO_LAYERS PERL_DONT_CREATE_GVSV > PERL_HASH_FUNC_ONE_AT_A_TIME_HARD > PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP > PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV > PERL_TRACK_MEMPOOL USE_64_BIT_ALL > USE_64_BIT_INT > USE_ITHREADS USE_LARGE_FILES USE_LOCALE > USE_LOCALE_COLLATE USE_LOCALE_CTYPE > USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO > USE_PERL_ATOF USE_REENTRANT_API > Built under linux > Compiled at Jan 13 2016 09:58:53 > %ENV: > PERL5LIB="/home/feelsafe/tmp/perl_libs/lib:/home/feelsafe/public_html/lib:/home/feelsafe/perl5/lib/perl5:/home/feelsafe/tmp/perl_libs/lib:/home/feelsafe/public_html/lib:/home/feelsafe/perl5/lib/perl5" > PERL_MB_OPT="--install_base "/home/feelsafe/perl5"" > PERL_MM_OPT="INSTALL_BASE=/home/feelsafe/perl5" > @INC: > /home/feelsafe/tmp/perl_libs/lib > /home/feelsafe/public_html/lib > /home/feelsafe/perl5/lib/perl5/x86_64-linux-thread-multi > /home/feelsafe/perl5/lib/perl5 > /home/feelsafe/tmp/perl_libs/lib > /home/feelsafe/public_html/lib > /home/feelsafe/perl5/lib/perl5/x86_64-linux-thread-multi > /home/feelsafe/perl5/lib/perl5 > /home/feelsafe/perl_bin/lib/site_perl/5.22.1/x86_64-linux-thread- > multi > /home/feelsafe/perl_bin/lib/site_perl/5.22.1 > /home/feelsafe/perl_bin/lib/5.22.1/x86_64-linux-thread-multi > /home/feelsafe/perl_bin/lib/5.22.1 > .
I think you get a compilation error when loading Log/Log4perl.pm, somewhere between the line "use Log::Log4perl::Logger;" and the definition of easy_closure_global_cleanup. I can reproduce a problem if I add a line BEGIN { die } somewhere in this region. To see what's going on in your installation, you could add a "warn $@;" after the line my $log4perl_loaded = eval "require Log::Log4perl; 1"; in .../App/Cpan.pm
From: kes-kes [...] yandex.ru
I have found where the problem is. Because of latest perl upgrade, the new local perl has no installed Log::Log4perl yet. And because of I do local modification for Log::Log4perl for customer's site, I put this lib under /site/lib/ $env | grep PERL PERL5LIB=/site/lib:/home/user/perl_lib/lib/perl5 PERL_MB_OPT=--install_base "/home/user/perl_lib" PERL_MM_OPT=INSTALL_BASE=/home/user/perl_lib so the /site/lib/Log/Log4perl.pm cause to pass `eval 'require Log::Log4perl'` (I suppose) but in the whole it fails because of it can work alone. 1. temporary removing the path from perl5lib to it; 2. force install Log::Log4perl fixes the problem
Thanks for debugging this, looks like you somehow ended up with a partial Log4perl installation. Glad to hear you've found the problem!