ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.pod
(Generate patch)

Comparing App-Staticperl/staticperl.pod (file contents):
Revision 1.41 by root, Thu May 19 18:58:19 2011 UTC vs.
Revision 1.47 by root, Sat Jul 9 18:26:27 2011 UTC

84With F<staticperl>, the burden is mostly with the developer - only direct 84With F<staticperl>, the burden is mostly with the developer - only direct
85compile-time dependencies and L<AutoLoader> are handled automatically. 85compile-time dependencies and L<AutoLoader> are handled automatically.
86This means the modules to include often need to be tweaked manually. 86This means the modules to include often need to be tweaked manually.
87 87
88All this does not preclude more permissive modes to be implemented in 88All this does not preclude more permissive modes to be implemented in
89the future, but right now, you have to resolve state hidden dependencies 89the future, but right now, you have to resolve hidden dependencies
90manually. 90manually.
91 91
92=item * PAR works out of the box, F<staticperl> does not. 92=item * PAR works out of the box, F<staticperl> does not.
93 93
94Maintaining your own custom perl build can be a pain in the ass, and while 94Maintaining your own custom perl build can be a pain in the ass, and while
202=item F<staticperl cpan> [args...] 202=item F<staticperl cpan> [args...]
203 203
204Starts an interactive CPAN shell that you can use to install further 204Starts an interactive CPAN shell that you can use to install further
205modules. Installs the perl first if necessary, but apart from that, 205modules. Installs the perl first if necessary, but apart from that,
206no magic is involved: you could just as well run it manually via 206no magic is involved: you could just as well run it manually via
207F<~/.staticperl/perl/bin/cpan>. 207F<~/.staticperl/perl/bin/cpan>, except that F<staticperl> additionally
208sets the environment variable C<$PERL> to the path of the perl
209interpreter, which is handy in subshells.
208 210
209Any additional arguments are simply passed to the F<cpan> command. 211Any additional arguments are simply passed to the F<cpan> command.
210 212
211=item F<staticperl instcpan> module... 213=item F<staticperl instcpan> module...
212 214
566 SOME_MARKER 568 SOME_MARKER
567 569
568 # load the binary 570 # load the binary
569 chomp (my $data = do "bindata.pl"); 571 chomp (my $data = do "bindata.pl");
570 572
573=item C<--allow-dlls>
574
575By default, when F<mkbundle> hits a dynamic perl extension (e.g. a F<.so>
576or F<.dll> file), it will stop with a fatal error.
577
578This option instead packages the shared object into the bundle, with a
579prefix of F<&fs/perl/> (e.g. F<&fs/perl/auto/List/Util/Util.so>). What you
580do with that is up to you, F<staticperl> has no special support for this
581at the moment, apart from working around the lack of availability of
582F<PerlIO::scalar> while bootstrapping, at a speed cost.
583
584One way to deal with this is to write all files starting with F<&fs/> into
585some directory and C<unshift>ing the path corresponding to F<&fs/perl/>
586onto C<@INC>.
587
588#TODO: example
589
571=back 590=back
572 591
573=item Step 2: filter all files using C<--include> and C<--exclude> options. 592=item Step 2: filter all files using C<--include> and C<--exclude> options.
574 593
575After all candidate files and modules are added, they are I<filtered> 594After all candidate files and modules are added, they are I<filtered>
882=item C<STATICPERL> 901=item C<STATICPERL>
883 902
884The directory where staticperl stores all its files 903The directory where staticperl stores all its files
885(default: F<~/.staticperl>). 904(default: F<~/.staticperl>).
886 905
887=item C<PERL_MM_USE_DEFAULT>, C<EV_EXTRA_DEFS>, ... 906=item C<DLCACHE>
888 907
889Usually set to C<1> to make modules "less inquisitive" during their 908The path to a directory (will be created if it doesn't exist) where
890installation, you can set any environment variable you want - some modules 909downloaded perl sources are being cached, to avoid downloading them
891(such as L<Coro> or L<EV>) use environment variables for further tweaking. 910again. The default is empty, which means there is no cache.
892 911
893=item C<PERL_VERSION> 912=item C<PERL_VERSION>
894 913
895The perl version to install - default is currently C<5.12.3>, but C<5.8.9> 914The perl version to install - default is currently C<5.12.3>, but C<5.8.9>
896is also a good choice (5.8.9 is much smaller than 5.12.3, while 5.10.1 is 915is also a good choice (5.8.9 is much smaller than 5.12.3, while 5.10.1 is
897about as big as 5.12.3). 916about as big as 5.12.3).
917
918=item C<PERL_MM_USE_DEFAULT>, C<EV_EXTRA_DEFS>, ...
919
920Usually set to C<1> to make modules "less inquisitive" during their
921installation. You can set (and export!) any environment variable you want
922- some modules (such as L<Coro> or L<EV>) use environment variables for
923further tweaking.
898 924
899=item C<PERL_PREFIX> 925=item C<PERL_PREFIX>
900 926
901The prefix where perl gets installed (default: F<$STATICPERL/perl>), 927The prefix where perl gets installed (default: F<$STATICPERL/perl>),
902i.e. where the F<bin> and F<lib> subdirectories will end up. 928i.e. where the F<bin> and F<lib> subdirectories will end up.
1167twice the address space needed for stacks). 1193twice the address space needed for stacks).
1168 1194
1169If you use C<linuxthreads.old>, then you should also be aware that 1195If you use C<linuxthreads.old>, then you should also be aware that
1170uClibc shares C<errno> between all threads when statically linking. See 1196uClibc shares C<errno> between all threads when statically linking. See
1171L<http://lists.uclibc.org/pipermail/uclibc/2010-June/044157.html> for a 1197L<http://lists.uclibc.org/pipermail/uclibc/2010-June/044157.html> for a
1172workaround (And L<https://bugs.uclibc.org/2089> for discussion). 1198workaround (and L<https://bugs.uclibc.org/2089> for discussion).
1173 1199
1174C<ccache> support is also recommended, especially if you want 1200C<ccache> support is also recommended, especially if you want
1175to play around with buildroot options. Enabling the C<miniperl> 1201to play around with buildroot options. Enabling the C<miniperl>
1176package will probably enable all options required for a successful 1202package will probably enable all options required for a successful
1177perl build. F<staticperl> itself additionally needs either C<wget> 1203perl build. F<staticperl> itself additionally needs either C<wget>
1185it from working properly in a chroot - either use dash (and link it to 1211it from working properly in a chroot - either use dash (and link it to
1186F</bin/sh> inside the chroot) or link busybox to F</bin/sh>, using it's 1212F</bin/sh> inside the chroot) or link busybox to F</bin/sh>, using it's
1187built-in ash shell. 1213built-in ash shell.
1188 1214
1189Finally, you need F</dev/null> inside the chroot for many scripts to work 1215Finally, you need F</dev/null> inside the chroot for many scripts to work
1190- F<cp /dev/null output/target/dev> or bind-mounting your F</dev> will 1216- either F<cp /dev/null output/target/dev> or bind-mounting your F</dev>
1191both provide this. 1217will provide this.
1192 1218
1193After you have compiled and set up your buildroot target, you can copy 1219After you have compiled and set up your buildroot target, you can copy
1194F<staticperl> from the C<App::Staticperl> distribution or from your 1220F<staticperl> from the C<App::Staticperl> distribution or from your
1195perl f<bin> directory (if you installed it) into the F<output/target> 1221perl F<bin> directory (if you installed it) into the F<output/target>
1196filesystem, chroot inside and run it. 1222filesystem, chroot inside and run it.
1197 1223
1198=head1 RECIPES / SPECIFIC MODULES 1224=head1 RECIPES / SPECIFIC MODULES
1199 1225
1200This section contains some common(?) recipes and information about 1226This section contains some common(?) recipes and information about

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines