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

In reply to Compiling Perl 5.8.7 on x86_64 Linux Multilib by Mazr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.