static perl?

fred anger anger at rightarm.org
Tue Nov 7 22:21:15 PST 2000


WOOP!  Thanks for dislodging that stuck brain cell :)

Here's what works for me.  To (automatically) statically install perl,
you'll need to use the following configure command in
$LFS/usr/src/perl-5.6.0:

../Configure -Dprefix=../../ -Aldflags=-static -Uusedl -Uinstallusrbinperl
-de

Then make, make test, and make install.  After you're chroot'ed, if your
script needs to "use" some perl modules, just give the path to the ones in
/usr/src/perl-5.6.0/lib (not sure why they don't install where they're
supposed to be, but you can re-install perl in the chroot'ed environment
later) using the -I option.

It may be possible to get the prefix to be correct and have the INC stuff
where it should be, but you'd still want to re-install perl anyway.  Hope
this helps someone besides me ;)

-fa

On Wed, 8 Nov 2000, Gerard Beekmans wrote:

> > Of course, this requires that perl be installed during the static part (or
> > soon thereafter).  I've attempted a couple approaches in the last few
> > hours, but thought I'd plug the list (thanks Reaperx1) before pursuing one
> > of them further.
> 
> Give me a second. In the old old old LFS days we compile Perl statically. Let 
> me dig up an old HOWTO...
> 
> Ok here is the manual way. Perhaps you can specify these things via options 
> to Configure, that I don't know, you can figure that one out yourself ;o)
> 
> Run ./Configure
> You can stick with all the default answers, except the following:
> 
> When asked:
> 	What is the file extension used for shared libraries? [so]
> Answer with:
> 	none
> 
> When asked:
> 	Any additional ld flags (NOT including libraries)? [-L/usr/local/lib]
> Answer with:
> 	-L/usr/local/lib -static
> 
> When asked:
> 	Do you wish to use dynamic loading? [y]
> Answer with:
> 	n
> 
> compile by running 'make'
> 
> copy the perl binary to $LFS/usr/bin
> 
> Or run configure with the proper prefix and 'make install' it. Whichever you 
> want. This procedure should result in a statically linked, fully operational 
> perl. Have fun
> 
> -- 
> Gerard Beekmans
> www.linuxfromscratch.org
> 
> -*- If Linux doesn't have the solution, you have the wrong problem -*-
> 
> -- 
> Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
> and put unsubscribe in the subject header of the message
> 


-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the blfs-support mailing list