Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

chromatic
  (email not shown publicly)
http://wgz.org/chromatic/

Blog Information [technorati.com] Profile for chr0matic [technorati.com]

Journal of chromatic (983)

Sunday December 30, 2007
04:51 AM

Want a perl6 Binary?

[ #35244 ]

Check out Parrot as of r24278 or newer. Configure and build it:

$ perl Configure.pl
$ make

Build Perl 6:

$ cd languages/perl6/
$ make

Now build the new pbc_to_c target. 'snifty:

$ cd ../..
$ make pbc_to_c

With the shiny new pbc_to_c utility, make the perl6 binary:

$ ./pbc_to_c languages/perl6/perl6.pbc

Now you have a perl6 binary that can run Perl 6 programs:

$ ./perl6 languages/perl6/t/01-sanity/01-tap.t

Caveats: you need to build a shared libparrot with dynamic loading (the default Parrot build, I believe). Also, for now, you can only run the Perl 6 binary from the root directory of a Parrot checkout. Both problems are solveable. (I think the binary will work against an installed Parrot, though I'm not sure we install the supporting PBCs appropriately yet.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Here's my attempt.

    Checked out revision 24297.
    parrot $ cd parrot
    parrot $ perl Configure.pl
    Base class package "Parrot::Configure::Compiler" is empty.
        (Perhaps you need to 'use' the module which defines that package first.)
    at lib/Parrot/Config
    --
    Silence is Evil [easystreet.com]
    • It looks like one of the configuration system branch merges missed a file, so until Jim can fix it, try r24278; that's one I know is good.

      • Still fails on my Intel MacBook (if that's relevant). There are appear to be a bunch of tests missing from the manifest and the pbc_to_c target fails with:

        compilation failed
        current instr.: '_throw' pc 438 (pbc_to_c.pir:250)
        called from Sub 'compile_file'
        --
        Silence is Evil [easystreet.com]
      • This kind of remark is exactly the sort of reason why it is a good idea to ditch Subversion and move to a decent Source Control Management system. Producing a stable branch with Subversion is not common practice, because the tools make it hard and do not
    • Barney corrected the missing file in r24298. My apologies. Will be posting to list background to this oversight.

      kid51
  • In my opinion (from a packaging and module perspective) this is on the single most significant milestones in the Perl 6 timeline.
  • chromatic wrote:

    Now you have a perl6 binary that can run Perl 6 programs:

    $ ./perl6 languages/perl6/t/01-sanity/01-tap.t

    Caveats: you need to build a shared libparrot with dynamic loading (the default Parrot build, I believe). Also, for now, you can o

    • Out of curiosity, what platform are you on? I'm still working with the perl6-internals team to figure out how to get this to properly build on my Intel MacBook. We're getting closer, but there are still failures.

      For those following along at home, use t

      --
      Silence is Evil [easystreet.com]
      • For the average user, perl Configure.pl will suffice, i.e., you can omit the --test.

        The --test option is something which those working on the configuration and build systems should run, but is not necessary for language developers or those (like myself!)

      • I'm having issues building r24319 on my Intel MacBook Pro following these instructions. Specifically, when I try the make pbc_to_exe step I get:

        /usr/bin/ld: Undefined symbols:
        _PackFile_fixup_subs
        _PackFile_new
        _PackFile_unpack
        _Parrot_destroy
        _Parrot_
  • .. what do I need to update?

    or do I need to dump that and install from svn?
    --

    @JAPH = qw(Hacker Perl Another Just);
    print reverse @JAPH;
    • The easiest way is to pull from SVN. Otherwise, I'd have to tell you how to merge and move around several different files.

  • $ cd languages/perl6/
    $ make
    $ cd ../..

    Much better written as make -C languages/perl6/.

    • Actually the name 'pbc_to_c' is a misnomer, as the generated C-code is automatically compiled and linked to an executable. So as of r24315 of https://svn.perl.org/parrot/trunk [perl.org] it works, at least under Linux, like this: $ cd parrot $ perl Configur
      --
      /* Bernhard.Schmalhofer@gmx.de */
      • This works for me on Linux, but not yet on Darwin.

        perl Configure.pl && make
        cd languages/perl6/ && make
        cd -
        make pbc_to_exe
        ./pbc_to_exe languages/perl6/perl6.pbc
        ./languages/perl6/perl6 languages/perl6/t/01-sanity/01-tap.t

  • To anyone wanting to run this: owing to some comments on #parrot by pmichaud and barney, I renamed the pbc_to_c target to pbc_to_exe and barney applied it.

    --
    Silence is Evil [easystreet.com]
  • As of r24319, it builds and runs fine on a MacBook Pro (2.33 GHz Intel C2D) running Mac OS X 10.5.1.

    This is very exciting. This could be a another turning point for increasing interest in involvement with perl6 development.
    --
    The great thing about multitasking is that several things can go wrong at once.
  • I finally made it to build a perl6.exe on Win32 with MSVC9!
    It didn't work out of the box. I had to make little changes here and there...

    I tracked the problems I encountered and left a little patch that seems to solve them at http://rt.perl.org/rt3/Ticke [perl.org]

  • When the next version of Parrot comes out, do you plan to promote this build process to something that will be supported (and I assume tested?)...

    If so I'll probably jump on the band-wagon there, instead of mucking around with blead versions.
  • As of -r24427 and higher, you can say "make perl6" and it will do all that hoohah for you automagically.
    --

    --
    xoa