aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
blob: b37563e956765bf61c995d0f375a01b3f4c23294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Currently, to use build2 you will need a C++ compiler with C++14 support.
This may be relaxed later to only require C++11. For now, gcc 4.9.0 or
later and clang 3.5.0 or later are known to work.

build2 is self-hosted, which means that unless you have obtained a pre-
built binary of build2 from somewhere else, you will need to bootstrap
it. To accomplish this, use the 'bootstrap' shell script found in the
root directory of the build2 project. The following is a recommended
sequence of steps:

0. Get libbutl unless one is already present in the build2 directory
   (whether one is bundled depends on how you obtained build2 source
   code). Place it next to build2, so that you have:

   libbutl/ (or libbutl-x.y.z/)
   build2/  (or build2-x.y.z/)

1. Execute 'bootstrap' specifying the C++ compiler to be used if necessary
   (default is 'g++'). For example:

   $ ./bootstrap --cxx clang++-3.5

   Once the script completes successfully, the build2 binary is saved
   as 'build/b-boot'.

2. Next, build the build2 binary using the bootstrapped binary from step
   1 above, again specifying the C++ compiler if necessary, for example:

   $ build/b-boot config.cxx=clang++-3.5

   If you had to obtain libbutl at step 0, then you will also have to
   specify its location, for example:

   $ build/b-boot config.import.libbutl=../libbutl ...

   The result of this command is saved as 'build/b'.

3. Finally, rebuild the build2 binary using the binary built at step 2
   above, and verify that they are identical. For example:

   $ mv build/b build/b-prev
   $ build/b-prev config.cxx=clang++-3.5 clean
   $ build/b-prev config.cxx=clang++-3.5 configure update
   $ diff -b build/b build/b-prev

   If you had to obtain libbutl, then this becomes ('...' stands for
   any extra configuration you may have, like the C++ compiler above):

   $ mv build/b build/b-prev
   $ build/b-prev config.import.libbutl=../libbutl ... clean
   $ cd ../libbutl
   $ ../build2/build/b-prev ... configure
   $ cd ../build2
   $ build/b-prev config.import.libbutl=../libbutl ... configure update
   $ diff build/b build/b-prev