Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl-5.8.1-RC2: TEST -bytecompile won't work at all #6629

Closed
p5pRT opened this issue Jul 14, 2003 · 11 comments
Closed

perl-5.8.1-RC2: TEST -bytecompile won't work at all #6629

p5pRT opened this issue Jul 14, 2003 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 14, 2003

Migrated from rt.perl.org#22984 (status was 'resolved')

Searchable as RT22984$

@p5pRT
Copy link
Author

p5pRT commented Jul 14, 2003

From marek.rouchal@infineon.com

I am trying to use the bytecode compiler in 5.8.0 - which
did not work at all. Now I tried 5.8.1-RC2, which is
somewhat better but still has significant problems.

Here is a patch for t/TEST, which in first place allows
the test suite run in bytecode mode, i.e.
$ cd t; ./perl TEST -bytecompile

Inline Patch
--- TEST.orig   2003-07-14 09:45:34.000000000 +0200
+++ TEST        2003-07-14 09:50:18.000000000 +0200
@@ -246,7 +246,7 @@
             my $pl2c = "$testswitch -I../lib ../utils/perlcc --testsuite "
.   \# \-O9 for good measure\, \-fcog is broken ATM   "$switch \-Wb=\-O9\,\-fno\-cog \-L \.\. " \. \- "\-I \\"\.\. \.\./lib/CORE\\" $args $utf $test \-o "; \+ "\-I \\"\.\. \.\./lib\\" $args $utf $test \-o ";

  if( $^O eq 'MSWin32' ) {
  $test_executable = "$test.exe";
@​@​ -266,7 +266,7 @​@​
  }
  else {
  $test_executable = "$test.plc";
- $compile = "./perl $pl2c $test_executable &&
$test_executable |";
+ $compile = "./perl $pl2c $test_executable &&
PERL5LIB=../lib $test_executable |";
  }
  unlink $test_executable if -f $test_executable;
  open(RESULTS, $compile)
@​@​ -349,7 +349,7 @​@​
  $bad = $bad + 1;
  $_ = $test;
  if (/^base/) {
- die "Failed a basic test--cannot continue.\n";
+ warn "Failed a basic test--cannot continue.\n";
  }
  }
  }

__EOF__

The test results are still horrible - you'll see yourself; especially
t/base/lex, t/base/num and t/base/pat fail, so that the original
TEST cannot continue. The error messages look similar throughout
all tests, e.g.​:
  Can't coerce ARRAY to integer in pattern match (m//) at base/lex.t.plc
line 2.
  ../utils/perlcc​: comp/bproto.t did not compile, which can't happen​:
  Can't call method "objix" without a package or object reference at
../lib/B/Bytecode.pm line 355.
  Invalid bytecode for this architecture​: bad magic (want 0x43424c50, got
0x312e2e31) at comp/hints.t.plc line 2.
and a lot more...

Please find my configuration below.

Cheers,

Marek

[PS. Don't mind the "TWW" directories - those contain merely a
compilation of recent open source utilities and libraries ]

$ ./myconfig -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration​:
  Platform​:
  osname=linux, osvers=2.4.18-27.7.xbigmem,
archname=i686-linux-thread-multi
  uname='linux lciua057 2.4.18-27.7.xbigmem #1 smp fri mar 14 05​:08​:50 est
2003 i686 unknown '
  config_args='-Dprefix=/opt/perl_5.8.1
