summaryrefslogtreecommitdiff
path: root/Hurd/BuildingHurd.mdwn
blob: 8fc13e6e82d67cd22c42bdb14e1ae1b181e30f86 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# <a name="Building_the_Hurd_from_Source"> Building the Hurd from Source </a>

If you want to build the Hurd libraries and servers (translators) yourself instead of just using pre-built binaries, follow these instructions.

## <a name="Getting_the_Source_Code"> Getting the Source Code </a>

You can chose between getting the [sources from the developers's RCS](http://www.gnu.org/software/hurd/download.html#cvs):

    $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co hurd

... or (if you are working on a Debian system) the ones that are used for the [current Debian hurd package](http://packages.debian.net/source/unstable/hurd):

    $ apt-get source hurd

Please see [[Distrib/DebianFAQ]] before using _apt-get source_.

The unpacked source tree is around 20 MiB, and the build tree (configured with _--disable-profile_) is around 100 MiB.

## <a name="Preparing_for_the_Build"> Preparing for the Build </a>

### <a name="_on_Debian_systems"> ... on Debian systems </a>

Building the Hurd requires the _build-essential_ and _fakeroot_ packages, their dependencies and additional packages that are specified by the source hurd package:

    # apt-get install build-essential fakeroot
    # apt-get build-dep hurd

### <a name="_on_non_Debian_systems"> ... on non-Debian systems </a>

[TODO]

## <a name="Building"> Building </a>

### <a name="_deb_files"> ... _.deb_ files </a>

Change into the directory with the downloaded / unpacked Hurd sources, e.g.

    $ cd hurd-[TODO]

Start the build process with

    $ dpkg-buildpackage -us -uc -b -rfakeroot

### <a name="_TODO_"> [TODO] </a>

The Hurd has to be built in a separate directory:

    $ mkdir hurd-build
    $ cd hurd-build

    $ [...]/hurd-[TODO]/configure --disable-profile
    $ make
    $ make install

Notice that _make install_ will install the Hurd in _/_, not in _/usr/local/_ or _/local/_, so your current Hurd servers will be replaced. [TODO: how to install somewhere else.]

By default profiling versions of all the libraries and code are generated but this is useless in most of the cases, so we disable them by specifying _--disable-profile_ on \_configure\_'s command line.

As an alternative, you can build and install the Hurd in the Debian way (from CVS snapshot):

    $ cd hurd
    $ dpkg-buildpackage

If you just want to build a specific server or library, you can pass its name to _make_:

    $ make ext2fs
    $ make libtrivfs

This will automatically build all libraries that are required to build the requested server or library.

### <a name="cross_compiling_"> cross compiling. </a>

[TODO]

## <a name="_TODO_"> [TODO] </a>

[TODO: update / integrate somewhere.]

If you want to trace the RPC calls made by some process by using `rpctrace` command, you will also want some more human-readable output of this command. This is achieved by generating `hurd.msgids` file that includes the mapping between the number of the RPC call and its name:

    $ cd build/hurd
    $ make hurd.msgids
    $ cp hurd.msgids ~

Now you can use this file in the following way:

    $ rpctrace -i ~/hurd.msgids ls

-- [[Main/OgnyanKulev]] - 08 Apr 2003