Monks,
I am migrating from CentOS 6 to CentOS 8 and find that a critical piece of software won't run on the CentOS 8 server.
I've been programming Perl for about 25 years, but I don't know much about what goes on under the hood, especially when it comes to operating systems and compilation.
The application (which was a commercial product that is no longer available), basically runs on perl 5.8.6, although it includes quite a few executables. It's a search engine (the Northern Light Enterprise Search Engine, which was a big player in the early web search engine space, pre-Google).
When the application installs itself, it copies onto the target server a precompiled version of perl 5.8.6 and many Perl modules, such as XML::Simple. It doesn't actually recompile that version of perl. Amazingly the whole thing worked after it was installed onto a CentOS 6 box about five years ago, after having worked for many years (2004-ish) on an earlier server.
On the CentOS 8 server, When I run (from a bash shell) a particular Perl script that ordinarily sets up various users and passwords, the result is
-bash: /usr/local/ese/bin/ese_configurator.pl: /usr/local/ese/bin/perl: bad interpreter: No such file or directory
I've confirmed that the problem is not line endings (i.e., there is no ^M at the end of the #!/usr/local/ese/bin/perl shebang line). I've also confirmed that /usr/local/ese/bin/perl exists and has executable permissions; it's the perl 5.8.6 executable.
I ran the "file" command on the 5.8.6 on the CentOS 8 server:
$> file /usr/local/ese/bin/perl
$> /usr/local/ese/bin/perl: ELF 32-bit LSB executable, Intel 80386,
+ version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2
+, for GNU/Linux 2.2.5, stripped
I thought (naively) that I might be able to substitute a Perlbrew-installed perl 5.8.9 and modify @INC by adding a 'use lib' statement to the aforesaid configurator script so as to pick up the local directories that were installed by the application, -- but no joy:
$> /usr/local/ese/bin/ese_configurator.pl
$> Can't load '/usr/local/ese/perl/lib/5.8.6/i686-linux-thread-mult
+i/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/local/ese
+/perl/lib/5.8.6/i686-linux-thread-multi/auto/Data/Dumper/Dumper.so: w
+rong ELF class: ELFCLASS32 at /usr/local/ese/perl/lib/5.8.6/i686-linu
+x-thread-multi/XSLoader.pm line 68.
at /usr/local/ese/perl/lib/5.8.6/i686-linux-thread-multi/Data/Dump
+er.pm line 27
Compilation failed in require at /usr/local/ese/bin/ese_configurato
+r.pl line 6.
BEGIN failed--compilation aborted at /usr/local/ese/bin/ese_configu
+rator.pl line 6.
I've also tried moving (copying) modules from the non-working 5.8.6 installation into the site_perl directories of the working perlbrew perl 5.8.9, but I gave up before finishing because I figured that it would be silly to expect that the non-pure-Perl modules from CentOS 8 would run if they were merely copied into the 5.8.9 directories.
FWIW, here are the results of running -V on the 5.8.6 that is running fine on the CentOS 6 server:
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=linux, osvers=2.4.20-31.9smp, archname=i686-linux-thread-mu
+lti
uname='linux research4 2.4.20-31.9smp #1 smp tue apr 13 17:40:10 e
+dt 2004 i686 i686 i386 gnulinux '
config_args='-d -e'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemulti
+plicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
+ -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/inclu
+de -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DPERL_US
+E_SAFE_PUTENV -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/
+include/gdbm'
ccversion='', gccversion='3.4.4', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1
+2
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
+ lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/devel/sandbox/_last_build_sandbox/ese/ese/
+db-4.3.27.NC/build_unix -L/devel/sandbox/_last_build_sandbox/ese/ese/
+expat-1.95.7/.libs -L/devel/sandbox/_last_build_sandbox/ese/ese/opens
+sl-0.9.7d/blib/lib -L/devel/sandbox/_last_build_sandbox/ese/ese/gdbm-
+1.8.3/.libs -L/usr/local/lib'
libpth=/devel/sandbox/_last_build_sandbox/ese/ese/db-4.3.27.NC/bui
+ld_unix /devel/sandbox/_last_build_sandbox/ese/ese/expat-1.95.7/.libs
+ /devel/sandbox/_last_build_sandbox/ese/ese/openssl-0.9.7d/blib/lib /
+devel/sandbox/_last_build_sandbox/ese/ese/gdbm-1.8.3/.libs /usr/local
+/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.
+a
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/devel/sandbox/_last_buil
+d_sandbox/ese/ese/db-4.3.27.NC/build_unix -L/devel/sandbox/_last_buil
+d_sandbox/ese/ese/expat-1.95.7/.libs -L/devel/sandbox/_last_build_san
+dbox/ese/ese/openssl-0.9.7d/blib/lib -L/devel/sandbox/_last_build_san
+dbox/ese/ese/gdbm-1.8.3/.libs -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL
+_IMPLICIT_CONTEXT
Built under linux
Compiled at May 18 2008 21:42:19
@INC:
/usr/local/ese/perl/lib/5.8.6/i686-linux-thread-multi
/usr/local/ese/perl/lib/5.8.6
/usr/local/ese/perl/lib/site_perl/5.8.6/i686-linux-thread-multi
/usr/local/ese/perl/lib/site_perl/5.8.6
/usr/local/ese/perl/lib/site_perl
.
Here are the results of running -V on the perl version 5.8.9 that I had installed on the development server (CentOS 8), in hopes of being able to use it in lieu of the 5.8.6 -- perhaps it has details about the CentOS 8 system that are useful to know:
Summary of my perl5 (revision 5 version 8 subversion 9) configuration:
Platform:
osname=linux, osvers=4.18.0-193.28.1.el8_2.x86_64, archname=x86_64
+-linux
uname='linux rs3.benefitslink.com 4.18.0-193.28.1.el8_2.x86_64 #1
+smp thu oct 22 00:20:22 utc 2020 x86_64 x86_64 x86
+
+ _64 gnulinux '
config_args='-de -Dprefix=/home/www/perl5/perlbrew/perls/perl-5.8.
+9 -Aeval:scriptdir=/home/www/perl5/perlbrew/perls/
+
+ perl-5.8.9/bin'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultipl
+icity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -I/usr/local
+/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6
+
+ 4',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='8.3.1 20191121 (Red Hat 8.3.1-5)', gccos
+andvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1
+6
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
+ lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/li
+b /lib64 /usr/lib64 /usr/local/lib64
libs=-ldl -lm -lcrypt -lutil -lc
perllibs=-ldl -lm -lcrypt -lutil -lc
libc=libc-2.28.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.28'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
USE_FAST_STDIO USE_LARGE_FILES USE_PERLIO
Locally applied patches:
Devel::PatchPerl 2.02
Built under linux
Compiled at Nov 16 2020 19:57:40
%ENV:
PERLBREW_HOME="/home/www/.perlbrew"
PERLBREW_ROOT="/home/www/perl5/perlbrew"
PERLBREW_SHELLRC_VERSION="0.89"
@INC:
/home/www/perl5/perlbrew/perls/perl-5.8.9/lib/5.8.9/x86_64-linux
/home/www/perl5/perlbrew/perls/perl-5.8.9/lib/5.8.9
/home/www/perl5/perlbrew/perls/perl-5.8.9/lib/site_perl/5.8.9/x86_
+64-linux
/home/www/perl5/perlbrew/perls/perl-5.8.9/lib/site_perl/5.8.9
.
The CentOS 8 server is running a 5.26 as the system Perl. FWIW, here is the result of running "ldd" on it:
$> ldd /usr/bin/perl
linux-vdso.so.1 (0x00007fffb67cd000)
libperl.so.5.26 => /lib64/libperl.so.5.26 (0x00007f151ee10000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f151ebf0000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f151e9d9000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f151e7d5000)
libm.so.6 => /lib64/libm.so.6 (0x00007f151e453000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f151e22a000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007f151e026000)
libc.so.6 => /lib64/libc.so.6 (0x00007f151dc64000)
/lib64/ld-linux-x86-64.so.2 (0x00007f151f422000)
I ran "ldd" on the 5.8.6 that was copied onto the CentOS 8 server:
$> ldd /usr/local/ese/perl/bin/perl5.8.6
not a dynamic executable
So, I wonder if you could suggest anything I could do in order to get the search engine running on CentOS 8.
If you have any other ideas for solving my problem, I'd be very much interesting to hear that, too.
THANKS.