perl-carton / carton

Bundler or pip freeze for Perl
http://search.cpan.org/dist/carton
Other
492 stars 96 forks source link

Compile modules distribution #212

Open biancalana opened 8 years ago

biancalana commented 8 years ago

To distribute compile modules I install plenv + carton and required modules like Net::SSLeay, HTML::Parser, pack the entire plenv dir and distribute that to the machines of the same arch.

Everything looks good on destination machine:

$ perl -V
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

  Platform:
    osname=linux, osvers=3.10.0-327.13.1.el7.x86_64, archname=x86_64-linux
    uname='linux a.localdomain 3.10.0-327.13.1.el7.x86_64 #1 smp thu mar 31 16:04:38 utc 2016 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Dprefix=/opt/plenv/versions/5.24.0 -de -Dusedevel -A'eval:scriptdir=/opt/plenv/versions/5.24.0/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 ='-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.8.5 20150623 (Red Hat 4.8.5-4)', 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 /lib/../lib64 /usr/lib/../lib64 /lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.17'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    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 PERL_USE_DEVEL 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.40
  Built under linux
  Compiled at Aug 10 2016 20:50:59
  @INC:
    /opt/plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/x86_64-linux
    /opt/plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0
    /opt/plenv/versions/5.24.0/lib/perl5/5.24.0/x86_64-linux
    /opt/plenv/versions/5.24.0/lib/perl5/5.24.0
]$ cpanm Net::SSLeay
!
! Can't write to /opt/plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0 and /opt/plenv/versions/5.24.0/bin: Installing modules to /home/administrator/perl5
! To turn off this warning, you have to do one of the following:
!   - run me as a root or with --sudo option (to install to /opt/plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0 and /opt/plenv/versions/5.24.0/bin)
!   - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
!   - Install local::lib by running the following commands
!
!         cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
!
Net::SSLeay is up to date. (1.77)

But when I try to deploy an application that require one of those modules using carton install --deployment, the installation can't find Net::SSLeay and HTML::Parser

$ carton install --deployment
Installing modules using /home/administrator/os-deployer/build/opt/os-deployer/cpanfile (deployment mode)
Successfully installed Email-Address-1.908
Successfully installed Email-MIME-Encodings-1.315
Successfully installed MIME-Types-2.13
Successfully installed Email-Date-Format-1.005
Successfully installed Email-Simple-2.210
Successfully installed Email-MessageID-1.406
Successfully installed Email-MIME-ContentType-1.018
Successfully installed Email-MIME-1.937
Successfully installed Digest-HMAC-1.03
Successfully installed Net-DNS-1.06
Successfully installed Log-Log4perl-1.47
! Configure failed for Net-SSLeay-1.74. See /home/administrator/.cpanm/work/1470871555.18117/build.log for details.
! Installing the dependencies failed: Module 'Net::SSLeay' is not installed
! Bailing out the installation for IO-Socket-SSL-2.029.
Successfully installed Authen-SASL-2.16
! Installing the dependencies failed: Module 'IO::Socket::SSL' is not installed
! Bailing out the installation for Net-SMTPS-0.04.
Successfully installed Log-Trace-1.070
Successfully installed Test-Assertions-1.054
Successfully installed File-Slurp-9999.19
Successfully installed File-Policy-1.005
Successfully installed URI-1.71
Successfully installed LWP-MediaTypes-6.02
Successfully installed Encode-Locale-1.05
Successfully installed HTTP-Date-6.02
Successfully installed IO-HTML-1.001
Successfully installed HTTP-Message-6.11
Successfully installed File-Listing-6.04
Successfully installed Net-HTTP-6.09
Successfully installed WWW-RobotRules-6.02
Successfully installed HTML-Tagset-3.20
! Installing HTML::HeadParser failed. See /home/administrator/.cpanm/work/1470871555.18117/build.log for details. Retry with --force to force inst                                                             all it.
Successfully installed HTTP-Negotiate-6.01
Successfully installed HTTP-Cookies-6.01
Successfully installed HTTP-Daemon-6.01
! Installing the dependencies failed: Module 'HTML::HeadParser' is not installed, Module 'HTML::Entities' is not installed
! Bailing out the installation for libwww-perl-6.15.
Successfully installed Module-Build-0.4218
Successfully installed Try-Tiny-0.24
Successfully installed Test-Fatal-0.014
Successfully installed Sub-Override-0.09
! Installing the dependencies failed: Module 'HTML::Parser' is not installed, Module 'HTML::TokeParser' is not installed
! Bailing out the installation for HTML-TokeParser-Simple-3.16.
Successfully installed Data-Serializer-0.60
! Installing the dependencies failed: Module 'LWP::UserAgent' is not installed, Module 'HTML::TokeParser::Simple' is not installed
! Bailing out the installation for Email-MIME-CreateHTML-1.041.
Successfully installed Mojolicious-6.66
! Installing the dependencies failed: Module 'Net::SMTPS' is not installed, Module 'Email::MIME::CreateHTML' is not installed
! Bailing out the installation for /home/administrator/os-deployer/build/opt/os-deployer/.
35 distributions installed
Installing modules failed

I'm in doubt if its related to #210 but all of those modules have provides correct set on install.json

Any idea ??

mark-5 commented 8 years ago

I'm guessing you have some system library differences on the machines, that are causing issues during the compilation for those XS modules. For instance, Net::SSLeay requires openssl headers, which most default openssl packages don't provide.

Is there anything from the build.log you can link to?