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

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

Thread Next
From:
Dominic Dunlop
Date:
November 11, 2000 09:20
Subject:
[PATCHES Bleadperl] Re: PerlIO - what all of you can all do.
Message ID:
p04320401b632c4c3335b@[192.168.1.4]
This is a success report for perl from domo@computer.org,
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/machten.sh~	Sun Oct 22 18:36:12 2000
+++ perl@7613-perlio/hints/machten.sh	Sat Nov 11 11:54:51 2000
@@ -15,6 +15,9 @@
 #	Martijn Koster <m.koster@webcrawler.com>
 #	Richard Yeh <rcyeh@cco.caltech.edu>
 #
+# 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 <domo@computer.org> 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 <domo@computer.org> 000224
@@ -197,6 +200,11 @@
     esac
 fi
 
+# MachTen has stubs for mmap and munmap(), but they just result in the
+# caller being killed on the grounds of "Bad system call"
+d_mmap=${d_mmap:-undef}
+d_munmap=${d_munmap:-undef}
+
 # 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)
            av_push(PerlIO_layer_av,SvREFCNT_inc(layer));
           }
          else
-          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.

---
Flags:
    category=install
    severity=none
---
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:
  Platform:
    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
  Compiler:
    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:
    DEVEL7612

---
@INC for perl v5.7.0:
    lib
    /usr/local/lib/perl5/5.7.0/powerpc-machten
    /usr/local/lib/perl5/5.7.0
    /usr/local/lib/perl5/site_perl/5.7.0/powerpc-machten
    /usr/local/lib/perl5/site_perl/5.7.0
    /usr/local/lib/perl5/site_perl/5.6.0/powerpc-machten
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.7.0:
    HOME=/home/domo
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/lib
    LOGDIR (unset)
    PATH=/sbin:/usr/sbin:/home/domo/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11/bin:/usr/libexec
    PERL_BADLANG (unset)
    SHELL=/bin/bash
-- 
Dominic Dunlop

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About