On Wed, Aug 18, 2010 at 8:13 AM, Will Coleda via RT <perl6-bugs-follo...@perl.org> wrote: > On Mon Mar 23 13:09:56 2009, szab...@gmail.com wrote: >> I am not sure if this is a Parrot or Rakudo bug >> or just a plain invalid usage on my side. >> >> The following code runs, prints the prompt but when I >> enter a response I get a Segmentation fault. >> >> Gabor >> >> >> #!/usr/bin/perl >> use strict; >> use warnings; >> >> >> # Needs two environment variables: >> # PARROT_DIR needs to point to the directory where parrot was checked out >> # export LD_LIBRARY_PATH=$PARROT_DIR/blib/lib/ >> >> # cwd still needs to be PARROT_DIR or I get the following error: >> #"load_bytecode" couldn't find file 'PCT.pbc' >> #current instr.: '' pc 743 (src/classes/Object.pir:20) >> #called from Sub 'myperl6' pc 3 (EVAL_1:3) >> >> # Before running I had to build Parrot::Embed: >> # cd $ENV{PARROT_DIR}/ext/Parrot-Embed/ >> # perl Build.PL >> # perl Build >> # perl Build test >> >> >> die "need PARROT_DIR" if not $ENV{PARROT_DIR}; >> unshift @INC, ( >> "$ENV{PARROT_DIR}/ext/Parrot-Embed/blib/lib", >> "$ENV{PARROT_DIR}/ext/Parrot-Embed/blib/arch", >> ); >> >> require Parrot::Embed; >> my $interp = Parrot::Interpreter->new; >> >> my $perl6 =<<"END_PIR"; >> .sub myperl6 >> .param string in_string >> load_bytecode '$ENV{RAKUDO_DIR}/perl6.pbc' >> >> \$P0 = get_hll_global 'prompt' >> .tailcall \$P0('Enter your name: ') >> .end >> END_PIR >> >> my $eval = $interp->compile( $perl6 ); >> my $foo = $interp->find_global('myperl6'); >> my $pmc = $foo->invoke( 'PS', 'say "hello"' ); >> print $pmc->get_string(), "\n"; > > Gabor - > > > Sorry for the delay in responding. This ticket is over a year old - can you > still reproduce this > problem?
Yes, this still gives me segmentation fault but now the test suit of Parrot::Embed also fails with ga...@localhost:~/work/rakudo/parrot/ext/Parrot-Embed$ perl Build test t/00-load.t .... ok t/interp.t ..... 1/23 Parrot VM: Can't stat no file here, code 2. /usr/bin/perl: symbol lookup error: /home/gabor/work/rakudo/parrot/ext/Parrot-Embed/blib/arch/auto/Parrot/Embed/Embed.so: undefined symbol: Parrot_PMC_get_cstring t/interp.t ..... Dubious, test returned 127 (wstat 32512, 0x7f00) Failed 5/23 subtests Gabor