Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Building perl from source

by Osprey (Initiate)
on Sep 10, 2019 at 11:19 UTC ( #11105947=perlquestion: print w/replies, xml ) Need Help??

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

I am building perl from source and the version I am getting is this:

This is perl 5, version 28, subversion 0 (%-p) built for x86_64-linux-thread-multi

However I need it to be:

This is perl 5, version 28, subversion 0 (%-p) built for x86_64-linux-thread-multi-64int-ld

Configure step that I use looks like this:

sh Configure -des -Dcc="gcc -m32 -Dusethreads -Duserelocatableinc" -Dprefix=/usr/Thirdparty/perl/5.28.0/

Can somebody please help me find out what is wrong and how to use Configure flags to make build that I need?

Thanks!

Replies are listed 'Best First'.
Re: Building perl from source
by Tux (Abbot) on Sep 10, 2019 at 12:02 UTC

    For -64int you'd need -Duse64bitint, for -ld you'd need -Duselongdouble. And of course the correct libraries and header files available.

    sh Configure -des -Dcc="gcc -m32" -Dusethreads -Duserelocatableinc -Du +se64bitint -Duselongdouble -Dprefix=/usr/Thirdparty/perl/5.28.0/

    Why do you need a 32bit int built perl with longdouble and 64bitint support? Why not build with -Duse64bitall -Duselongdouble?


    Enjoy, Have FUN! H.Merijn
Re: Building perl from source
by dave_the_m (Monsignor) on Sep 10, 2019 at 11:53 UTC
    -Dusethreads and -Duserelocatableinc are supposed to be arguments to Configure, not to gcc. So you want something like:
    sh Configure -des -Dcc="gcc -m32" -Dusethreads -Duserelocatableinc -Dp +refix=/usr/Thirdparty/perl/5.28.0/

    Dave.

Re: Building perl from source
by Corion (Pope) on Sep 10, 2019 at 11:23 UTC

    What is -64int-ld supposed to signify?

    If you have an existing perl executable, you can inspect its build parameters by looking at the output of perl -V. This should show you all the compiler flags that were used to build that Perl.

      I managed to find flags of similar build of perl (just lower version) and checked out its flags with perl -V. I now built newer version of perl with the same flags and it seems it worked.

      Thank you guys for all suggestions!
Re: Building perl from source
by syphilis (Bishop) on Sep 10, 2019 at 12:02 UTC
    sh Configure -des -Dcc="gcc -m32 -Dusethreads -Duserelocatableinc" -Dprefix=/usr/Thirdparty/perl/5.28.0/

    There's no point in providing "-Dusethreads -Duserelocatableinc" as arguments for gcc to process. It won't understand them.
    Run make distclean and try again with:
    sh Configure -des -Dcc="gcc -m32" -Dusethreads -Duserelocatableinc -Du +selongdouble -Duse64bitint -Dprefix=/usr/Thirdparty/perl/5.28.0/
    You could also try -Duse64bitall instead of -Duse64bitint.

    Cheers,
    Rob

      The combination of gcc option -m32 is likely to conflict with -Duse64bitall or its implications. -Duse64bitint should work though.


      Enjoy, Have FUN! H.Merijn
        The combination of gcc option -m32 is likely to conflict with -Duse64bitall or its implications

        Yeah - I wasn't sure if -Duse64bitall would inevitably fail to provide the 64bit pointers on an -m32 build, and I also wondered whether Osprey actually wanted the -m32 arg.
        In the end, rather than providing any detailed explanation, I just left it as a suggestion that might be tried - something that can be discussed further if Osprey is so inclined.

        IIRC, if -Duse64bitint delivers 64bit integers then -Duse64bitall will do the same, even if it fails to deliver 64bit pointers.

        Cheers,
        Rob
Re: Building perl from source
by Anonymous Monk on Sep 10, 2019 at 11:29 UTC
    Some kind of "64int" option ... use64bits

      Why give a link to the docs and than give a nonexisting example?

      $ perl -V:use.*64.* use64bitall='define'; use64bitint='define';

      Enjoy, Have FUN! H.Merijn
        Its in the docs i linked. No perl on me mobile

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://11105947]
Approved by hippo
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2019-09-17 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (207 votes). Check out past polls.

    Notices?