develooper Front page | perl.perl5.porters | Postings from November 2000

[PATCHES Bleadperl] Re: PerlIO - what all of you can all do.

Thread Next
Dominic Dunlop
November 11, 2000 09:20
[PATCHES Bleadperl] Re: PerlIO - what all of you can all do.
Message ID:
This is a success report for perl from,
generated with the help of perlbug 1.33 running under perl v5.7.0.

Perl reported to build OK on this system.  Tests OK with PERLIO=stdio 
and PERLIO=perlio.  PERLIO=mmap should not be relevant to this 
platform, and results in an immediate

Bad system call (core dumped)

from TEST because MachTen does actually have mmap() and munmap system 
call stubs, which do nothing but make the kernel say "huh?".  Aha. 
Aha ha ha.  Something for the hints file.  The first patch below is 
for that.  With the updated hints, running with PERLIO=mmap gives an 
"Unknown layer" warning.

On the subject of that warning,

$ PERLIO=cake ./miniperl -e 1
Unknown layer cake.

is really too terse for comfort.  How about 'perlio: unknown layer 
"cake"'?  See the second patch, which also includes a highly 
provisional description for perlwarn.pod.

--- perl@7613-perlio/hints/	Sun Oct 22 18:36:12 2000
+++ perl@7613-perlio/hints/	Sat Nov 11 11:54:51 2000
@@ -15,6 +15,9 @@
 #	Martijn Koster <>
 #	Richard Yeh <>
+# Deny system's false claims to support mmap() and munmap(); note
+# also that Sys V IPC (re)disabled by jhi due to continuing inadequacy
+#                      -- Dominic Dunlop <> 001111
 # Remove dynamic loading libraries from search; enable SysV IPC with
 # MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions
 #                      -- Dominic Dunlop <> 000224
@@ -197,6 +200,11 @@
+# MachTen has stubs for mmap and munmap(), but they just result in the
+# caller being killed on the grounds of "Bad system call"
 # Get rid of some extra libs which it takes Configure a tediously
 # long time never to find on MachTen, or which break perl
 set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \
@@ -228,6 +236,8 @@
 as well as similar messages concerning \$d_sem and \$d_shm.  Select the
 default answers: MachTen 4.1 appears to provide System V IPC support,
 but it is incomplete and buggy: perl should be built without it.
+Similar considerations apply to memory mapping of files, controlled
+by \$d_mmap and \$d_munmap.
 Similarly, when you see
--- perl@7613-perlio/perlio.c~	Wed Nov  8 14:26:00 2000
+++ perl@7613-perlio/perlio.c	Sat Nov 11 17:20:01 2000
@@ -385,7 +385,7 @@ PerlIO_default_layer(I32 n)
-          Perl_warn(aTHX_ "Unknown layer %.*s",(e-s),s);
+          Perl_warn(aTHX_ "perlio: unknown layer \"%.*s\"",(e-s),s);
          s = e;
--- perl@7613-perlio/pod/perldiag.pod~	Tue Nov  7 01:02:38 2000
+++ perl@7613-perlio/pod/perldiag.pod	Sat Nov 11 18:08:07 2000
@@ -2584,6 +2584,15 @@ the problem, however, you will get the s
 you run Perl.  How to really fix the problem can be found in
 L<perllocale> section B<LOCALE PROBLEMS>.
+=item perlio: unknown layer "%s"
+(S) An attempt was made to push an unknown layer onto the Perl I/O
+system.  (Layers take care of transforming data between external and
+internal representations.)  Note that some layers, such as C<mmap>,
+are not supported in all environments.  If your program didn't
+explicitly request the failing operation, it may be the result of the
+value of the environment variable PERLIO.
 =item Permission denied
 (F) The setuid emulator in suidperl decided you were up to no good.

Site configuration information for perl v5.7.0:

Configured by domo at Fri Nov 10 16:44:42 WET 2000.

Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration:
    osname=machten, osvers=4.1.4, archname=powerpc-machten
    uname='machten ppp100 5 0.5 powerpc '
    config_args='-e -Duseperlio'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    cc='cc', ccflags ='-DNOTDEF_MACHTEN -DREG_INFTY=2047 -I/usr/local/include',
    optimize='-O2 -fomit-frame-pointer',
    cppflags='-DNOTDEF_MACHTEN -DREG_INFTY=2047 -I/usr/local/include'
    ccversion='', gccversion='2.8.1', gccosandvers='machten4'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -Xlstack=1048576 -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib
    libs=-lndbm -lgdbm -ldb -lm -lc -lutil
    perllibs=-lndbm -lgdbm -ldb -lm -lc -lutil
    libc=/usr/lib/libc.a, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
    cccdlflags='', lddlflags=''

Locally applied patches:

@INC for perl v5.7.0:

Environment for perl v5.7.0:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
Dominic Dunlop

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