%general-entities; ]> Perl-&perl-version; 64 Bit Perl Installation of Perl Perl does not, by default, know about library directories with names other than lib, The following patch will allow it to install to other directories: patch -Np1 -i ../&perl-multilib-patch; There is a further (possibly cosmetic) anomaly - if we install perl and then run perl -V it will claim that libc is in /lib. The following sed fixes this, but only takes effect when make install is run: sed -i "/libc/s@/lib@/lib64@" hints/linux.sh We still need to tell perl to actually use lib64: echo 'installstyle="lib64/perl5"' >>hints/linux.sh ./configure.gnu --prefix=/usr \ -Dman1dir=/usr/share/man/man1 \ -Dman3dir=/usr/share/man/man3 \ -Dpager="/bin/less -isR" \ -Dlibpth="/usr/local/lib64 /lib64 /usr/lib64" \ -Dcc="gcc ${BUILD64}" \ -Dusethreads The meaning of the new configure option: -Dlibpth="/usr/local/lib64 /lib64 /usr/lib64" This tells Perl to link against the 64-bit libraries. mv /usr/bin/perl{,-64} Now we need to create a multilib wrapper that lets us choose which perl installation to use: cat > perl_wrapper.c << "EOF" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> int main (int argc, char *argv[]) { char *perl_arch; if ((perl_arch = getenv("PERL_ARCH")) == NULL) perl_arch = "64"; char *filename = malloc(strlen(argv[0]) + strlen(perl_arch) + 2); strcpy(filename, argv[0]); strcat(filename, "-"); strcat(filename, perl_arch); int ret = 0; ret = execvp(filename, argv); if ((ret != 0)&&(errno != 0)) { char *errmsg = malloc(strlen(filename) + 19); strcpy(errmsg, "Unable to execute "); strcat(errmsg, filename); perror(errmsg); free(errmsg); } free(filename); return ret; } EOF gcc ${BUILD64} perl_wrapper.c -o /usr/bin/perl This multilib wrapper makes it possible to build perl extensions other then 64-bit. The PERL_ARCH environment variable controls which perl binary to execute. Some packages that may attempt to build against perl will run perl -V:cc to get the command that was used to build perl. If you're building a 32-bit extension but you only have a 64-bit perl this is not desired. By setting PERL_ARCH=32 you will be able to build the 32-bit extension because perl -V:cc will return the command used to build the 32-bit perl installation.