[Parrot-users] [UNSURE]Using Parrot PCT on Windows

François Perrad francois.perrad at gadz.org
Tue Oct 19 09:23:34 UTC 2010


2010/10/18 Richard.Sutcliffe <Richard.Sutcliffe at ul.ie>

>  Dear Francois,
>
>
>
> I believe you are the person behind the Windows port of Parrot? I am trying
> to get the Parrot Compuler Tools working so that I can experiment with the
> squaak language (I know Klaas Jan Stol and he told me about it). The aim is
> to get a group of students to implement a small language as part of a
> compiler class, as a change from lex and yacc.
>
>
>
> I downloaded the package from http://sourceforge.net/projects/parrotwin32/and installed under Windows XP in c:\parrot-2.8.0. The executable
> bin\parrot.exe works perfectly when I try very simple .pir files.
>
>
>
> I then called create_language.pl to create a stub for a new language:
>
>
>
> perl c:\parrot-2.8.0\lib\parrot\tools\dev\create_language.pl squaak
>
>
>
> Using strawberry perl v5.12.1 this produces the result:
>
>
>
> C:\parrot-2.8.0\bin>c:\strawberry\perl\bin\perl.exe
> c:\parrot-2.8.0\lib\parrot\tools\dev\create_language.pl squaak3
>
> skipping squaak3/README
>
> skipping squaak3/Configure.pl
>
> skipping squaak3/build/Makefile.in
>
> skipping squaak3/build/gen_parrot.pl
>
> skipping squaak3/src/squaak3.pir
>
> skipping squaak3/src/squaak3/Grammar.pm
>
> skipping squaak3/src/squaak3/Actions.pm
>
> skipping squaak3/src/squaak3/Compiler.pm
>
> skipping squaak3/src/squaak3/Runtime.pm
>
> skipping squaak3/src/gen/.gitignore
>
> skipping squaak3/t/harness
>
> skipping squaak3/t/00-sanity.t
>
> skipping squaak3/build/PARROT_REVISION
>
> Can't use an undefined value as a symbol reference at
> c:\parrot-2.8.0\lib\parrot
>
> \tools\dev\create_language.pl line 127, <DATA> line 767.
>
>
>
> Using ActiveState perl v5.10.0 it appears to work:
>
>
>
> creating squaak4/
>
> creating squaak4/README
>
> creating squaak4/Configure.pl
>
> creating squaak4/build/
>
> creating squaak4/build/Makefile.in
>
> creating squaak4/build/gen_parrot.pl
>
> creating squaak4/src/
>
> creating squaak4/src/squaak4.pir
>
> creating squaak4/src/squaak4/
>
> creating squaak4/src/squaak4/Grammar.pm
>
> creating squaak4/src/squaak4/Actions.pm
>
> creating squaak4/src/squaak4/Compiler.pm
>
> creating squaak4/src/squaak4/Runtime.pm
>
> creating squaak4/src/gen/
>
> creating squaak4/src/gen/.gitignore
>
> creating squaak4/t/
>
> creating squaak4/t/harness
>
> creating squaak4/t/00-sanity.t
>
> creating squaak4/build/PARROT_REVISION
>
>
>
> Your new language has been created in the squaak4 directory.
>
> To do an initial build and test of the language:
>
>
>
>     cd squaak4
>
>     perl Configure.pl [--gen-parrot]
>
>     make
>
> make test
>
>
>
>
>
> Now, if we try running Configure.pl as instructed, the result is the same
> in either case:
>
>
>
> Reading configuration information from parrot_install/bin/parrot_config ...
>
> 'parrot_install' is not recognized as an internal or external command,
>
> operable program or batch file.
>
> Died at Configure.pl line 117.
>
>
>
> There does not seem to be a directory of the name parrot_install in the
> distribution so maybe it is created along the way?
>
>
>
> Any help in getting PCT to work would be very much appreciated.
>
>
>

Usually, I use the Perl5 script mk_language_shell.pl
It create setup.pir instead of Configure.pl & build/Makefile.in
For details about setup.pir & distutils library, see
http://trac.parrot.org/parrot/browser/trunk/runtime/parrot/library/distutils.pir

> perl \Parrot-2.8.0\lib\parrot\tools\dev\mk_language_shell.pl squaak
creating squaak\
creating squaak\README
creating squaak\setup.pir
creating squaak\PARROT_REVISION
no doc: skipping squaak\doc/squaak.pod
no doc: skipping squaak\doc/running.pod
no dynext: skipping squaak\dynext/.ignore
creating squaak\squaak/
creating squaak\squaak/.ignore
creating squaak\squaak.pir
creating squaak\src/
creating squaak\src/squaak.pir
creating squaak\src/squaak/
creating squaak\src/squaak/Grammar.pm
creating squaak\src/squaak/Actions.pm
creating squaak\src/squaak/Compiler.pm
creating squaak\src/squaak/Runtime.pm
no pmc: skipping squaak\src/pmc/squaak.pmc
no ops: skipping squaak\src/ops/squaak.ops
creating squaak\t/
creating squaak\t/00-sanity.t

> cd squaak
> parrot setup.pir
/Parrot-2.8.0/bin/parrot-nqp.exe --target=pir --output=src/gen_actions.pir
src/squaak/Actions.pm
/Parrot-2.8.0/bin/parrot-nqp.exe --target=pir --output=src/gen_compiler.pir
src/squaak/Compiler.pm
/Parrot-2.8.0/bin/parrot-nqp.exe --target=pir --output=src/gen_grammar.pir
src/squaak/Grammar.pm
/Parrot-2.8.0/bin/parrot-nqp.exe --target=pir --output=src/gen_runtime.pir
src/squaak/Runtime.pm
/Parrot-2.8.0/bin/parrot.exe -o squaak/squaak.pbc src/squaak.pir
/Parrot-2.8.0/bin/parrot.exe -o squaak.pbc squaak.pir
/Parrot-2.8.0/bin/pbc_to_exe.exe squaak.pbc --install && strip
installable_squaak.exe
gcc -o squaak.o -I"/Parrot-2.8.0/include/parrot" -DWIN32
-DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC
-DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE
-DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT
-DHASATTRIBUTE_HOT  -DHASATTRIBUTE_COLD  -DDISABLE_GC_DEBUG=1 -DNDEBUG
-DHAS_GETTEXT -I C:\icu-4.4.1\icu\include -s -O2 -c squaak.c
Compiled: squaak.o
gcc -o installable_squaak.exe "squaak.o"
/Parrot-2.8.0/lib/parrot\parrot_config.
o  "/Parrot-2.8.0/bin\libparrot.dll"    -lmoldname -lkernel32 -luser32
-lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32
-lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
-lcomctl32 -lgmp -lreadline-lintl C:\icu-4.4.1\icu\lib\icudt.lib
C:\icu-4.4.1\icu\lib\icuuc.lib
Linked: installable_squaak.exe

> parrot setup.pir test
t/00-sanity.t .. ok
All tests successful.
Files=1, Tests=4,  0.328 wallclock secs
Result: PASS

François

Note: parrot-users at lists.parrot.org is the right mailling list for this kind
of problem,
and you could find help on channel #parrot (irc.perl.net).



> Best regards
>
>
>
> richard sutcliffe
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-users/attachments/20101019/6ac3753d/attachment.html>


More information about the Parrot-users mailing list