-Dmydomain=.urania.muc.infineon.com -Dcf_email=perl@​muc.infineon.com
-Dinstallusrbinperl=undef -Dman1dir=/opt/perl_5.8.1/share/man/man1
-Dman3dir=/opt/perl_5.8.1/share/man/man3 -Dperladmin=perl@​muc.infineon.com
-Dprivlib=/opt/perl_5.8.1/share/lib -Dscriptdir=/opt/perl_5.8.1/share/bin
-Dsitelib=/opt/perl_5.8.1/share/lib -Ubincompat5005 -Dglibpth=/usr/lib
/usr/ccs/lib -Dpager=less -Dcc=gcc -Doptimize=-O2
-Darchlib=/opt/perl_5.8.1/lib/i686-linux-thread-multi
-Dsitebin=/opt/perl_5.8.1/bin
-Dsitearch=/opt/perl_5.8.1/lib/i686-linux-thread-multi
-Dlocincpth=/home/hwadm/TWW/LNX/include -Dloclibpth=/home/hwadm/TWW/LNX/lib
-Dlibperl=libperlifx.so -Duseshrplib -Dusethreads -Dpager=/usr/bin/less
-des'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=undef use64bitall=undef uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -I/home/hwadm/TWW/LNX/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -I/home/hwadm/TWW/LNX/include'
  ccversion='', gccversion='3.2.2 (TWW)', gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
  alignbytes=4, prototype=define
  Linker and Libraries​:
  ld='gcc', ldflags =' -L/home/hwadm/TWW/LNX/lib'
  libpth=/home/hwadm/TWW/LNX/lib /usr/lib
  libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=/lib/libc-2.2.4.so, so=so, useshrplib=true, libperl=libperlifx.so
  gnulibc_version='2.2.4'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/opt/perl_5.8.1/lib/i686-linux-thread-multi/CORE'
  cccdlflags='-fpic', lddlflags='-shared -L/home/hwadm/TWW/LNX/lib'

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

From enache@rdslink.ro

On Mon, Jul 14, 2003 at 10​:15​:15AM +0200, marek.rouchal@​infineon.com wrote​:

I am trying to use the bytecode compiler in 5.8.0 - which
did not work at all. Now I tried 5.8.1-RC2, which is
somewhat better but still has significant problems.

Hi Marek,

Find a bzip2ed patch which makes ByteLoader kinda work again at​:

http​://www.enache.rdsbv.ro/byteloader_patch.bz2

I just reworked it to apply against perl-5.8.1-RC2.

[do a 'make regen' after applying it]

It's not a fine thing and its not how I intend it to look like -
there are zillions of serious problems with it.
I used it most as a testbed, the code is kludgy, some solutions - like
the B​::oplist XSUB are plain wrong.

How to use it​:

$ perl -MO=Bytecode,-H,-o<outfile> <infile>
$ perl <outfile>

(if you want it to save the syntax tree - it strips it by default -
give it the -k option too. It will also save the syntax tree for
scripts that use gotos).

How to test it​:

$ make test.bytecompile

