Compilation error installing Nominatim

Nyxynyx asked:

I am trying to install Nominatim from its source on github. PostgreSQL 9.1 and PostGIS 2 has already been installed using yum. The system is running CentOS 6.3 with cPanel.

git clone --recursive
cd Nominatim

Problem: This is when the error occurs as shown below. Any suggestions/idea how this can be fixed? Thanks!!!

autoreconf: Entering directory `.'
autoreconf: not using Gettext
autoreconf: running: aclocal -I osm2pgsql/m4 --output=aclocal.m4t
/usr/share/automake-1.11/Automake/ line 23:

This Perl hasn't been configured and built properly for the threads
module to work.  (The 'useithreads' configuration option hasn't been used.)

Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module.  (In other words, threaded and non-threaded Perls
are binary incompatible.)

If you want to the use the threads module, please contact the people
who built your Perl.

Cannot continue, aborting.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.8.8/i686-linux/ line 28.
Compilation failed in require at /usr/share/automake-1.11/Automake/ line 23.
BEGIN failed--compilation aborted at /usr/share/automake-1.11/Automake/ line 26.
Compilation failed in require at /usr/share/automake-1.11/Automake/ line 26.
BEGIN failed--compilation aborted at /usr/share/automake-1.11/Automake/ line 26.
Compilation failed in require at /usr/bin/aclocal line 39.
BEGIN failed--compilation aborted at /usr/bin/aclocal line 39.
autoreconf: aclocal failed with exit status: 255

Output of perl -V

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    osname=linux, osvers=2.6.18-028stab094.3, archname=i686-linux
    uname='linux 2.6.18-028stab094.3 #1 smp thu sep 22 12:47:37 msd 2011 i686 i686 i386 gnulinux '
    config_args='-ds -e -Dprefix=/usr/local -Doptimize=-Os -Duseshrplib -Dusemymalloc=y'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=y, bincompat5005=undef
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='4.4.4 20100726 (Red Hat 4.4.4-13)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/local/lib/perl5/5.8.8/i686-linux/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Dec  4 2011 16:39:22
    PERL_MB_OPT="--install_base /home/dev/perl5"

My answer:

That is not the version of perl which comes with CentOS.

From looking at the output, it seems you have a second version of perl installed in /usr/local and was built by God-only-knows-who. It also appears to be a pretty minimalist version of perl.

As I mentioned before, you really should start over with a CentOS box that hasn’t been corrupted by whatever breakage cPanel applies. You will continue to run into problems that are difficult to solve, as long as you use it.

Anyway, try removing /usr/local/bin from your PATH and then building the program. This should ensure that the locally installed Perl doesn’t get run, and the system Perl (which works correctly) gets used instead.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.