develooper Front page | perl.perl5.porters | Postings from August 2012

deprecate and remove microperl (was Re: microperl (was Re: perl5.16.1-RC1 is now available))

Thread Previous | Thread Next
Nicholas Clark
August 17, 2012 06:27
deprecate and remove microperl (was Re: microperl (was Re: perl5.16.1-RC1 is now available))
Message ID:
On Sat, Aug 11, 2012 at 09:40:09AM +0200, François Perrad wrote:
> 2012/8/9 Nicholas Clark <>:
> > On Sun, Aug 05, 2012 at 01:58:27PM +0200, François Perrad wrote:
> >
> >> The build of microperl is broken in 5.16.0, but restored in blead
> >> (since the 27 Jul 2012)
> >> see

It was also broken in 5.12.0's release, and I don't remember if anyone

> > Sorry if I'm repeating a question I've asked previously.
> >
> > I'm curious - what are you using microperl for? I wasn't aware of anyone
> > actually finding ways to put it to use.
> >
> I work with Buildroot, which is a cross-compiling environment for
> embedded linux (see
> Buildroot comes with some packages for scripting : python, lua, ruby,
> php, tcl and microperl.
> microperl is not what I expect with an embedded linux.

No, microperl was (I think) intended as an experiment as to whether it's
possible to build perl without needing to run some other tool first to
configure it. If you could, you might be able to replace Configure with
some sort of bootstrapping approach using a microperl to build the
configuration for the real perl

Even the "no configuration" idea doesn't really work - you need at least one
canned configuration for ILP32 systems, and one for LP64 systems. (And,
possibly, a third for LLP64 systems, which may just be Win64)

> So, I work on a package of a full perl. I will post some patches in few days.
> But, I think that microperl could be useful in smaller embedded
> device, like with RTEMS (see

I'm not sure if it will be. These are the sizes of perl, microperl and
miniperl (roughly perl without DynaLoader.o) on ARM Linux, built with -Os:

-rwxr-xr-x 1 nick nick 1091074 Aug 16 21:55 microperl
-rwxr-xr-x 1 nick nick 1223695 Aug 16 15:15 miniperl
-rwxr-xr-x 1 nick nick 1332163 Aug 16 16:03 perl

Sizes on x86_64, built with -O2:

-rwxr-xr-x 1 nicholas p5p 1290000 Aug 17 12:52 microperl
-rwxr-xr-x 1 nicholas p5p 1402597 Aug 17 12:09 miniperl
-rwxr-xr-x 1 nicholas p5p 1512889 Aug 17 12:09 perl

However, if I try to graft as much of the microperl config into regular
Configure generated config (to remove as many d_* and i_* as possible),
and add -DNO_MATHOMS, and bodge a couple of things that I can't configure:

diff --git a/ b/
index 3254628..a388894 100644
--- a/
+++ b/
@@ -447,7 +447,10 @@ EOM
                open my $fh, '>>', $file or die "open $file: $!";
                # Quite possible that we're being run in parallel here.
                # Can't use Fcntl this early to get the LOCK_EX
-               flock $fh, 2 or warn "flock $file: $!";
+               eval {
+                   flock $fh, 2 or warn "flock $file: $!";
+                   1;
+               } or warn $@;
                print $fh <<"EOS";
 cd $ext_dir
 if test ! -f Makefile -a -f Makefile.old; then
diff --git a/unixish.h b/unixish.h
index c129ed1..5f5ddfe 100644
--- a/unixish.h
+++ b/unixish.h
@@ -15,7 +15,7 @@
  * here.
-#ifndef PERL_MICRO
+#if 0
  *     This symbol, if defined, indicates that the ioctl() routine is

I see

-rwxr-xr-x 1 nicholas p5p 1290000 Aug 17 15:17 microperl
-rwxr-xr-x 1 nicholas p5p 1293153 Aug 17 15:09 miniperl
-rwxr-xr-x 1 nicholas p5p 1387582 Aug 17 15:09 perl

microperl is not much different in size from miniperl.

(I don't know why perl is 94429 bytes bigger than miniperl, as DynaLoader.o
is only 9600 bytes, and the other 3 object files that differ between them
only are about 10K larger in total)

Which means that all the special-casing with -DPERL_MICRO and the various
special config files and Makefile *don't* actually gain anything meaningful
in size reduction.

As I also can't see anyone looking to replace Configure at this stage in
Perl 5's lifecycle, it's not clear to me that there's any actual case for it.

Given that we've managed to break microperl in two stable releases in the
past 3 years without anyone noticing until some time afterwards, and it costs
us time and effort to maintain it, I propose that we announce in 5.18.0 that
we're planning to eliminate it, and if no-one gives a good use case as to
why to keep it, we cull it before 5.20.0 ships.

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About