(it should work ~ fine (8 failures in pat.t, failures in files
with pseudohashes and in uni/ tests - because they use source
filters ... until the lib/ and ext/ tests where it begins to
crash badly - many test fail just because they do a lot of stuff
in BEGIN blocks. ByteLoader, by design, handle very bad that
kind of situation).

I started rewriting all that stuff from scratch, with a new layout
Byte​::Loader
Byte​::Assembler
Byte​::Disassembler
B​::ByteCode

which is supposed to fix its most serious flaws​:
  - make it read all the bytecode at once or by segments -
  that could dramatically improve the "byteloading" speed
  and guard against truncated files.
  - have a separate XS sub for every assembler "opcode" in
  Byte​::Assembler that will get rid of the obscenely slow
  compilation time.
  - put only what is needed in the produced code - that
  will reduce its size with at least 50%. (there is some
  ugly botch in the patch that does something similar -
  look at the asm sub in B​::Assembler).
  - fix the order in which OPs are saved and so avoid unneeded
  ldop opcodes.
  - "pack" the integer arguments to opcodes - will reduce the
  size and make it endianness-independent.

However, I'm not in mood just now to finish it. If I ever do it,
I'll put it on CPAN.

Adi

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

From marek.rouchal@infineon.com

I'm currently on vacation.
I'll be back at my desk on August 4th 2003 and read your mail asap.
Till then, please refrain as far as possible from sending me more emails,
in order to reduce my backlog. Thank you very much!

In case of technical problems, please call the Datamanagement
Hotline, its phone number is +49 89 234 27364
or contact my representative, Adalbert Perbandt (CL DAT DFA FDM)

Sincerely,

Marek Rouchal
Infineon Technologies, CL DAT DFA FDM

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

From @rspier

do we unsubscribe him?

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

From @rspier

Message RFC822:
Delivered-To: rspier@newbabe.mengwong.com
Delivered-To: rspier@pobox.com
Mailing-List: contact perl5-porters-help@perl.org; run by ezmlm
Precedence: bulk
list-help: mailto:perl5-porters-help@perl.org
list-unsubscribe: mailto:perl5-porters-unsubscribe@perl.org
list-post: mailto:perl5-porters@perl.org
X-List-Archive: http://nntp.perl.org/group/perl.perl5.porters/78543
Delivered-To: mailing list perl5-porters@perl.org
Delivered-To: perlmail-perlbug-followup@onion.perl.org
Delivered-To: perlbug-followup@perl.org
Received-SPF: unknown
Message-ID: 9843A649BAD7FB4686F6FCBC840D600E05994322@mucse001.eu.infineon.com
From: marek.rouchal@infineon.com
To: perlbug-followup@perl.org
Subject: Out of Office AutoReply: [perl #22984] perl-5.8.1-RC2: TEST -byte compile won't work at all
Date: Fri, 18 Jul 2003 22:10:24 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain; charset="ISO-8859-1"
X-SMTPD: qpsmtpd/0.27-dev, http://develooper.com/code/qpsmtpd/
X-Spam-Check-By: one.develooper.com
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
X-Spam-Status: No, hits=-4.3 required=5.0
tests=BAYES_01,NO_REAL_NAME
version=2.54
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.54 (1.174.2.17-2003-05-11-exp)
Status: O
X-UID: 1144
Content-Length: 460
X-Keywords:

I'm currently on vacation.
I'll be back at my desk on August 4th 2003 and read your mail asap.
Till then, please refrain as far as possible from sending me more emails,
in order to reduce my backlog. Thank you very much!

In case of technical problems, please call the Datamanagement
Hotline, its phone number is +49 89 234 27364
or contact my representative, Adalbert Perbandt (CL DAT DFA FDM)

Sincerely,

Marek Rouchal
Infineon Technologies, CL DAT DFA FDM

@p5pRT
Copy link
Author

p5pRT commented Aug 5, 2003

From marek.rouchal@gmx.net

First of all - I sincerely apologize for the "out of office"
trouble. Next time I will try to make sure that only the sender
will get the reply, and only if he/she's within the company, not
the Internet.

[enache - Fri Jul 18 13​:10​:17 2003]​:

Find a bzip2ed patch which makes ByteLoader kinda work again at​:

Great! Yes, it works much better now. Here - for completeness -
the results of a new run of RC4 (the omitted ones are all ok).
I have added a few comments as well.
Note that this was run on Solaris 7 with ithreads and shared libperl.
And I got two failures in the regular test - see bug#23222

(it should work ~ fine (8 failures in pat.t, failures in files
with pseudohashes and in uni/ tests - because they use source
filters ... until the lib/ and ext/ tests where it begins to
crash badly - many test fail just because they do a lot of stuff
in BEGIN blocks. ByteLoader, by design, handle very bad that
kind of situation).


TESTING BYTECODE COMPILER


t/base/lex...........................Modification of a read-only value
attempted at base/lex.t line 9
FAILED at test 21
Failed a basic test--cannot continue.
=> this is the most annoying one

t/op/chdir...........................Segmentation Fault
FAILED at test 0
=> Ooops, what's that?

t/op/pat.............................FAILED at test 26
=> as you said

t/uni/tr_7jis........................FAILED at test 0
t/uni/tr_eucjp.......................Illegal bytecode instruction 189
FAILED at test 0
t/uni/tr_sjis........................Illegal bytecode instruction 190
FAILED at test 0
t/uni/tr_utf8........................Illegal bytecode instruction 189
FAILED at test 0
=> as you said

ext/B/t/xref.........................Segmentation Fault
FAILED at test 0
=> probably an issue with source filtering

ext/Encode/t/at-cn...................Segmentation Fault
FAILED at test 0
ext/Encode/t/at-tw...................Segmentation Fault
FAILED at test 0
ext/Encode/t/CJKT....................Segmentation Fault
FAILED at test 0
ext/Encode/t/encoding................Illegal bytecode instruction 191
FAILED at test 0
ext/Encode/t/enc_data................FAILED at test 0
ext/Encode/t/enc_eucjp...............op_ppaddr not yet implemented
at ../ext/Encode/t/enc_eucjp.t.plc
FAILED at test 0
ext/Encode/t/enc_module..............op_ppaddr not yet implemented
at ../ext/Encode/t/enc_module.t.pl
FAILED at test 0
ext/Encode/t/enc_utf8................Illegal bytecode instruction 189
FAILED at test 0
ext/Encode/t/guess...................Segmentation Fault
FAILED at test 0
ext/Encode/t/jperl...................Invalid bytecode for this
architecture​: bad magic (want 0x43424cine 2.
# Looks like your test died before it could output anything.
FAILED at test 1
=> maybe there are ambiguities between bytecode and unicode?

ext/GDBM_File/t/gdbm.................Use of uninitialized value in
numeric eq (==) at ../ext/GDBM_Fil
Use of uninitialized value in string eq at ../ext/GDBM_File/t/gdbm.t
line 211.
FAILED at test 13
=> interesting; runs ok w/o bytecompiler

ext/List/Util/t/blessed..............Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:
Compilation failed in require at ../lib/Scalar/Util.pm line 10.
Compilation failed in require at ../ext/List/Util/t/blessed.t line 16.
BEGIN failed--compilation aborted at ../ext/List/Util/t/blessed.t.plc
line 2.
FAILED at test 0
ext/List/Util/t/max..................Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:
Compilation failed in require at ../ext/List/Util/t/max.t line 17.
BEGIN failed--compilation aborted at ../ext/List/Util/t/max.t.plc line
2.
FAILED at test 0
ext/List/Util/t/min..................Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:
Compilation failed in require at ../ext/List/Util/t/min.t line 17.
BEGIN failed--compilation aborted at ../ext/List/Util/t/min.t.plc line
2.
FAILED at test 0
ext/List/Util/t/minstr...............Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:
Compilation failed in require at ../ext/List/Util/t/minstr.t line 17.
BEGIN failed--compilation aborted at ../ext/List/Util/t/minstr.t.plc
line 2.
FAILED at test 0
ext/List/Util/t/refaddr..............Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:
Compilation failed in require at ../lib/Scalar/Util.pm line 10.
Compilation failed in require at ../ext/List/Util/t/refaddr.t line 17.
BEGIN failed--compilation aborted at ../ext/List/Util/t/refaddr.t.plc
line 2.
FAILED at test 0
ext/List/Util/t/tainted..............Can't locate
auto/List/Util/bootstrap.al in @​INC (@​INC contains​:ine 18
Compilation failed in require at ../lib/Scalar/Util.pm line 10.
Compilation failed in require at ../ext/List/Util/t/tainted.t line 17.
BEGIN failed--compilation aborted at ../ext/List/Util/t/tainted.t.plc
line 2.
FAILED at test 0
=> Oh well, autosplit and bytecompiler have a conflict

ext/NDBM_File/t/ndbm.................Use of uninitialized value in
string eq at ../ext/NDBM_File/t/nd
FAILED at test 13
ext/ODBM_File/t/odbm.................Use of uninitialized value in
string eq at ../ext/ODBM_File/t/od
FAILED at test 13
=> see GDBM above

ext/POSIX/t/sigaction................Undefined subroutine
&main​::SIGUSR1 called at ../ext/POSIX/t/sig
FAILED at test 1
=> seems to be sth about RC4 and signals

ext/POSIX/t/waitpid..................Undefined subroutine &main​::time
called at ../ext/POSIX/t/waitpi
FAILED at test 1
=> ?!?!?

ext/SDBM_File/t/sdbm.................Use of uninitialized value in
string eq at ../ext/SDBM_File/t/sd
FAILED at test 13
=> see GDBM above...

ext/Storable/t/croak.................FAILED at test 0
=> argh

ext/threads/t/thread.................FAILED at test 5
=> a very hard one, I guess :-/

lib/Attribute/Handlers/t/multi.......FAILED at test 55
=> source filtering?

lib/bignum/t/bigint..................Segmentation Fault
FAILED at test 1
lib/bignum/t/bignum..................Segmentation Fault
FAILED at test 1
lib/bignum/t/bigrat..................Segmentation Fault
FAILED at test 1
lib/bignum/t/option_a................Segmentation Fault
FAILED at test 1
lib/bignum/t/option_l................Segmentation Fault
FAILED at test 1
lib/bignum/t/option_p................Segmentation Fault
FAILED at test 1
=> argh

lib/CGI/t/carp.......................# Failed test
(../lib/CGI/t/carp.t.plc at line 24)
# got​: '../lib/CGI/t/carp.t.plc'
# expected​: '../lib/CGI/t/carp.t'
Broken Pipe
FAILED at test 2
=> not a big deal... should be fixed in the test script I assume

lib/charnames........................Undefined subroutine
&main​::runperl called at ../lib/charnames.t line 298, <DATA> line 1.
FAILED at test 47
=> ???

lib/constant.........................Segmentation Fault
FAILED at test 1
=> maybe easier to debug than the other segfaults...

lib/diagnostics......................FAILED at test 0
=> source filtering again?

lib/English..........................# Failed test
(../lib/English.t at line 99)
# got​: undef
# expected​: '.inplace'
Broken Pipe
FAILED at test 34
=> ???

lib/Env/t/array......................FAILED at test 1
=> ???

lib/ExtUtils/t/Command...............# Failed test
(../lib/ExtUtils/t/Command.t at line 53)
# got​: ''
# expected​: '2'
Broken Pipe
FAILED at test 2
=> ???

lib/Fatal............................FAILED at test 3
lib/fields...........................FAILED at test 9
=> ???

lib/File/Spec/t/rel2abs2rel..........Can't open perl
script "rel2abs2rel23800.pl"​: No such file or directory
# Failed test (../lib/File/Spec/t/rel2abs2rel.t at line 56)
# got​: ''
# expected​: 'ok
# '
Can't open perl script "rel2abs2rel23800.pl"​: No such file or directory
Broken Pipe
FAILED at test 1
=> probably a file naming issue (.plc)

lib/File/Temp/t/security.............# Failed test 8
in ../lib/File/Temp/t/security.t at line 22
# ../lib/File/Temp/t/security.t line 22 is​: END { foreach (@​files) { ok
( !(-e $_) )} }
Broken Pipe
FAILED at test 8
lib/File/Temp/t/tempfile.............# Failed test 16
in ../lib/File/Temp/t/tempfile.t at line 31
# ../lib/File/Temp/t/tempfile.t line 31 is​: END { foreach (@​files) { ok
( !(-e $_) )} }
Broken Pipe
FAILED at test 16
=> ahh, ok, the BEGIN/END problems you mentioned

lib/Filter/Simple/t/import...........FAILED at test 5
=> source filter, right?

lib/I18N/LangTags/t/01test...........FAILED at test 64
=> ???

lib/lib..............................# Looks like you planned 13 tests
but only ran 11.
FAILED at test 12
=> ???

lib/Math/BigInt/t/bare_mbf...........Can't locate bigfltpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/bare_mbf.t line 39.
FAILED at test 1
lib/Math/BigInt/t/bare_mbi...........Can't locate bigintpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/bare_mbi.t line 42.
FAILED at test 1
lib/Math/BigInt/t/bare_mif...........Can't locate mbimbf.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/bare_mif.t line 47.
FAILED at test 2
lib/Math/BigInt/t/bigfltpm...........Can't locate bigfltpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../lib)
at ../lib/Math/BigInt/t/bigfltpm.t line 43.
FAILED at test 3
=> some non-standard include mechanism?

lib/Math/BigInt/t/constant...........Segmentation Fault
FAILED at test 1
lib/Math/BigInt/t/mbimbf.............Can't locate mbimbf.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib)
at ../lib/Math/BigInt/t/mbimbf.t line 46.
FAILED at test 1
lib/Math/BigInt/t/sub_mbf............Can't locate bigfltpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/sub_mbf.t line 39.
FAILED at test 1
lib/Math/BigInt/t/sub_mbi............Can't locate bigintpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/sub_mbi.t line 41.
FAILED at test 1
lib/Math/BigInt/t/sub_mif............Can't locate mbimbf.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/sub_mif.t line 42.
FAILED at test 1
lib/Math/BigInt/t/upgrade............Can't locate upgrade.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/upgrade.t line 45.
FAILED at test 3
lib/Math/BigInt/t/with_sub...........Can't locate bigfltpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigInt/t/.plc ../lib ../t/lib)
at ../lib/Math/BigInt/t/with_sub.t line 43.
FAILED at test 2
lib/Math/BigRat/t/bigratpm...........Can't locate bigratpm.inc in @​INC
(@​INC contains​: ../lib/Math/BigRat/t/.plc ../lib ../lib)
at ../lib/Math/BigRat/t/bigratpm.t line 38.
FAILED at test 1
=> see above

lib/Net/Ping/t/450_service...........Can't locate object method "new"
via package "IO​::Socket​::INET" (perhaps you forgot to
load "IO​::Socket​::INET"?) at ../lib/Net/Ping/t/450_service.t line 28.
FAILED at test 2
=> ???

lib/Net/t/time.......................Subroutine new redefined
at ../lib/IO/Socket/INET.pm line 29.
Subroutine new redefined at ../lib/IO/Select.pm line 23.
Subroutine can_read redefined at ../lib/IO/Select.pm line 100.
Can't call method "isa" on an undefined value at ../lib/Net/t/time.t
line 35.
FAILED at test 4
=> ???

lib/open.............................Bus Error
FAILED at test 1
=> argh

lib/Pod/t/Select.....................# Failed test
(../lib/Pod/t/Select.t at line 28)
# got​: undef
# expected​: '=head1 NAME
#
# Select.t - Tests for Pod​::Select.
#
# '
Broken Pipe
FAILED at test 3
=> clearly because of source filtering; brings me to a
  general point​: shouldn't the Bytecompiler extract all
  pod to a *.pod file, along with the *.plc?

lib/strict...........................PROG​:

# strict refs - error
use strict ;
my $fred ;
my $a = ${"fred"} ;
EXPECTED​:
Can't use string ("fred") as a SCALAR ref while "strict refs" in use
at - line 5.
GOT​:
Can't locate strict.pm in @​INC (@​INC contains​: /opt/perl_5.8.1/lib/sun4-
solaris-thread-multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/lib/sun4-
solaris-thread-
multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/share/lib .) at - line
3.
BEGIN failed--compilation aborted at - line 3.
PROG​:
# strict refs - error
use strict 'refs' ;
my $fred ;
my $a = ${"fred"} ;
EXPECTED​:
Can't use string ("fred") as a SCALAR ref while "strict refs" in use
at - line 5.
GOT​:
Can't locate strict.pm in @​INC (@​INC contains​: /opt/perl_5.8.1/lib/sun4-
solaris-thread-multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/lib/sun4-
solaris-thread-
multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/share/lib .) at - line
3.
BEGIN failed--compilation aborted at - line 3.
Broken Pipe
FAILED at test 2
=> for some reason the ../lib vanished from @​INC...

