Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Compiling perl on 64 bit system

by rlb3 (Deacon)
on Dec 21, 2007 at 18:43 UTC ( [id://658496]=perlquestion: print w/replies, xml ) Need Help??

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

I'm having lots of trouble compiling perl 5.10.0 on CentOS 5.1 x86_64. This is the configure line I'm using:
./Configure -des -Dprefix=/usr -Acflags='-fPID -DPIC -m64' -Aldflags=' +-L/usr/lib64 -L/lib64 -lm'
It compiles and make test works but if I use CPAN to install Bundle::CPAN I start getting internal perl errors like:
Attempt to free unreferenced scalar: SV 0x2v363923

Does anyone know the magic formula to compile perl on 64 bit systems? Oh, and the same thing happens if I compile perl 5.8.8 with the same config line.

Replies are listed 'Best First'.
Re: Compiling perl on 64 bit system
by Joost (Canon) on Dec 21, 2007 at 18:56 UTC

      If I leave everything off miniperl errors out and make fails.

Re: Compiling perl on 64 bit system
by hawtin (Prior) on Dec 22, 2007 at 13:42 UTC

    Last time I compiled Perl for a 64 bit machine I had real problems that arose from the fact I initially tried to build a 64bit version with a 32 bit version of gcc. Are you sure that the files created by your gcc are 64bit?

    I tested by creating hello.c, compiling it and runing the file command on the result.

    I found that having a 64 bit version of gcc which created 64bit executables by default made all the issues go away.

      Sorry I was out on vacation last week...

      This is what I get after running file on a test binary:

      test: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU +/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2. +6.9, not stripped
Re: Compiling perl on 64 bit system
by Tux (Canon) on Jan 01, 2008 at 14:02 UTC

    Why did you not leave the basics to Configure?

    ./Configure -Duse64bitall -Dprefix=/usr -des

    and report back what fails. The next step - if it still fails - is to check for a hint file, and put the missing hints in hints/centos.sh (or whatever it is trying to use).


    Enjoy, Have FUN! H.Merijn

      I think I found a configure line that is working for me.

      ./Configure -des -Dprefix=/usr -Acflags='-fPID -DPIC -m64' -Aldflags=' +-L/usr/lib64 -L/lib64 -lresolv -lnsl -ldl -lm -lcrypt -lutil -lc'

      Thank you to everyone who replied

Re: Compiling perl on 64 bit system
by Anonymous Monk on Dec 22, 2008 at 14:53 UTC
    Thank you very very much!! You stop me from thowing my PC out of the window!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://658496]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-18 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found