LFS-Support;
I spent a number of hours on this, but I finally got a 64bit perl to
build. This was done in the build environment you get from booting into
the livecd (32bit, i486-pc-linux-gnu).
Attached is a writeup as well sa my bash_history file for comparisons.
I appologize for the format of the file, I typed it in IRC and didn't feel
the need to reformat it at 0430HRS. I also appologize in advance for the
profanity that is in there. It isn't a whole lot, but it is there.
If it gets my name mentioned somewhere, I'll write up a nice professional
looking page to be added to the CLFS book :)
Thanks for everything!
Eric Stout
<stout> I just did some major crappage and got 64bit perl built. Yay me.
There should be a much
easier way tho, like sh Configure -Dbuild-64bit-on-32bit-system
<stout> instead of building 32bit, waiting for the massive slueg of error
messages, mv'ing
miniperl to miniperl-cross, then swapping all ./miniperl's for
./miniperl-cross's,
exchanging thebuild environemnt to reflect 64bit architecture, making
again, waiting for
hte errors, mv'ing perl to perl-cross, editing Makefile and changing
all ./perl's to
./perl-cross's, and making again...
<stout> but by god
<stout> lfs:/mnt/lfs/sources/perl-5.8.7$ file perl
<stout> PerlJam: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
GNU/Linux 2.6.0,
dynamically linked (uses shared libs), not stripped
... SignOff Skinjob: #perlhelp (Read error: Operation timed out)
<gjvc> 11:34 <+stout> I wantto build a 64bit perl on a 32bit system.
<gjvc> stout, got any docs on that?
<stout> I was just about to write up a small summary in here, and post my
bash_history file
somewhere
<gjvc> so nothing you're following?
<stout> Looks like it took 4 hours tho :P
<stout> Not really
<stout> I used the LFS book, sort of.
<stout> But you can tell the author got tired of fucking with it and gave up
<stout> here:
http://www.linuxfromscratch.org/clfs/view/cross-lfs/x86_64-64/temp-system/perl.html
<stout> Now here's hte deal (lots more follows)
<stout> First, disregard the initial patch. you want
perl-5.8.7-libc_lib64-1.patch
<stout> then apply the perl-5.8.7-Configure-multilibs-1.patch that the doc
doesn't mention, but
you're told ot get earlier in the book
<stout> Do the whole paragraph of stuff in the middle, the chmod; cp; sed tree
there
<stout> The next line is _almost_ accurate
<stout> it shoudl read CC="${CC} ${BUILD32} ./configure.gnu --prefix=/tools
-Dstatic_ext='Data/Dumper IO Fcntl POSIX'
<stout> then do the make miniperl; but not the rest of that line (not yet)
<gjvc> ok
<stout> you'll get errors, mv miniperl to miniperl-cross
<stout> then run make (no options)
<stout> mv perl to perl-cross
<stout> make clean; then do the next paragraph of stuff that includes
${BUILD64} and friends...
<stout> make miniperl
<stout> It'll error, but if you file miniperl; you WILL get the 64bit miniperl.
<TrapperX> bot:P
<stout> do the next line of stuff AND change all occurances of (LDLIBPTH)
./perl to (LDLIBPTH)
./perl-cross
<stout> then edit the Makefile by hand and change the remaining ./perl's to
./perl-cross and the
remaining ./miniperl's to ./miniperl-cross
<stout> the ones in test suites can be ignored (but they'll generate errors if
you ignore changing
them and it'll fail out. hwo cares, it'll fail anyways)
<stout> then run make again. you'llget a 64bit perl
... SignOff StinkfooT: #perl,#perlhelp (EMF)
<stout> Now, back at the top, the libc_lib64 patch modifies hints/linux.sh
<stout> Edit this file yourself; anywhere you see >&4, change it to.. who
cares, &>2 works.
... mode/#perl [+l 134] by L-5
<stout> On line 224, change $test to test
<stout> mkdir UU; then make a shell script called loc that echos
/some/path/to/tcsh; or if you
don't have tcsh, make it a path to a nonexistent program (to make hte
test fail)
<stout> save and run that after the second patch is applied (the
Configure-multilibs patch)
<stout> Hurrah.
<stout> You'll want to copy the miniperl and perl to somewhere useful like
/bin; and libs/* to
somewhere useful like /lib
<stout> or /lib/perl5
<stout> if you want them, copy pod/man2pod also
<stout> You should have a 64bit perl ready to use on a 64bit system. Useful
workaround for not
having a 64bit system running on your network to use as a
-Dtargethost if you want to
build it by means of -Dusecrosscompile
<stout> gjvc: Is that documentation enough?
tar -xvjf /source/perl-5.8.7.tar.bz2
cd perl-5.8.7/
ls
cd hints/
ls
vi linux.sh
cd ..
patch -Np1 -i /source/perl-5.8.7-libc_lib64-1.patch
cd hints/linux.sh
vi hints/linux.sh
sh hints/linux.sh
patch -Np1 -i /source/perl-5.8.7-Configure_multilib-1.patch
sh hints/linux.sh
vi hints/linux.sh
mkdir UU
sh hints/linux.sh
cd UU
ls
mkdir loc
cd ..
sh hints/linux.sh
vi hints/linux.sh
locate tcsh
su
cd UU
ls
rd loc
rmdir loc
ls
touch loc
ls -la
vi loc
chmod a+c loc
chmod a+x loc
cd ..
sh hints/linux.sh
cd UU
vi loc
cd ..
sh hints/linux.sh
chmod 755 ext/util/make_ext
cp ext/util/make_ext{,.orig}
sed -e 's/miniperl/miniperl-cross/g' ext/util/make_ext.orig > ext/util/make_ext
chmod 755 x2p/Makefile.SH
cp x2p/Makefile.SH{,.orig}
sed -e 's/miniperl/miniperl-cross/g' x2p/Makefile.SH.orig > x2p/Makefile.SH
chmod 755 utils/Makefile
cp utils/Makefile{,.orig}
sed -e 's/miniperl/miniperl-cross/g' utils/Makefile.orig > utils/Makefile
CC="${CC} ${BUILD32}" ./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper
IO Fcntl POSIX'
make miniperl
mv miniperl miniperl-cross
make
file perl
mv perl perl-cross
make clean
file perl-cross
file miniperl-cross
cp config.sh{,.orig}
sed -e "[EMAIL PROTECTED](^ar=\)[EMAIL PROTECTED]'${AR}'@g" -e "[EMAIL
PROTECTED](^ranlib=\)[EMAIL PROTECTED]'${RANLIB}'@g" -e "[EMAIL
PROTECTED](^cc=\)[EMAIL PROTECTED]'${CC} ${BUILD64}'@g" -e "[EMAIL
PROTECTED](^ld=\)[EMAIL PROTECTED]'${CC} ${BUILD64}'@g" config.sh.orig >
config.sh
make miniperl
file miniperl
cp Makefile{,.orig}
sed -e 's|(LDLIBPTH) ./miniperl|(LDLIBPTH) ./miniperl-cross|g' Makefile.orig >
Makefile
file perl
vi Makefile
file miniperl
cp miniperl miniperl.32.back
make
vi Makefile
make
file perl
cp perl pod/pod2man /tools/bin
install -d /tools/lib/perl5/5.8.7
cp -R lib/* /tools/lib/perl5/5.8.7
cd lib
ls
cd ..
cd .
cd ..
ls
cd perl-5.8.7/
cp miniperl-cross ~
cp perl-cross ~
cp miniperl ~
cp perl ~
cd ..
ls
rm -Rf perl-5.8.7/
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page