lib/subs.............................PROG​:

# AOK
use subs qw( Fred) ;
Fred 1,2 ;
sub Fred { print $_[0] + $_[1], "\n" }
EXPECTED​:
3
GOT​:
Can't locate subs.pm in @​INC (@​INC contains​: /opt/perl_5.8.1/lib/sun4-
solaris-thread-multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/lib/sun4-
solaris-thread-
multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/share/lib .) at - line
3.
BEGIN failed--compilation aborted at - line 3.
PROG​:

# override a built-in function
use subs qw( open ) ;
open 1,2 ;
sub open { print $_[0] + $_[1], "\n" }
EXPECTED​:
3
GOT​:
Can't locate subs.pm in @​INC (@​INC contains​: /opt/perl_5.8.1/lib/sun4-
solaris-thread-multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/lib/sun4-
solaris-thread-
multi /opt/perl_5.8.1/share/lib /opt/perl_5.8.1/share/lib .) at - line
3.
BEGIN failed--compilation aborted at - line 3.
Broken Pipe
FAILED at test 3
=> for some reason the ../lib vanished from @​INC...

lib/Switch/t/given...................Can't find label C_A_S_E_4
at ../lib/Switch/t/given.t line 30.
ok
=> ahh, interesting effect; the compiler complains (correctly),
  and the test works.

