Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-> FAIL Installing Term::ReadKey failed. #7

Closed
hypergig opened this issue Jun 5, 2015 · 16 comments
Closed

-> FAIL Installing Term::ReadKey failed. #7

hypergig opened this issue Jun 5, 2015 · 16 comments
Assignees

Comments

@hypergig
Copy link

hypergig commented Jun 5, 2015

Morning all,

Looks like yesterday's update may have broke something...

cpanm (App::cpanminus) 1.7034 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1433511216.30684
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Term::ReadKey () on cpanmetadb ...
--> Working on Term::ReadKey
Fetching http://www.cpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.33.tar.gz
-> OK
Unpacking TermReadKey-2.33.tar.gz
Entering TermReadKey-2.33
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.04)
Configuring TermReadKey-2.33
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Term::ReadKey
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.04)
Building and testing TermReadKey-2.33
cp ReadKey.pm blib/lib/Term/ReadKey.pm
AutoSplitting blib/lib/Term/ReadKey.pm (blib/lib/auto/Term/ReadKey)
Running Mkbootstrap for Term::ReadKey ()
chmod 644 "ReadKey.bs"
"/usr/bin/perl" -I. -I/usr/share/perl5 genchars.pl

Writing termio/termios section of cchars.h... Done.
Checking for sgtty...
    Sgtty NOT found.
Writing sgtty section of cchars.h... Done.
"/usr/bin/perl" "/usr/share/perl5/ExtUtils/xsubpp" -noprototypes -typemap "/usr/share/perl5/ExtUtils/typemap"  ReadKey.xs > ReadKey.xsc && mv ReadKey.xsc ReadKey.c
gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"2.33\" -DXS_VERSION=\"2.33\" -fPIC "-I/usr/lib64/perl5/CORE"   ReadKey.c
rm -f blib/arch/auto/Term/ReadKey/ReadKey.so
gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic ReadKey.o  -o blib/arch/auto/Term/ReadKey/ReadKey.so   \
            \

chmod 755 blib/arch/auto/Term/ReadKey/ReadKey.so
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- ReadKey.bs blib/arch/auto/Term/ReadKey/ReadKey.bs 644
Manifying 1 pod document
Running Mkbootstrap for Term::ReadKey ()
chmod 644 "ReadKey.bs"
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01_basic.t ............... ok
# Looks like you planned 7 tests but ran 1.
t/02_terminal_functions.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 6/7 subtests 
    (less 1 skipped subtest: 0 okay)

Test Summary Report
-------------------
t/02_terminal_functions.t (Wstat: 65280 Tests: 1 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 7 tests but ran 1.
Files=2, Tests=2,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.03 cusr  0.00 csys =  0.06 CPU)
Result: FAIL
Failed 1/2 test programs. 0/2 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing Term::ReadKey failed. See /root/.cpanm/work/1433511216.30684/build.log for details. Retry with --force to force install it.

I am no perl guy but could this have something to do with the unit tests? Installing this package is part of our deployment scripts for new environments, so we download and install it multiple times per day. This morning I hit this error and I think there was an update last night. I am trying to downgrade now.

Thanks!

@hypergig
Copy link
Author

hypergig commented Jun 5, 2015

Downgrading totally worked fyi
JSTOWE/TermReadKey-2.32.tar.gz

@jonathanstowe
Copy link
Owner

Hi,
Thanks for this, but unfortunately you don't provide enough information for me to diagnose the problem you are having - the module is tested against the version of perl that you appear to be using and passes:

https://travis-ci.org/jonathanstowe/TermReadKey/jobs/65469982

Please can you add the output of "perl -V" and the run the failing test manually with :

perl Makefile.PL
make
perl -Mblib t/02_terminal_functions.t

In the directory that you downloaded and unpacked the module. If you don't have the source (I don't know whether cpan minus keeps it hanging around anywhere,) you may need to download it directly from e.g. https://cpan.metacpan.org/authors/id/J/JS/JSTOWE/TermReadKey-2.33.tar.gz and unpack it etc.

Bear in mind that it is not possible to test against every possible version of perl on every possible operating system before release so these things may happen.

@jonathanstowe jonathanstowe self-assigned this Jun 5, 2015
@andyjones
Copy link

It might be https://github.com/jonathanstowe/TermReadKey/blob/master/t/02_terminal_functions.t#L41 skipping 1 test but the plan is to run 7 tests.

ac5e11f looks like it should workaround it too

@oneandoneis2
Copy link

I'm having problems with this issue as well - is there any chance of the fix being released to CPAN?

@ioanrogers
Copy link

