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

Richard.Sutcliffe Richard.Sutcliffe at ul.ie
Tue Oct 19 19:06:11 UTC 2010




From: Richard.Sutcliffe 
Sent: 19 October 2010 19:58
To: 'François Perrad'
Subject: RE: [UNSURE]Using Parrot PCT on Windows


Many thanks for your most helpful reply.


Well, I had tried mk_language_shell.pl before - this is given in Klaas's instructions but I then saw elsewhere that it was no longer recommended and create_language.pl should be used instead.


If I do

C:\parrot-2.8.0\bin>perl c:\parrot-2.8.0\lib\parrot\tools\dev\mk_language_shell.pl squaak10


That will create the directory including setup.pir


If you run that, it cannot find distutils.pbc . To temporarily circumvent that, I copied it over. The error then was:


PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.

Parrot VM: Can't unpack packfile .\distutils.pbc.


I thought I would find a way round that:


C:\parrot-2.8.0\bin\squaak10>parrot distutils.pir -o distutils.pbc

error:imcc:loadlib directive could not find library `sys_ops'

        in file 'distutils.pir' line 203


So, I copied it over and then:


Parrot_ascii_encoding_pnt could not be located in dll libparrot.dll


That did not look good, so I tried another tack, replacing distutils.pbc with disutils.pir in setup.pir line 23. Once again we get:


Parrot_ascii_encoding_pnt could not be located in dll libparrot.dll


So my problems are related to paths (possibly the route of the entire system, which is c:\parrot-2.8.0 ??) and dlls. Possibly I should have cygwin installed and probably various other things e.g. partic environment variables?


I am going to try the linux version tomorrow as that could be the easiest course here.


For the future it would be very nice to know what config is expected for the windows port, and which parts are known to work. For example the error about version 8.4 .pbc not being OK is strange as the .pbc file and the parrot .exe came in the same distribution.


Thanks again for your help, and sorry to use your time on such an elementary question. I will post my reply to the mailing list now.





From: francois.perrad at imelavi.fr [mailto:francois.perrad at imelavi.fr] On Behalf Of François Perrad
Sent: 19 October 2010 10:24
To: Richard.Sutcliffe
Cc: parrot-users at lists.parrot.org
Subject: Re: [UNSURE]Using Parrot PCT on Windows



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 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
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


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/0c2fa7b5/attachment-0001.html>

More information about the Parrot-users mailing list