lib/Symbol...........................# Failed test (../lib/Symbol.t
at line 14)
Broken Pipe
FAILED at test 1
=> ???

lib/Test/Harness/t/pod...............Undefined subroutine &main​::plan
called at ../lib/Test/Harness/t/pod.t line 15.
FAILED at test 0
=> ???

lib/Test/Simple/t/extra..............Segmentation Fault
FAILED at test 0
lib/Test/Simple/t/fail-more..........Segmentation Fault
FAILED at test 0
lib/Test/Simple/t/fail...............Segmentation Fault
FAILED at test 0
lib/Test/Simple/t/has_plan2..........FAILED at test 0
lib/Test/Simple/t/is_deeply..........Segmentation Fault
FAILED at test 0
lib/Test/Simple/t/missing............Segmentation Fault
FAILED at test 0
lib/Test/Simple/t/no_ending..........# Looks like you planned 3 tests
but only ran 1.
ok
lib/Test/Simple/t/plan_no_plan.......FAILED at test 0
lib/Test/Simple/t/skip...............Segmentation Fault
FAILED at test 0
lib/Test/t/fail......................# Test 2 got​: ''
(../lib/Test/t/fail.t at line 63)
# Expected​: '
'
# ../lib/Test/t/fail.t line 63 is​: for (my $x=0; $x < @​got; $x++) {
Broken Pipe
FAILED at test 2
lib/Test/t/mix.......................Segmentation Fault
FAILED at test 0
=> still a lot of "Test" tests succeed - strange

lib/vars.............................Broken Pipe
FAILED at test 5
=> argh

lib/warnings.........................PROG​:
# mg.c
use warnings 'signal' ;
if ($^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' || $^O
eq 'MacOS') {
  print "SKIPPED\n# $^O, can't kill() to raise()\n"; exit;
}
$|=1;
$SIG{"INT"} = "fred"; kill "INT",$$;
EXPECTED​:
SIGINT handler "fred" not defined.
GOT​:

Broken Pipe
FAILED at test 237
=> maybe related to signal problems

t/pod/emptycmd.......................*** Can't find comparison file
pod/emptycmd.t.plc.xr for testing pod/emptycmd.t.plc
FAILED at test 1
t/pod/for............................*** Can't find comparison file
pod/for.t.plc.xr for testing pod/for.t.plc
FAILED at test 1
t/pod/headings.......................*** Can't find comparison file
pod/headings.t.plc.xr for testing pod/headings.t.plc
FAILED at test 1
t/pod/include........................*** Can't find comparison file
pod/include.t.plc.xr for testing pod/include.t.plc
FAILED at test 1
t/pod/included.......................*** Can't find comparison file
pod/included.t.plc.xr for testing pod/included.t.plc
FAILED at test 1
t/pod/lref...........................*** Can't find comparison file
pod/lref.t.plc.xr for testing pod/lref.t.plc
FAILED at test 1
t/pod/multiline_items................*** Can't find comparison file
pod/multiline_items.t.plc.xr for testing pod/multiline_items.t.plc
FAILED at test 1
t/pod/nested_items...................*** Can't find comparison file
pod/nested_items.t.plc.xr for testing pod/nested_items.t.plc
FAILED at test 1
t/pod/nested_seqs....................*** Can't find comparison file
pod/nested_seqs.t.plc.xr for testing pod/nested_seqs.t.plc
FAILED at test 1
t/pod/oneline_cmds...................*** Can't find comparison file
pod/oneline_cmds.t.plc.xr for testing pod/oneline_cmds.t.plc
FAILED at test 1
t/pod/pod2usage......................*** Can't find comparison file
pod/pod2usage.t.plc.xr for testing pod/pod2usage.t.plc
FAILED at test 1
t/pod/poderrs........................*** Can't find comparison file
pod/poderrs.t.plc.xr for testing pod/poderrs.t.plc
FAILED at test 1
t/pod/podselect......................*** Can't find comparison file
pod/podselect.t.plc.xr for testing pod/podselect.t.plc
FAILED at test 1
t/pod/special_seqs...................*** Can't find comparison file
pod/special_seqs.t.plc.xr for testing pod/special_seqs.t.plc
FAILED at test 1
=> ok, saw that one before

Failed 101 test scripts out of 847, 88.08% okay.

Hope that this helps to improve the Bytecompiler a little more...

@p5pRT
Copy link
Author

p5pRT commented Aug 5, 2003

From enache@rdslink.ro

On Tue, Aug 05, 2003 a.d., Marek Rouchal wrote​:

Note that this was run on Solaris 7 with ithreads and shared libperl.

That's fine since I have no access now to platforms other than x86.

t/base/lex...........................Modification of a read-only value
attempted at base/lex.t line 9
FAILED at test 21
Failed a basic test--cannot continue.
=> this is the most annoying one

Please try cutting chunks of t/base/lex.t until you get a smaller script
(2-3 lines) which still crashes when bytecompiled.
If you get it, tar.bz2 both t/base/lex.t and t/base/lex.t.plc and send
them me (off list) as an attachment.

My idea with a full rewrite of ByteLoader was to set up a machine independent
format --
as long as the bytecode files aren't smaller and portable between machines,
all this stuff will be pretty worthless.
This remains a project for 5.8.2 :-)

Regards,
Adi

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2003

From marek.rouchal@infineon.com

Hello Adi,

I get this output with the attached files​:

$ cd t
$ ./perl -I. -MTestInit -I../lib
-MO=Bytecode,-H,-TI,-s`pwd`/base/lex.t,-obase/lex.t.plc base/lex.t && ./perl
-I. -MTestInit base/lex.t.plc
base/lex.t syntax OK
21..54
Modification of a read-only value attempted at base/lex.t line 8.

I also discovered, that when removing the #line directive in line 32
of the attached file, the bytecode runs ok, except that then of course
test #46 fails - because of the missing #line directive.

Strongly hope that this helps!

Cheers,

Marek

-----Original Message-----
From​: Adrian Enache [mailto​:perlbug-followup@​perl.org]
Sent​: Tuesday, August 05, 2003 6​:34 PM
To​: Rouchal Marek (CL DAT DFA FDM)
Subject​: Re​: [perl #22984] perl-5.8.1-RC2​: TEST -bytecompile
won't work at all
...
Please try cutting chunks of t/base/lex.t until you get a
smaller script (2-3 lines) which still crashes when
bytecompiled. If you get it, tar.bz2 both t/base/lex.t and
t/base/lex.t.plc and send them me (off list) as an attachment.

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2003

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2003

From @jhi

Enache is doggedly working towards a better ByteLoader, the patch mentioned in this
thread has been applied, and several other patches since, but the bytecompilation is still
"volatile" enough that I don't think 5.8.1 will see it.

@p5pRT
Copy link
Author

p5pRT commented Sep 4, 2003

@jhi - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant