This question about Installation of Foswiki, Configuration: Answered

Adding libraries loses modules

I'm using shared hosting, and to try to satisfy plugin dependencies I've downloaded from CPAN and FTPd to my hosting.

With the libraries added, I get

<verbatim>
**** ERROR ****
The following critical dependencies are missing from your installation 
 ... Crypt::PasswdMD5:
 ... Error:  

Please install these modules and then ensure all dependencies are installed by either:
 -  viewing the System.PerlDependencyReport in your local Foswki,  or
 -  running the CLI shell script tools/dependencies from your server's command line.
You can get a complete list of Perl module dependencies by viewing System.SystemRequirements
on your local system or at http://foswiki.org/System/SystemRequirements.

Foswiki will not operate correctly unless the required dependencies are installed.

Your current library search path @INC contains:

   /srv/disk2/9999999/www/wiki.site.org.uk/extralib
   /srv/disk2/9999999/www/wiki.site.org.uk/extralib/x86_64-linux-gnu-thread-multi
   /srv/disk2/9999999/www/wiki.site.org.uk/lib
   /etc/perl
   /usr/local/lib/perl/5.14.2
   /usr/local/share/perl/5.14.2
   /usr/lib/perl5
   /usr/share/perl5
   /usr/lib/perl/5.14
   /usr/share/perl/5.14
   /usr/local/lib/site_perl
   .
   /srv/disk2/9999999/www/wiki.site.org.uk/lib/CPAN/lib

You can adjust the search path by editing bin/LocalLib.cfg
</verbatim>

When I remove the top 2 libraries, it works.

I keep trying stuff, but haven't found out what's wrong.

-- DavidRimmer - 16 Jul 2016

I'm just guessing here, but is the system where you built the perl modules the same platform as the installed perl? ie, an x86_64 system? On a couple of systems I checked, on x86_64 platforms, that directory name is found in the local system libraries as well. If you are mixing 64 and 32 bit platforms, that might be causing issues.

-- GeorgeClark - 17 Jul 2016

From perlinfo on hosting: System Linux p13.runhosting.com 3.14.3nopreempt #1 SMP Mon May 12 19:52:44 EEST 2014 x86_64

-- DavidRimmer - 18 Jul 2016

It looks like both are 64bit, but the archnames are different - there's an extra -64int on the hosting.

Perhaps this means floating-point is not enabled?

Having taken things a step at a time, the error I'm getting is
Epeg.so: wrong ELF class: ELFCLASS64 at /usr/lib/perl/5.14/DynaLoader.pm line 184.

Not sure how to relate architecture to ELFCLASS though.

On the hosting
Summary of my perl5 (revision 5 version 14 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=3.16.0-4-amd64, archname=i486-linux-gnu-thread-multi-64int
    uname='linux x86-grnet-01 3.16.0-4-amd64 #1 smp debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) i686 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Dldflags= -Wl,-z,relro -Dlddlflags=-shared -Wl,-z,relro -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.14 -Darchlib=/usr/lib/perl/5.14 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.14.2 -Dsitearch=/usr/local/lib/perl/5.14.2 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Duse64bitint -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Ui_libutil -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -Dlibperl=libperl.so.5.14.2 -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='4.7.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib/i386-linux-gnu /lib/../lib /usr/lib/i386-linux-gnu /usr/lib/../lib /lib /usr/lib
    libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=, so=so, useshrplib=true, libperl=libperl.so.5.14.2
    gnulibc_version='2.13'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector'

On my pc

Summary of my perl5 (revision 5 version 22 subversion 2) configuration:
   
  Platform:
    osname=linux, osvers=3.16.0, archname=x86_64-linux-gnu-thread-multi
    uname='linux localhost 3.16.0 #1 smp debian 3.16.0 x86_64 gnulinux '
    config_args='-Dusethreads -Duselargefiles -Dcc=x86_64-linux-gnu-gcc -Dcpp=x86_64-linux-gnu-cpp -Dld=x86_64-linux-gnu-gcc -Dccflags=-DDEBIAN -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Dldflags= -Wl,-z,relro -Dlddlflags=-shared -Wl,-z,relro -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.22 -Darchlib=/usr/lib/x86_64-linux-gnu/perl/5.22 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/x86_64-linux-gnu/perl5/5.22 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.22.2 -Dsitearch=/usr/local/lib/x86_64-linux-gnu/perl/5.22.2 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Duse64bitint -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Ui_libutil -Uversiononly -DDEBUGGING=-g -Doptimize=-O2 -dEs -Duseshrplib -Dlibperl=libperl.so.5.22.2'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='x86_64-linux-gnu-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include'
    ccversion='', gccversion='5.4.0 20160609', 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='x86_64-linux-gnu-gcc', ldflags =' -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/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=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
    perllibs=-ldl -lm -lpthread -lc -lcrypt
    libc=libc-2.23.so, so=so, useshrplib=true, libperl=libperl.so.5.22
    gnulibc_version='2.23'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector-strong'

-- DavidRimmer - 19 Jul 2016

I'm currently investigating the possibility of using perlbrew to mimic my hosting environment and install CPAN modules here before moving to hosting.

Couldn't find anything on this site about doing this.

I'd appreciate comments from anyone who has tried or considered this.

-- DavidRimmer - 19 Jul 2016

oops, just found https://foswiki.org/Support/HowToUseFoswikiWithLocalPerlInstallation

-- DavidRimmer - 19 Jul 2016

One thing I can suggest, is to make sure that you are ONLY adding the particular perl modules that you need. When you built the new modules locally, it may have pulled in other binary code in the _x64 directory that may already exist on your hosting site. So make sure that you transfer the bare minimum of modules.

Another thing you could try is to add your libraries to the end of the @INC path. Foswiki automatically looks in /path/to/foswiki/lib/CPAN/lib as the "last resort", so copy your added modules into that directory instead of adding them to the front of the libpath.

-- GeorgeClark - 19 Jul 2016
 

QuestionForm edit

Subject Installation of Foswiki, Configuration
Extension
Version Foswiki 2.1.2
Status Answered
Related Topics
Topic revision: r6 - 19 Jul 2016, GeorgeClark - This page was cached on 25 May 2017 - 15:01.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License