thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

curl -L http://getpinto.stratopan.com | bash failed on centos #67

Closed melezhik closed 11 years ago

melezhik commented 11 years ago
[vagrant@pinto-berkshelf ~]$ curl -L http://getpinto.stratopan.com | bash
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100  4927  100  4927    0     0   5834      0 --:--:-- --:--:-- --:--:--  5834
 Installing pinto into /home/vagrant/opt/local/pinto
 Can't locate Module/CoreList.pm in @INC (@INC contains: CODE(0x1967498)      /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl      /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at       /loader/0x1967498/App/cpanminus/script.pm line 94.
[vagrant@pinto-berkshelf ~]$ 

[vagrant@pinto-berkshelf ~]$ cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m
thaljef commented 11 years ago

That's interesting. Looks like cpanm can't load Module::CoreList. But it should be there in any recent perl.

I know that @miyagawa has made some changes to cpanm recently which caused the pinto installer to break in other ways. So it now ships with an older version of cpanm. I don't know if that will also fix your problem. But please try running the installer again and tell me what you get.

miyagawa commented 11 years ago

cpanm -L doesn't work with perl < 5.8.9 unless you install Module::CoreList separately.

thaljef commented 11 years ago

Thanks @miyagawa! That would explain it.

I'll have to think if there's a way I can bootstrap that.

miyagawa commented 11 years ago

in theory you could make a fatpacked cpanm with CoreList bundled, just for < 5.8.9. I avoided doing it in general just because it bloats the executable size unnecessarily.

thaljef commented 11 years ago

I was thinking I could have cpanm install Module::CoreList (without -L) before installing Pinto (with -L). This would only happen on old Perls of course.

miyagawa commented 11 years ago

Yeah that works too. Don't forget to set a path (via perl -I.. or PERL5LIB) before running the second cpanm so that it can load the CoreList just installed.

thaljef commented 11 years ago

This is getting ugly. I tried running various versions of cpanm on perl-5.6.2. Some versions don't compile (syntax errors -- how weird is that), or they lack basic modules like Scalar::Util. I'm just not sure running cpanm on really old perls is feasible. @miyagawa?

I'm not really certain if this is the right problem to solve anyway, since @melezhik hasn't yet told us which perl version he's using. I'm trying to figure out what ships with CentOS 6.3, but I haven't found an answer yet.

miyagawa commented 11 years ago

5.6 is not supported by cpanm at this point.  — Sent from Mailbox for iPhone

On Mon, May 6, 2013 at 9:53 PM, Jeffrey Ryan Thalhammer notifications@github.com wrote:

This is getting ugly. I tried running various versions of cpanm on perl-5.6.2. Some versions don't compile (syntax errors -- how weird is that), or they lack basic modules like Scalar::Util. I'm just not sure running cpanm on really old perls is feasible. @miyagawa?

I'm not really certain if this is the right problem to solve anyway, since the @melezhik hasn't yet told us which perl version he's using. I'm trying to figure out what ships with CentOS 6.3, but I haven't found an answer yet.

Reply to this email directly or view it on GitHub: https://github.com/thaljef/Pinto/issues/67#issuecomment-17523255

melezhik commented 11 years ago

The bug appiared on the version of perl higher than 5.6:

[root@pinto-berkshelf vagrant]# perl -v

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Also Module/CoreList.pm is not in canonical list - http://search.cpan.org/dist/perl-5.10.1/

I guess list of modules added in pinto repo should be as wide as possible to avoid issues related different perl distros.

melezhik commented 11 years ago

Here is more example of bug:

Expected process to exit with [0], but received '2'
---- Begin output of cat /root/opt/local/pinto/misc/bin/installer.sh | bash ----
STDOUT: Installing pinto into /root/opt/local/pinto
STDERR: Can't locate Module/CoreList.pm in @INC (@INC contains: CODE(0x16fc2a8) /usr/local/lib64/perl5     /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at     /loader/0x16fc2a8/App/cpanminus/script.pm line 1566.
---- End output of cat /root/opt/local/pinto/misc/bin/installer.sh | bash ----
Ran cat /root/opt/local/pinto/misc/bin/installer.sh | bash returned 2

$ perl -V

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=linux, osvers=2.6.32-220.el6.x86_64, archname=x86_64-linux-thread-multi
    uname='linux c6b8.bsys.dev.centos.org 2.6.32-220.el6.x86_64 #1 smp tue dec 6 19:48:22 gmt 2011 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DDEBUGGING=-g -Dversion=5.10.1 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib64/perl5/vendor_perl -Dinc_version_list=5.10.0 -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-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='gcc', ldflags =' -fstack-protector'
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.12'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
  Built under linux
  Compiled at Apr 30 2013 12:24:05
  @INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .

$ uname -a

    Linux pinto-berkshelf 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64  GNU/Linux

$ cat /etc/issue

CentOS release 6.4 (Final)
Kernel \r on an \m
miyagawa commented 11 years ago

Also Module/CoreList.pm is not in canonical list - http://search.cpan.org/dist/perl-5.10.1/

No. search.cpan.org just doesn't display all the bundled modules. Module::CoreList definitely is shipped with 5.10.1: http://cpansearch.perl.org/src/DAPM/perl-5.10.1/lib/Module/CoreList.pm

Module::CoreList has been in core since perl 5.8.9.

> corelist -a Module::CoreList
Module::CoreList was first released with perl v5.8.9
  v5.8.9     2.17      
  v5.10.0    2.13      
  v5.10.1    2.18      

If CentOS perl is shipped without core modules bundled, that's a different story.

melezhik commented 11 years ago

If CentOS perl is shipped without core modules bundled, that's a different story.

Ok, agree with you, but anyway I guess it's not good idea to rely on certain perl distro while doing pinto install, the install script should be pretty agnostic, there are many vagrant boxes with various perls. So why not to install some missed perl modules as option or may be do some additional modules install depending on platform / architecture ? I may be done easily with pinto cookbook ... really this approach was taken in version 0.1.3

miyagawa commented 11 years ago

cpanm -L doesn't work with distribution that strips perl modules that are meant to be shipped with perl.

I have nothing to add to the discussion whether Pinto should do anything.

melezhik commented 11 years ago

I have nothing to add to the discussion whether Pinto should do anything.

All right ((: I thought the comment was by Jefrry , so may comment has intended for him. Thank you for explanation anyway ...

melezhik commented 11 years ago

So on centos full list of missed dependencies (they are supposed to be in core ) is: CGI, Time::HiRes and Module::CoreList. So I guess using cpanm --local-lib instead of cpanm -L will solve the problem ...


This log is for the same platform (centos) and same perl (5.10.) were mentioned in previous comments

[2013-05-13T09:56:50+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out [2013-05-13T09:56:50+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[cat /home/pinto/opt/local/pinto/misc/bin/installer.sh | bash](pinto::application line 48) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' ---- Begin output of cat /home/pinto/opt/local/pinto/misc/bin/installer.sh | bash ---- STDOUT: Installing pinto into /home/pinto/opt/local/pinto/opt/local/pinto STDERR: Successfully installed JSON-PP-2.27202 Successfully installed CPAN-Meta-YAML-0.008 Successfully installed Parse-CPAN-Meta-1.4404 (upgraded from 1.39) Successfully installed version-0.9902 (upgraded from 0.77) Successfully installed Module-Metadata-1.000011 Successfully installed CPAN-Meta-Requirements-2.122 Successfully installed CPAN-Meta-2.130880 Successfully installed Perl-OSType-1.003 Successfully installed ExtUtils-CBuilder-0.280205 (upgraded from 0.2602) Successfully installed ExtUtils-ParseXS-3.18 (upgraded from 2.2002) Successfully installed Module-Build-0.4003 (upgraded from 0.340201) Successfully installed List-MoreUtils-0.33 Successfully installed parent-0.225 Successfully installed Module-Build-CleanInstall-0.05 Successfully installed Digest-SHA-5.84 Successfully installed Crypt-PasswdMD5-1.3 Successfully installed Apache-Htpasswd-1.9 Successfully installed Test-Manifest-1.23 Successfully installed Test-File-1.34 Successfully installed Compress-Raw-Bzip2-2.060 Successfully installed Compress-Raw-Zlib-2.060 Successfully installed IO-Compress-2.060 Successfully installed URI-1.60 Successfully installed LWP-MediaTypes-6.02 Successfully installed Encode-Locale-1.03 Successfully installed IO-HTML-1.00 Successfully installed HTTP-Date-6.02 Successfully installed HTTP-Message-6.06 Successfully installed Test-Tester-0.108 Successfully installed Test-NoWarnings-1.04 Successfully installed Test-Deep-0.110 Successfully installed HTTP-Body-1.17 Successfully installed Class-Accessor-0.34 Successfully installed Try-Tiny-0.12 Successfully installed Test-Fatal-0.010 Successfully installed Test-Requires-0.06 Successfully installed Module-Runtime-0.013 Successfully installed Module-Implementation-0.06 Successfully installed Params-Validate-1.07 Successfully installed Class-Data-Inheritable-0.08 Successfully installed Authen-Simple-0.5 Successfully installed Authen-Simple-Passwd-0.6 Successfully installed Sub-Uplevel-0.24 Successfully installed Test-Simple-0.98 (upgraded from 0.92) Successfully installed Tree-DAG_Node-1.11 Successfully installed Carp-1.26 (upgraded from 1.11) Successfully installed Test-Warn-0.24 Successfully installed File-ShareDir-Install-0.04 Successfully installed Stream-Buffered-0.02 Successfully installed ExtUtils-MakeMaker-6.64 (upgraded from 6.55_02) Successfully installed Class-Inspector-1.28 Successfully installed File-ShareDir-1.03 ! Couldn't find module or a distribution Time::HiRes (0) ! Bailing out the installation for Test-SharedFork-0.21. Retry with --prompt or --force. ! Bailing out the installation for Test-TCP-1.26. Retry with --prompt or --force. Successfully installed Hash-MultiValue-0.13 Successfully installed Devel-StackTrace-1.30 Successfully installed Apache-LogFormat-Compiler-0.12 Successfully installed Filesys-Notify-Simple-0.10 Successfully installed HTTP-Negotiate-6.01 Successfully installed File-Listing-6.04 Successfully installed HTML-Tagset-3.20 Successfully installed HTML-Parser-3.69 Successfully installed HTTP-Daemon-6.01 Successfully installed Net-HTTP-6.06 Successfully installed HTTP-Cookies-6.01 Successfully installed WWW-RobotRules-6.02 Successfully installed libwww-perl-6.05 Successfully installed Devel-StackTrace-AsHTML-0.14 ! Bailing out the installation for Plack-1.0023. Retry with --prompt or --force. Successfully installed Params-Util-1.07 Successfully installed Sub-Install-0.926 Successfully installed Data-OptList-0.107 Successfully installed Sub-Exporter-0.985 Successfully installed Dist-CheckConflicts-0.02 Successfully installed Package-DeprecationManager-0.13 Successfully installed Package-Stash-XS-0.26 Successfully installed Package-Stash-0.34 Successfully installed Class-Load-0.20 Successfully installed CPAN-Meta-Check-0.005 Successfully installed Test-CheckDeps-0.002 Successfully installed Sub-Name-0.05 Successfully installed Sub-Identify-0.04 Successfully installed Sub-Exporter-Progressive-0.001009 Successfully installed Variable-Magic-0.52 Successfully installed B-Hooks-EndOfScope-0.12 Successfully installed namespace-clean-0.24 Successfully installed Task-Weaken-1.04 Successfully installed MRO-Compat-0.12 Successfully installed Class-Load-XS-0.06 Successfully installed Eval-Closure-0.08 Successfully installed Devel-GlobalDestruction-0.09 Successfully installed Moose-2.0604 Successfully installed Test-Exception-0.31 Successfully installed Carp-Clan-6.04 Successfully installed MooseX-Types-0.35 Successfully installed Path-Class-0.32 Successfully installed MooseX-Types-Path-Class-0.06 Successfully installed File-NFSLock-1.21 Successfully installed Test-use-ok-0.10 Successfully installed Test-TempDir-0.05 Successfully installed Capture-Tiny-0.21 Successfully installed Test-FailWarnings-0.003 Successfully installed File-pushd-1.005 Successfully installed Devel-Hide-0.0009 Successfully installed PathTools-3.40 (upgraded from 3.30) Successfully installed autodie-2.16 (upgraded from 2.06_01) Successfully installed Path-Tiny-0.020 Successfully installed Safe-Isa-1.000003 Successfully installed Test-LWP-UserAgent-0.018 Successfully installed IPC-Run-0.92 Successfully installed Cwd-Guard-0.01 Successfully installed ExtUtils-Helpers-0.018 Successfully installed ExtUtils-Config-0.007 Successfully installed ExtUtils-InstallPaths-0.009 Successfully installed Module-Build-Tiny-0.017 Successfully installed Net-Server-2.007 Successfully installed HTTP-Parser-XS-0.15 Successfully installed Data-Dump-1.21 Successfully installed Starman-0.3008 Successfully installed CPAN-DistnameInfo-0.12 Successfully installed Compress-Bzip2-2.10 Successfully installed Text-Glob-0.09 Successfully installed Number-Compare-0.03 Successfully installed File-Find-Rule-0.33 Successfully installed Data-Compare-1.22 Successfully installed CPAN-Checksums-2.08 Successfully installed PerlIO-gzip-0.18 Successfully installed Exception-Class-1.37 Successfully installed Archive-Zip-1.30 Successfully installed Package-Constants-0.02 Successfully installed IO-Zlib-1.10 Successfully installed Archive-Tar-1.90 Successfully installed UNIVERSAL-require-0.13 Successfully installed Archive-Any-Create-0.02 Successfully installed File-Next-1.12 Successfully installed Text-Template-1.46 Successfully installed Module-Faker-0.014 Successfully installed HTTP-Tiny-0.028 Successfully installed namespace-autoclean-0.13 Successfully installed MooseX-MarkAsMethods-0.15 Successfully installed MooseX-SetOnce-0.200001 Successfully installed Probe-Perl-0.01 Successfully installed IPC-Run3-0.045 Successfully installed Test-Script-1.07 Successfully installed File-Which-1.09 Successfully installed File-HomeDir-1.00 Successfully installed Class-Accessor-Lite-0.05 Successfully installed Router-Simple-0.14 Successfully installed Exporter-Tidy-0.07 Successfully installed Proc-Fork-0.802 Successfully installed strictures-1.004004 Successfully installed Role-Tiny-1.002005 Successfully installed Class-Method-Modifiers-2.03 Successfully installed Moo-1.001000 Successfully installed MooX-Types-MooseLike-0.23 Successfully installed Throwable-0.200007 Successfully installed DBI-1.624 Successfully installed DBD-SQLite-1.37 Successfully installed Scope-Guard-0.20 Successfully installed Data-Dumper-Concise-2.020 Successfully installed Config-Any-0.23 Successfully installed Class-XSAccessor-1.16 Successfully installed Class-Accessor-Grouped-0.10009 Successfully installed Clone-0.34 Successfully installed Hash-Merge-0.12 Successfully installed Getopt-Long-Descriptive-0.093 Successfully installed SQL-Abstract-1.73 Successfully installed Context-Preserve-0.01 Successfully installed Class-Accessor-Chained-0.01 Successfully installed Data-Page-2.02 Successfully installed Algorithm-C3-0.08 Successfully installed Class-C3-0.24 Successfully installed Class-C3-Componentised-1.001000 Successfully installed Module-Find-0.11 Successfully installed DBIx-Class-0.08209 Successfully installed MooseX-NonMoose-0.22 Successfully installed MooseX-StrictConstructor-0.19 Successfully installed IO-String-1.08 Successfully installed asa-1.03 Successfully installed IO-Handle-Util-0.01 Successfully installed Test-Harness-3.26 (upgraded from 3.17) Successfully installed Algorithm-Diff-1.1902 Successfully installed Text-Diff-1.41 Successfully installed Data-Dumper-2.145 (upgraded from 2.124) Successfully installed Test-Differences-0.61 Successfully installed Test-Most-0.31 Successfully installed Any-Moose-0.21 Successfully installed Text-Clip-0.0014 Successfully installed Term-EditorEdit-0.0016 Successfully installed List-AllUtils-0.03 Successfully installed Mixin-Linewise-0.003 Successfully installed Config-INI-0.019 Successfully installed Text-Reform-1.20 Successfully installed Text-Autoformat-1.669002 Successfully installed MooseX-Configuration-0.02 Successfully installed Readonly-1.03 Successfully installed DateTime-Locale-0.45 Successfully installed Test-Output-1.01 Successfully installed Class-Singleton-1.4 Successfully installed DateTime-TimeZone-1.58 Successfully installed DateTime-0.78 Successfully installed String-RewritePrefix-0.006 Successfully installed IO-TieCombine-1.002 Successfully installed App-Cmd-0.320 Successfully installed MooseX-ClassAttribute-0.27 Successfully installed IO-Interactive-0.0.6 ! Couldn't find module or a distribution CGI (0) Successfully installed UNIVERSAL-isa-1.20120726 Successfully installed UNIVERSAL-can-1.20120726 ! Bailing out the installation for Test-MockObject-1.20120301. Retry with --prompt or --force. Successfully installed File-Spec-Native-1.003 ! Bailing out the installation for Dist-Metadata-0.925. Retry with --prompt or --force. Successfully installed Term-ANSIColor-4.02 (upgraded from 2.00) Successfully installed Digest-SHA1-2.13 Successfully installed UUID-Tiny-1.03 Successfully installed Module-CoreList-2.85 (upgraded from 2.18) Successfully installed String-Format-1.17 Successfully installed MooseX-Aliases-0.10 Successfully installed URI-FromHash-0.03 Successfully installed MooseX-Types-URI-0.03 Successfully installed Package-Locator-0.006 Successfully installed IPC-Cmd-0.80 (upgraded from 0.46) Successfully installed Archive-Extract-0.68 Successfully installed common-sense-3.6 Successfully installed JSON-XS-2.33 Successfully installed JSON-2.53 Successfully installed TermReadKey-2.30 Successfully installed Term-Prompt-1.04 ! Bailing out the installation for Pinto-0.082. Retry with --prompt or --force. 222 distributions installed ---- End output of cat /home/pinto/opt/local/pinto/misc/bin/installer.sh | bash ---- Ran cat /home/pinto/opt/local/pinto/misc/bin/installer.sh | bash returned 1

melezhik commented 11 years ago

My current workaround for centOS is here - https://github.com/melezhik/cookbooks/commit/5d3761aa3cf869085381755fa6ae5e5e374c0e01

thaljef commented 11 years ago

I have added Time::HiRes and CGI to the repository, although I'm curious to figure out which module wants CGI.

But I think bootstrapping Module::CoreList is better done on your end, Alexey.

It is a shame that centos ships a broken perl.

melezhik commented 11 years ago
melezhik commented 10 years ago

It is a shame that centos ships a broken perl. https://bugzilla.redhat.com/show_bug.cgi?id=985791