I'm getting this error when performing a Docker build. Running docker with an interactive terminal has all tests passing, and forcing 2.32 also installs fine non-interactively

ncopa pushed a commit to alpinelinux/aports that referenced this issue Mar 30, 2016
This reverts commit da1dd7d.

The tests fail in builder when abuild is run without terminal.
Upstream bug: jonathanstowe/TermReadKey#7
@jonathanstowe
Copy link
Owner

This should all be fixed up with the v2.34 release which I am just going sending to CPAN now.

@sillitoe
Copy link

sillitoe commented Oct 6, 2016

Great timing - thanks!

Just found myself on this page following up my own Docker install.

@jonathanstowe
Copy link
Owner

Let me know how it goes :)

@jonathanstowe
Copy link
Owner

@sillitoe
Copy link

sillitoe commented Oct 6, 2016

Hmmm... doesn't seem to work for me (directly from github release).

Step 36 : RUN cpanm -l $PERL_DIR -v https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz
 ---> Running in 634f177650d3
cpanm (App::cpanminus) 1.7042 on perl 5.024000 built for x86_64-linux
Work directory is /root/.cpanm/work/1475773257.7                                                                                                         
You have make /usr/bin/make                                                                                                                              
You have /usr/bin/wget                                                                                                                                   
You have /bin/tar: tar (GNU tar) 1.27.1                                                                                                                  
Copyright (C) 2013 Free Software Foundation, Inc.                                                                                                        
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.                                                                           
This is free software: you are free to change and redistribute it.                                                                                       
There is NO WARRANTY, to the extent permitted by law.                                                                                                    

Written by John Gilmore and Jay Fenlason.                                                                                                                
You have /usr/bin/unzip                                                                                                                                  
--> Working on https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz
Fetching https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz ... converted 'https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz' (ANSI_X3.4-1968) -> 'https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz' (UTF-8)                                                      
--2016-10-06 17:00:57--  https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz                                                               
Resolving github.com (github.com)... 192.30.253.112                                                                                                      
Connecting to github.com (github.com)|192.30.253.112|:443... connected.                                                                                  
HTTP request sent, awaiting response... 302 Found                                                                                                        
Location: https://codeload.github.com/jonathanstowe/TermReadKey/tar.gz/v2.34 [following]                                                                 
converted 'https://codeload.github.com/jonathanstowe/TermReadKey/tar.gz/v2.34' (ANSI_X3.4-1968) -> 'https://codeload.github.com/jonathanstowe/TermReadKey/tar.gz/v2.34' (UTF-8)                                                                                                                                   
--2016-10-06 17:00:57--  https://codeload.github.com/jonathanstowe/TermReadKey/tar.gz/v2.34                                                              
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120                                                                                    
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.                                                                
HTTP request sent, awaiting response... 200 OK                                                                                                           
Length: 82662 (81K) [application/x-gzip]                                                                                                                 
Saving to: 'v2.34.tar.gz'                                                                                                                                

     0K .......... .......... .......... .......... .......... 61%  167K 0s                                                                              
    50K .......... .......... ..........                      100%  205K=0.4s                                                                            

2016-10-06 17:00:58 (180 KB/s) - 'v2.34.tar.gz' saved [82662/82662]                                                                                      

Unpacking v2.34.tar.gz                                                                                                                                   
OK
TermReadKey-2.34/
TermReadKey-2.34/.gitignore
TermReadKey-2.34/.travis.yml
TermReadKey-2.34/Changes
TermReadKey-2.34/Configure.pm
TermReadKey-2.34/MANIFEST
TermReadKey-2.34/MANIFEST.SKIP
TermReadKey-2.34/Makefile.PL
TermReadKey-2.34/README
TermReadKey-2.34/ReadKey.xs
TermReadKey-2.34/ReadKey_pm.PL
TermReadKey-2.34/example/
TermReadKey-2.34/example/test.pl
TermReadKey-2.34/genchars.pl
TermReadKey-2.34/ppport.h
TermReadKey-2.34/t/
TermReadKey-2.34/t/01_basic.t
TermReadKey-2.34/t/02_terminal_functions.t
Entering TermReadKey-2.34
Running Makefile.PL                                                                                                                                      
Configuring TermReadKey-2.34 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Term::ReadKey
Writing MYMETA.yml and MYMETA.json
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.10_01)
OK
Building and testing TermReadKey-2.34 ... Running Mkbootstrap for Term::ReadKey ()
chmod 644 "ReadKey.bs"
"/usr/local/bin/perl" genchars.pl

