Mazr has asked for the wisdom of the Perl Monks concerning the following question:

I've been trying to compile Perl 5.8.7 on CentOS 4.2 x86_64 (RHEL4 clone), however I've been having a difficult time.

The fatal issue is that make consistently dies with a bunch of undefiend references ending in:

libperl.a(pp.o)(.text+0x88be): In function `Perl_pp_int': : undefined reference to `floor' libperl.a(pp_pack.o)(.text+0x46ff): In function `S_pack_rec': : undefined reference to `floor' libperl.a(pp_pack.o)(.text+0x4723): In function `S_pack_rec': : undefined reference to `floor' collect2: ld returned 1 exit status make: *** [miniperl] Error 1

I've tried applying some patches (perl-5.8.7-Configure_multilib-1.patch and perl-5.8.7-libc_lib64-1.patch), setting -Dlibpth to the lib64 directories and setting -shared in LD_RUN_PATH / lddlpaths without success. I know it can be built since CentOS ships with Perl 5.8.5 with use64bitint and use64bitall. I've seen a bunch of RPMs but would like to compile from source.

A second issue is make generates a number of comparison errors like the following before it dies:

regexec.c:2166: warning: comparison is always false due to limited range of data type

I have two questions:

  1. Is running 64-bit Perl on x86_64 linux recommended? Is it considered production ready?
  2. How can 5.8.7 be compiled from source on a x86_64 multilib system with default lib and lib64 directories?

Many thanks,
John

UPDATE #1:

I found the following url which solved the the fatal errors:

http://www.linuxfromscratch.org/clfs/view/cross-lfs/x86_64/final-system/perl-64bit.html

Perl needs to be told to use lib64 after the patches are applied:

echo 'installstyle="lib64/perl5"' >>hints/linux.sh

UPDATE #2

mod_perl 2.0.2 won't compile unless Perl is compiled with -fPIC so I added the following before configuring Perl:

echo 'ccflags="-fPIC -m64 $ccflags"' >>hints/linux.sh