Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems building perl6 (perl version dependency?)

13 views
Skip to first unread message

Andy Dougherty

unread,
Sep 15, 2003, 12:00:37 PM9/15/03
to Perl6 Internals
On Solaris 8, with Sun's supplied perl5.00503 and with Sun's cc, I get the
following error when trying to build perl6:

cd perl6 && make test && cd ..
/usr/bin/perl t/harness
t/builtins/array....# Failed test (t/builtins/array.t at line 27)
# got: 'error:imcc:parse error, unexpected EOM, expecting PARROT_OP
# in file 't/builtins/array_1.pasm' line 1
# '
# expected: 'perl6isfun
# funisperl6
# perl6isfun
# '
# '../../parrot t/builtins/array_1.pasm' failed with exit code 69
# Looks like you failed 1 tests of 3.
dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 2
Failed 1/3 tests, 66.67% okay (-2 skipped tests: 0 okay, 0.00%)

(In fact, every test fails.) Obviously, those error messages aren't very
helpful. Trying the one-liner in doc/debugging.pod:

perl6 -vwk -e'print(qq(Hello perl6\n))'

yields the more informative:

Can't locate charnames.pm in @INC (@INC contains:
/home/doughera/src/parrot/parrot-andy/languages/perl6/../../lib
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at
P6C/Tree/String.pm line 219.
BEGIN failed--compilation aborted at P6C/Tree/String.pm line 219.
BEGIN failed--compilation aborted at P6C/Tree.pm line 27.
BEGIN failed--compilation aborted at perl6 line 19.

So the problem is actually a dependency on a module not shipped with
perl5.00503.

This problem's been around a while -- I know I've reported it before. Is
it time to give up on 5.00503? I will retest with 5.8.x, but the
compilation takes a *long* time.

Also, would it be possible to include something like that one-liner
somewhere in the test suite in a way that the 'charnames' error message
would pop up more readily? In perl5, there's a trivial test in the
makefile that runs

./miniperl -w -Ilib -MExporter -e '<?>'

before launching into the full test suite. Perhaps something similar
could be done in the perl6 Makefile.

--
Andy Dougherty doug...@lafayette.edu

Sean O'Rourke

unread,
Sep 15, 2003, 12:10:14 PM9/15/03
to Andy Dougherty, Perl6 Internals
Andy Dougherty <doug...@lafayette.edu> writes:
> So the problem is actually a dependency on a module not shipped with
> perl5.00503.
>
> This problem's been around a while -- I know I've reported it before. Is
> it time to give up on 5.00503? I will retest with 5.8.x, but the
> compilation takes a *long* time.

I'm not personally a fan of 5.005 compatibility, but it looks to me
like the "use charnames" was gratuitous, since charnames is already
being used inside the nearby eval. Does this fly?

/s

*** String.pm.~1.6.~ Sun Mar 16 01:02:08 2003
--- String.pm Mon Sep 15 09:07:00 2003
***************
*** 216,222 ****
error ("Error in interpolation of control-char: $@"),die if $@;
}
else {
- use charnames qw(:full);
# The charnames doesn't seem to propagate into the eval""
# for me -- sfink
$val = eval qq[use charnames qw(:full); "\\N{$_}"];
--- 216,221 ----

Andy Dougherty

unread,
Sep 15, 2003, 3:39:18 PM9/15/03
to Sean O'Rourke, Perl6 Internals
On Mon, 15 Sep 2003, Sean O'Rourke wrote:

> > This problem's been around a while -- I know I've reported it before. Is
> > it time to give up on 5.00503? I will retest with 5.8.x, but the
> > compilation takes a *long* time.
>
> I'm not personally a fan of 5.005 compatibility, but it looks to me
> like the "use charnames" was gratuitous, since charnames is already
> being used inside the nearby eval. Does this fly?

I don't know, since I'm running the 5.8.x re-testing right now, but
your suggestion will certainly let the build proceed a good bit further.
I don't know what the charnames is doing there and whether it's needed
elsewhere or not.

Moreover, Steve Fink's comment just below the line you propose deleting
leads me to believe there's something more to it, but I don't actually
know what the issue was.

> *** String.pm.~1.6.~ Sun Mar 16 01:02:08 2003
> --- String.pm Mon Sep 15 09:07:00 2003
> ***************
> *** 216,222 ****
> error ("Error in interpolation of control-char: $@"),die if $@;
> }
> else {
> - use charnames qw(:full);
> # The charnames doesn't seem to propagate into the eval""
> # for me -- sfink
> $val = eval qq[use charnames qw(:full); "\\N{$_}"];
> --- 216,221 ----
>
>

--
Andy Dougherty doug...@lafayette.edu

Steve Fink

unread,
Sep 15, 2003, 10:36:26 PM9/15/03
to Andy Dougherty, Sean O'Rourke, Perl6 Internals
On Sep-15, Andy Dougherty wrote:
>
> Moreover, Steve Fink's comment just below the line you propose deleting
> leads me to believe there's something more to it, but I don't actually
> know what the issue was.
>
> > *** String.pm.~1.6.~ Sun Mar 16 01:02:08 2003
> > --- String.pm Mon Sep 15 09:07:00 2003
> > ***************
> > *** 216,222 ****
> > error ("Error in interpolation of control-char: $@"),die if $@;
> > }
> > else {
> > - use charnames qw(:full);
> > # The charnames doesn't seem to propagate into the eval""
> > # for me -- sfink
> > $val = eval qq[use charnames qw(:full); "\\N{$_}"];

I vaguely remember adding that due to an error where it really seemed
to want the \N construct to work. The exact problem seemed to be as
stated above: it worked if I did the use inside the eval"", but not
otherwise. That's separate from the issue of whether charnames is
available. But perhaps that could be fixed by nuking a test case or
two. Not a very nice way of dealing with things, but we could just do
it for pre-5.6 (or whatever) perl installations.

I think I upgraded my perl after this, so I don't know if I can
re-create the problem. Not to mention that my local perl6 is very
divergent from the committed one, but that's easily fixed with another
checkout. I guess I'll do that checkout so I can see if I can recreate
the problem.

Andy Dougherty

unread,
Sep 16, 2003, 12:09:18 PM9/16/03
to Perl6 Internals
[charnames.pm is unavailable in 5.00503.]

Commenting out the 'use charnames' in String.pm, I only get two failures
for languages/perl6 with perl5.00503. They are

t/compiler/b_4.p6, which is

sub main() {
print "\c[^J]"; # Control-Char
print "\c[REVERSE SOLIDUS]\n"; # Named Unicode
print "\c[INVERTED EXCLAMATION MARK;CENT SIGN]\n"; # Named-Unicode m-block
print "\0[0x010]\n"; # Number block
print "\x[40;50]\n";
}

This fails as String.pm tries to load in charnames.pm. I don't see any
way 5.00503 could correctly handle that test.

and t/compiler/c_1.p6, which is

sub main() {
print 0b0110;
print "\n";
print -0b0110;
print "\n";
}

Perl5.00503 doesn't understand the 0b notation, and it's hard to see that
it's worth a lot of effort to make 5.00503 correctly handle that test.

On balance, I wonder if these tests should simply be skipped if $] < 5.6.

--
Andy Dougherty doug...@lafayette.edu

Steve Fink

unread,
Sep 19, 2003, 2:36:51 AM9/19/03
to Andy Dougherty, Perl6 Internals
On Sep-16, Andy Dougherty wrote:
> [charnames.pm is unavailable in 5.00503.]
>
> Commenting out the 'use charnames' in String.pm, I only get two failures
> for languages/perl6 with perl5.00503. They are
> ...

> On balance, I wonder if these tests should simply be skipped if $] < 5.6.

Ok, those two tests are now skipped if you're running on a perl that
doesn't support them. Hopefully I did that right; I don't have
anything older than 5.8 installed just now.

I made the following changes, in case anyone can notice a flaw:

Index: P6C/Tree/String.pm
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/P6C/Tree/String.pm,v
retrieving revision 1.6
diff -p -u -b -r1.6 String.pm
--- P6C/Tree/String.pm 16 Mar 2003 09:02:08 -0000 1.6
+++ P6C/Tree/String.pm 19 Sep 2003 06:35:26 -0000
@@ -216,7 +216,7 @@ sub string_special {


error ("Error in interpolation of control-char: $@"),die if $@;
}
else {
- use charnames qw(:full);

+# use charnames qw(:full);


# The charnames doesn't seem to propagate into the eval""
# for me -- sfink
$val = eval qq[use charnames qw(:full); "\\N{$_}"];

Index: t/compiler/b.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/b.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -p -u -b -r1.3 -r1.4
--- t/compiler/b.t 16 Feb 2003 21:04:42 -0000 1.3
+++ t/compiler/b.t 19 Sep 2003 06:27:45 -0000 1.4
@@ -1,6 +1,7 @@
#!perl
use strict;
use P6C::TestCompiler tests => 6;
+use Test::More;

##############################
output_is(<<'CODE', <<'OUT', "string interpolation 1");
@@ -67,6 +68,9 @@ CODE
OUT

##############################
+SKIP: {
+skip("running on a perl without charnames", 1)
+ unless eval "use charnames (); 1";
output_is(<<'CODE', <<'OUT', "string interpolation 4");


sub main() {
print "\c[^J]"; # Control-Char

@@ -82,6 +86,7 @@ CODE
16
@P
OUT
+}

##############################
output_is(<<'CODE', <<'OUT', "string interpolation 5");
Index: t/compiler/c.t
===================================================================
RCS file: /cvs/public/parrot/languages/perl6/t/compiler/c.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -p -u -b -r1.1 -r1.2
--- t/compiler/c.t 27 Dec 2002 18:19:02 -0000 1.1
+++ t/compiler/c.t 19 Sep 2003 06:27:45 -0000 1.2
@@ -1,9 +1,13 @@
#!perl
use strict;
use P6C::TestCompiler tests => 6;
+use Test::More;

##############################

+SKIP: {
+skip("running on a perl that does not understand 0b... notation", 1)
+ unless 2 == eval "0b010";
output_is(<<'CODE', <<'OUT', "Binary");
sub main() {
print 0b0110;
@@ -15,6 +19,7 @@ CODE
6
-6
OUT
+}

##############################

Leopold Toetsch

unread,
Sep 19, 2003, 3:21:30 AM9/19/03
to Steve Fink, perl6-i...@perl.org
Steve Fink <st...@fink.com> wrote:

> output_is(<<'CODE', <<'OUT', "string interpolation 5");

That one needed skipping too.

leo

0 new messages