Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 161 lines (123 sloc) 6.833 kB
90f996e @moritz move most of the build instructions into a separate INSTALL file
moritz authored
1 Build requirements (Installing from source)
2 For building Rakudo you need at least a C compiler, a "make" utility,
3 and Perl 5.8 or newer. To automatically obtain and build Parrot you
4 may also need a a git client, which is also needed for fetching the
5 test suite.
6
7 In order to fully support Unicode, you'll also want to have the ICU
8 library installed (<http://site.icu-project.org/>). Rakudo can run
9 without ICU, but some Unicode-related features do not work properly.
10
0208b56 @pmichaud Refactor prerequisite notes, since INSTALL.TXT has the detailed
pmichaud authored
11 To get readline support (command history and editing), you'll also
12 need the "libreadline-dev" library.
13
90f996e @moritz move most of the build instructions into a separate INSTALL file
moritz authored
14 As an example, on Debian GNU/Linux or Ubuntu Linux, the necessary
15 components for building Rakudo can be installed via the command
16
0208b56 @pmichaud Refactor prerequisite notes, since INSTALL.TXT has the detailed
pmichaud authored
17 aptitude install make gcc libicu-dev libreadline-dev git-core
90f996e @moritz move most of the build instructions into a separate INSTALL file
moritz authored
18
19 (Perl is installed by default already). To enable parallel testing you
20 also need the CPAN module Test::Harness in version 3.16 or newer; you
21 can control the number of parallel jobs with the "TEST_JOBS" environment
22 variable.
23
24 Building and invoking Rakudo
0208b56 @pmichaud Refactor prerequisite notes, since INSTALL.TXT has the detailed
pmichaud authored
25 If you're wanting the bleeding-edge version of the Rakudo Perl 6
26 compiler, we recommend downloading Rakudo directly from Github
27 and building it from there.
90f996e @moritz move most of the build instructions into a separate INSTALL file
moritz authored
28
29 $ git clone git://github.com/rakudo/rakudo.git
30
31 If you don't have git installed, you can get a tarball or zip of Rakudo
32 from <http://github.com/rakudo/rakudo/downloads>. Then unpack the
33 tarball or zip.
34
35 If you already have cloned Rakudo from github, you can get (pull) the
36 most recent version from github like this:
37
38 $ cd rakudo
39 $ git pull
40
41 Once you have an up-to-date copy of Rakudo, build it as follows:
42
43 $ cd rakudo
44 $ perl Configure.pl --gen-parrot
45 $ make
46
47 This will create a "perl6" or "perl6.exe" executable in the current
48 (rakudo) directory. Note that if you have multiple (Perl 5) "perl"s in
49 your path, you may need to use a fully qualified path to the appropriate
50 executable (or update your PATH environment variable).
51
52 Programs can then be run from the build directory using a command like:
53
54 $ ./perl6 hello.pl
55
56 Important: To run Rakudo from outside the build directory, you must run
57
58 $ make install
59
60 This will install the "perl6" (or "perl6.exe" binary on windows) into
61 the "install/bin" directory locally, no additional root
62 privileges necessary.
63
64 The "--gen-parrot" above option tells Configure.pl to automatically
65 download and build the most appropriate version of NQP and Parrot
66 into local "nqp/" and "parrot/" subdirectories, install NQP and Parrot
67 into the "install/" subdirectory, and use them for building Rakudo.
68 It's okay to use the "--gen-parrot" option on later invocations of
69 Configure.pl; the configure system will re-build NQP and/or Parrot
70 only if a newer version is needed for whatever version of Rakudo
71 you're working with.
72
73 If you already have Parrot installed, you can use
74 "--with-parrot=/path/to/bin/parrot" to use it instead of
75 building a new one. This installed Parrot must include its
76 development environment. Similarly, if you already have NQP
77 installed, you can specify "--with-nqp=/path/to/bin/nqp"
78 to use it. (Note that this must be NQP, not the NQP-rx that
79 comes with Parrot.)
80
81 The versions of any already installed NQP or Parrot binaries must
82 satify a minimum specified by the Rakudo being built -- Configure.pl
83 and "make" will verify this for you. Released versions of Rakudo
84 always build against the latest release of Parrot; checkouts of
0208b56 @pmichaud Refactor prerequisite notes, since INSTALL.TXT has the detailed
pmichaud authored
85 Rakudo's HEAD revision from Github often require a version of Parrot
90f996e @moritz move most of the build instructions into a separate INSTALL file
moritz authored
86 that is newer than the most recent Parrot monthly release.
87
88 Once built, Rakudo's "make install" target will install Rakudo and its
89 libraries into the directories specified by the Parrot installation
90 used to create it. Until this step is performed, the "perl6"
91 executable created by "make" above can only be reliably run from
92 the root of Rakudo's build directory. After "make install" is
93 performed, the installed executable can be run from any directory
94 (as long as the Parrot installation that was used to create it
95 remains intact).
96
97 If the Rakudo compiler is invoked without an explicit script to run, it
98 enters a small interactive mode that allows Perl 6 statements to be
99 executed from the command line.
100
101 See the manual page ("docs/running.pod") for more about command-line
102 options.
103
104 Build/install problems
105 Occasionally, there may be problems when building/installing Rakudo.
106 Make sure you have a backup of any custom changes you have done to the
107 source tree before performing the following steps:
108
109 Try to remove the "install/" subdirectory:
110
111 $ cd rakudo
112 $ rm -r install
113 $ git pull
114 $ perl Configure.pl --gen-parrot
115 $ make
116
117 Or, in case you are really stuck, start with a fresh source tree:
118
119 $ rm -r rakudo
120 $ git clone git://github.com/rakudo/rakudo.git
121
122 Running the test suite
123 Entering "make test" will run a small test suite that comes bundled with
124 Rakudo. This is a simple suite of tests, designed to make sure that the
125 Rakudo compiler is basically working and that it's capable of running a
126 simple test harness.
127
128 Running "make spectest" will import the official Perl 6 test suite from
129 the "roast" repository <http://github.com/perl6/roast/> and run all
130 of these tests that are currently known to pass.
131
132 If you want to automatically submit the results of your spectest run to
133 a central server, use "make spectest_smolder" instead. You need the
134 Perl 5 module TAP::Harness::Archive and an active internet connection
135 for that. The smoke results are collected at
136 <http://smolder.parrot.org/app/projects/smoke_reports/5>
137
138 At present we do not have any plans to directly store the official test
139 suite as part of the Rakudo repository, but will continue to fetch it
140 from the roast repository. Releases of Rakudo get a snapshot of
141 the roast repository as of the time of the release.
142
143 You can also use "make" to run an individual test from the command line:
144
145 $ make t/spec/S29-str/ucfirst.t
146 t/spec/S29-str/ucfirst.rakudo ..
147 1..4
148 ok 1 - simple
149 ok 2 - empty string
150 ok 3 - # SKIP unicode
151 ok 4 - # SKIP unicode
152 # FUDGED!
153 ok
154 All tests successful.
155 Files=1, Tests=4, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.57 cusr 0.06 csys = 0.65 CPU)
156 Result: PASS
157
158 If you want to run the tests in parallel, you need to install a fairly
159 recent version of the Perl 5 module Test::Harness (3.16 works for sure).
160
Something went wrong with that request. Please try again.