Writing termio/termios section of cchars.h... Done.
Checking for sgtty...
        Sgtty NOT found.
Writing sgtty section of cchars.h... Done.
"/usr/local/bin/perl" "/usr/local/lib/perl5/5.24.0/ExtUtils/xsubpp" -noprototypes -typemap "/usr/local/lib/perl5/5.24.0/ExtUtils/typemap"  ReadKey.xs > ReadKey.xsc && mv ReadKey.xsc ReadKey.c
cc -c   -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2   -DVERSION=\"2.34\" -DXS_VERSION=\"2.34\" -fPIC "-I/usr/local/lib/perl5/5.24.0/x86_64-linux/CORE"   ReadKey.c
rm -f blib/arch/auto/Term/ReadKey/ReadKey.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector-strong ReadKey.o  -o blib/arch/auto/Term/ReadKey/ReadKey.so  \
        \

chmod 755 blib/arch/auto/Term/ReadKey/ReadKey.so
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- ReadKey.bs blib/arch/auto/Term/ReadKey/ReadKey.bs 644
"/usr/local/bin/perl" ReadKey_pm.PL ReadKey.pm
Creating ReadKey.pm
Bootstrapping the XS for blockoptions: Can't locate loadable object for module Term::ReadKey in @INC (@INC contains: /opt/cathwww/perl5/lib/lib/perl5/x86_64-linux /opt/cathwww/perl5/lib/lib/perl5 /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux /usr/local/lib/perl5/site_perl/5.24.0 /usr/local/lib/perl5/5.24.0/x86_64-linux /usr/local/lib/perl5/5.24.0 .) at /usr/local/lib/perl5/5.24.0/x86_64-linux/DynaLoader.pm line 95.
        DynaLoader::croak("Can't locate loadable object for module Term::ReadKey in \@INC"...) called at /usr/local/lib/perl5/5.24.0/x86_64-linux/DynaLoader.pm line 159
        DynaLoader::bootstrap("Term::ReadKey") called at ReadKey_pm.PL line 507
make: *** [ReadKey.pm] Error 255
Makefile:531: recipe for target 'ReadKey.pm' failed
! Installing https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz failed. See /root/.cpanm/work/1475773257.7/build.log for details. Retry with --force to force install it.
FAIL

@sillitoe
Copy link

sillitoe commented Oct 6, 2016

Perl stuff:

$ sudo docker run -it 47ad79d92cf9 bash
root@56e95c0f4023:/opt/cathwww/checkout# which perl
/usr/local/bin/perl
root@56e95c0f4023:/opt/cathwww/checkout# perl -V
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

  Platform:
    osname=linux, osvers=3.16.0-4-amd64, archname=x86_64-linux
    uname='linux 2da0903ff372 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 gnulinux '
    config_args='-Duse64bitall -Duseshrplib -des'
    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 ='-fwrapv -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',
    cppflags='-fwrapv -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 -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.19.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/lib/perl5/5.24.0/x86_64-linux/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        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_LOCALE_TIME
                        USE_PERLIO USE_PERL_ATOF
  Locally applied patches:
        Devel::PatchPerl 1.42
  Built under linux
  Compiled at Aug 26 2016 20:07:56
  %ENV:
    PERL_DIR="/opt/cathwww/perl5/lib/"
  @INC:
    /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux
    /usr/local/lib/perl5/site_perl/5.24.0
    /usr/local/lib/perl5/5.24.0/x86_64-linux
    /usr/local/lib/perl5/5.24.0
    .

@sillitoe
Copy link

sillitoe commented Oct 6, 2016

For info - if you have docker installed and running then this can be reproduced with:

$ vim Dockerfile
# DOCKER-VERSION
FROM         perl:latest
RUN apt-get update
RUN curl -L http://cpanmin.us | perl - App::cpanminus
RUN cpanm -v https://github.com/jonathanstowe/TermReadKey/archive/v2.34.tar.gz
$ sudo docker build .

@jonathanstowe
Copy link
Owner

Okay that is a bit odd, it's a 5.24.0 thing, it appears that the Makefile doesn't run the scripts with 'blib'; Which is surprising, I've fixed it locally, but it may take a little time to test.

@sillitoe
Copy link

sillitoe commented Oct 6, 2016

Thanks for looking into it - will check in later, let me know if I can help

@jonathanstowe
Copy link
Owner

I've created a specific issue for the above in #21

@jonathanstowe
Copy link
Owner

I'm going to close this issue now, as I am fairly certain the original problem is now fixed even if there are certain other issues with the subsequent release.

Please make separate issues for any further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants