Loading Rakudo's perl6.pbc from the Parrot embedding API

Jonathan Leto jaleto at gmail.com
Fri Jun 4 06:37:20 UTC 2010


I am trying to load an installed perl6.pbc from the Parrot embedding
API like this:

#include "parrot/embed.h"
#include "parrot/extend.h"

Parrot_Interp interp;

int main(int argc, char *argv[])
    Parrot_PMC func_pmc;
    Parrot_String err, filename;

    interp = Parrot_new(NULL);
    filename = Parrot_str_new(interp,


Compiled with:
gcc embed2.c -o embed2 `pkg-config --cflags --libs parrot`

When run, it gives the error:

Class '[ 'ClassToBe' ]' not found
current instr.: 'perl6;ClassHOW;new' pc 4091 (src/gen/Attribute.pir:35)
called from Sub 'perl6;ClassHOW;new_class' pc 5531
called from Sub 'perl6;RoleHOW;onload' pc 5837 (src/metamodel/ClassHOW.pir:874)
called from Sub 'perl6;Perl6;Compiler;main' pc 284185
... call repeated 1 times

If I run parrot on the same perl6.pbc, it works. What am I missing?
Any hints would be greatly appreciated.

I am currently using Parrot trunk ( revision 47312 ) and Rakudo master
( a0b6d74d ).


Jonathan "Duke" Leto
jonathan at leto.net

More information about the parrot-dev mailing list