Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to build perl-5.32.0 (or later) with ivsize of 4 on Ubuntu-20.04 ?

by salva (Canon)
on Jan 16, 2021 at 16:03 UTC ( #11127000=note: print w/replies, xml ) Need Help??


in reply to How to build perl-5.32.0 (or later) with ivsize of 4 on Ubuntu-20.04 ?

IIRC, IVs must be big enough to hold a pointer, so it is not possible to compile Perl with 32 bit IVs on a 64 bit platform.
  • Comment on Re: How to build perl-5.32.0 (or later) with ivsize of 4 on Ubuntu-20.04 ?

Replies are listed 'Best First'.
Re^2: How to build perl-5.32.0 (or later) with ivsize of 4 on Ubuntu-20.04 ?
by syphilis (Bishop) on Jan 17, 2021 at 00:51 UTC
    IIRC, IVs must be big enough to hold a pointer

    I've compiled perl with 32 bit IVs on 64-bit Windows 7, Debian Wheezy(ppc64), and freebsd-12.0.
    But yes, ptrsize then needs to be 4 bytes, and I assume there must also be some mechanism ensuring that addresses of all allocated memory fit into 4 bytes.

    I suspect that, with the right toolchain, I could also achieve such a build on Ubuntu, but I'm not going to chase that up right now.
    I was hoping that there might have been some simple trick I could use - hence my initial question.

    On the freebsd system, the 32-bit build was achieved by simply passing -Dcc="cc -m32" to Configure.
    When I build perl on the Debian system, I (strangely) get 32-bit builds by default, though the system perl is 64-bit. So I pass -Dcc="gcc -m64" to Configure in order to get the 64-bit builds there.
    On Windows, it's just a case of using a 32-bit toolchain and ensuring that the WIN64=undef arg is provided to make.

    Cheers,
    Rob
Re^2: How to build perl-5.32.0 (or later) with ivsize of 4 on Ubuntu-20.04 ?
by ikegami (Pope) on Jan 17, 2021 at 00:18 UTC

    Yes, Which is why they were using -m32 to build a 32-bit binary.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11127000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2021-04-21 08:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?