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
56
57
58
59
60
61
62
63
64
65
66
67
|
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 and place it next to build2, so that you have:
libbutl/ (or libbutl-x.y.z/)
build2/ (or build2-x.y.z/)
1. Change to the build2 directory and execute 'bootstrap' specifying
the C++ compiler to be used, if necessary (default is 'g++'; run
./bootstrap --help for other options). For example:
$ cd build2/
$ ./bootstrap --cxx clang++-3.5
Once the script completes successfully (which may take some time), the
build2 binary is saved as 'build/b-boot':
$ build/b-boot --version
2. Next, build libbutl and the build2 binary using the bootstrapped binary
from step 1 above:
$ build/b-boot 'configure(../libbutl/)'
$ build/b-boot config.import.libbutl=../libbutl configure update
Again, if necessary, you can also specify the C++ compiler:
$ build/b-boot config.cxx=clang++-3.5 ...
The resulting build2 binary is saved as 'build/b':
$ build/b --version
3. The last step is optional and involves building libbutl and build2 using
the binary built on step 2 above and verifying that the two builds are
identical.
@@ This is currently broken since the resulting binary contains fill
object file paths. So we would need to build in exactly the same
place as the original, but that would make the binary from step 2
unusable. It seems the only way to make it work is via staging.
To perform this step, first unpack new copies of libbutl and build2 into
a different directory, for example, a verify/ sub-directory. Then complete
step 2 for these new copies but using build/b binary from step 2 rather
than build/b-boot from step 1. Also, use the libbutl from step 2 in the
config.import.libbutl value (otherwise rpath differences will result in
different build2 binaries). For example:
$ cd verify/build2
$ ../../build2/build/b '{configure update}(../libbutl/)'
$ ../../build2/build/b config.import.libbutl=../../libbutl configure update
Once this is done, compare the libbutl libraries and build2 binaries, for
example:
$ cd ../..
$ diff libbutl/butl/libbutl.so verify/libbutl/butl/libbutl.so
$ diff build2/build/b verify/build2/build/b
|