2

I'm barely familiar with perlbrew. I think I need to use --sitecustomize $filename but I can't find examples of this file anywhere. I have no idea what to put in the file. Anyone got a sample I can look at?

cjm
  • 61,471
  • 9
  • 126
  • 175
mr.zog
  • 533
  • 1
  • 7
  • 26
  • Same problem here, failed for both 5.12.4 and 5.14.2. I set `export CC="gcc -m32"` as [suggested by Jonathan Leffler](http://stackoverflow.com/a/216090/269126) but to no avail, the variable wasn't picked up by the perlbrew build machinery. – Lumi Feb 14 '12 at 16:55

2 Answers2

5

This appeared to work for me, on Centos 5.6 and Centos 6.2 (both 64-bit):

$ perlbrew install 5.8.9 -Accflags="-m32 -march=i686" -Aldflags="-m32 -march=i686" -Alddlflags="-shared -m32 -march=i686"

Tested with 5.8.9 and 5.12.4.

Caveat: perl still recorded archname=x86_64-linux, and used that for the arch-specific directories in the compiled-in @INC. This is a wart, but the contents are 32-bit.

zts
  • 1,461
  • 16
  • 10
  • 2
    Use the -Darchname= option to Configure to set the arch specific directory e.g. perlbrew install 5.8.9 -Darchname=i686-linux -Accflags="-m32 -march=i686" -Aldflags="-m32 -march=i686" -Alddlflags="-shared -m32 -march=i686" – Bruce Jan 28 '15 at 00:22
1

There's an introductory article on perlbrew website for using sitecustomize file http://perlbrew.pl/Install-a-sitecustomize.pl-file-with-perlbrew.html

However I don't think this file is related to building a 32bit perl on 64bit system. In fact, it does not seem to be possible at the moment, quoting the INSTALL file:

Natively 64-bit systems need neither -Duse64bitint nor -Duse64bitall. On these systems, it might be the default compilation mode, and there is currently no guarantee that passing no use64bitall option to the Configure process will build a 32bit perl. Implementing -Duse32bit* options is planned for a future release of perl.

gugod
  • 830
  • 4
  • 10