summaryrefslogtreecommitdiff
path: root/BUILD.txt
blob: 7fde6d66e04fd27fde5b1352caeae5bc823f23d0 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
                Building XFree86® from a Source Distribution

                         David Dawes, Matthieu Herrb

                                16 March 2005

                                  Abstract

      This document describes how to build XFree86 from the source dis-
     tribution and is designed to be used in conjunction with the oper-
     ating system (OS) specific README files.

     NOTE: Refer to the appropriate OS-specific README file before
     attempting to build XFree86.  These files often contain additional
     information that you need to successfully build for your OS.

We recommend using gcc to build XFree86, but XFree86 generally builds with
the native compiler for each OS platform.

1.  How to get the XFree86 4.8.0 source

The recommended way of getting the XFree86 4.8.0 source is to obtain it
directly from the XFree86 CVS repository.  There are several ways of doing
that, and they are described at our CVS web page
<URL:http://www.xfree86.org/cvs/>.

The CVS tag for this release is "xf-4_8_0".  The tag for the maintenance
branch for this release is "xf-4_8-branch".

Another method of getting the XFree86 4.8.0 source is to either download the
4.8.0 source tarballs from the XFree86 ftp site.  The procedure for this is
as follows:

   o The XFree86 4.8.0 source is contained in the files:

          XFree86-4.8.0-src-1.tgz

          XFree86-4.8.0-src-2.tgz

          XFree86-4.8.0-src-3.tgz

          XFree86-4.8.0-src-4.tgz

          XFree86-4.8.0-src-5.tgz

          XFree86-4.8.0-src-6.tgz

          XFree86-4.8.0-src-7.tgz

     These can be found at ftp://ftp.xfree86.org/pub/XFree86/4.8.0/source/.
     XFree86-4.8.0-src-4.tgz and XFree86-4.8.0-src-5.tgz contains the fonts.
     XFree86-4.8.0-src-6.tgz contains the documentation source.
     XFree86-4.8.0-src-7.tgz contains the hardcopy documentation.
     XFree86-4.8.0-src-1.tgz, XFree86-4.8.0-src-2.tgz and
     XFree86-4.8.0-src-3.tgz contains everything else.

     If you do not need either the documentation or the fonts, then you need
     only XFree86-4.8.0-src-1.tgz, XFree86-4.8.0-src-2.tgz and
     XFree86-4.8.0-src-3.tgz.

   o Extract each of these files by running the following from a directory on
     a filesystem containing enough space (the full source requires around
     270MB, with a similar amount being required for the compiled binaries):

          gzip -d < XFree86-4.8.0-src-1.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-2.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-3.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-4.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-5.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-6.tgz | tar vxf -

          gzip -d < XFree86-4.8.0-src-7.tgz | tar vxf -

Alternatively, if you already have a pristine copy of the XFree86 4.7.0
source, you can download patches from
ftp://ftp.xfree86.org/pub/XFree86/4.8.0/patches/ that will allow you to con-
vert it to 4.8.0.  Information about which patch files to download and how to
apply them can be found in the "How to get XFree86" section of the README for
this release.

Each of the methods outlined above will produce one main source directory
called xc.

2.  Configuring the source before building

In most cases it should not be necessary to configure anything before build-
ing.

If you do want to make configuration changes, you should start by going to
the xc/config/cf directory, and copying the file xf86site.def to host.def.
After that, read thoroughly the the host.def file, which is heavily com-
mented, and set your configuration parameters. Usually you can find the
default settings by checking the .cf file(s) relevant to your OS.

A good rule of thumb is to only change that you understand, as it is very
easy to create build problems by changing the default configuration unneces-
sarily.  Before making too many modifications, check the configuration param-
eters specified in the xc/config/cf/README file.

If you are using just the XFree86-4.8.0-src-1.tgz, XFree86-4.8.0-src-2.tgz
and XFree86-4.8.0-src-3.tgz parts of the source dist, you will need to define
BuildFonts to NO.

3.  Using a shadow directory of symbolic links for the build

We recommend that you use a shadow directory of symbolic links to do the
build of XFree86, because it allows you to keep the source directory unmodi-
fied during the build process.  It has the following benefits:

   o Foreign files not under CVS's control are not touched.

   o Greater flexibility in building XFree86 for several different Operating
     Systems or hardware architectures from the same sources; shared by read-
     only NFS mounts.

   o Different configuration options can be created by putting a real copy of
     the host.def file in each build tree and by customizing it separately in
     each build tree, and then customizing it separately.

To make a shadow directory of symbolic links, use the following steps:

   o create the directory at the top of the build tree. This is often created
     at the same level that the xc directory.

          cd the directory containing the xc directory

          mkdir build

   o use the "lndir" command to make the shadow tree:

          cd build

          lndir ../xc

     Note: You can refer to the xc directory by referencing it with an abso-
     lute path also.

     See the lndir(1) manual page for details.

If the lndir command is not already available on your system, you can build
it manually from the XFree86 sources by running the following commands:

     cd xc/config/util

     make -f Makefile.ini lndir

     cp lndir some directory in your PATH

Occasionally there may be stale links in the build tree.  This happens when
files in the source tree are either removed or renamed.  These stale links
can be cleaned by running the "cleanlinks" script from the build directory
(see the cleanlinks(1) manual page for further details).

Rarely will there be changes that require the build tree to be re-created
from scratch.  If you think that this may be the case, look for build prob-
lems, which could indicate that this is the problem.  The best solution in
this scenario is to remove the build tree,and then re-create it using the
steps outlined above.

4.  Building and installing the distribution

Before building the distribution, read through your  OS-specific documenta-
tion in README file in xc/programs/Xserver/hw/xfree86/doc.  After that go to
your build directory  which will either be the xc directory or the shadow
tree which was create previously, and run "make World".

It is also advisable to that you redirect standard output stdout and standard
error output stderr to World.Log,  so that you can track down problems that
might occur during the build.

With Bourne-like shells (examples include the Bash, the Korn, and zsh shells)
use the following command:

     make World > World.log 2>&1

for C-shell variants (csh, tcsh, etc), use:

     make World >& World.log

You can then follow the progress of the build by running:

     tail -f World.log

in a terminal window.

When the build is finished, you should check the World.Log file to see if
there were any problems.  If there were not, then install the binaries.  By
default "make World" stops when the first error is found.  To restart that
same build process after correcting the various problems, run just 'make'.

If Imakefiles or part of the build configuration were changed as part of cor-
recting the problem, then either re-run "make World", or run "make Every-
thing".

If instead, you want "make World" to continue past errors, then instead exe-
cute it as follows:

for Bourne-like shells:

     make WORLDOPTS=-k World > World.log 2>&1

for C-shell variants:

     make WORLDOPTS=-k World >& World.log

For installation, run "make install" and "make install.man" and ensure that
there is enough space in the /usr/X11R6 directory.

If instead you want to install XFree86 on a filesystem other than /usr, make
a symbolic link to /usr/X11R6 before running the install process.

5.  Reconfiguring the server (using the source distribution)

If you would like to build several different sets of servers or server(s)
with a various sets of drivers then you should follow this procedure:

  1.  Ensure that the source for any new drivers is in the correct place
      (e.g., all driver source should be in a subdirectory of xc/pro-
      grams/Xserver/hw/xfree86/drivers).

  2.  Change the settings of the server definitions in host.def to specify
      which servers you wish to build.  Also, change the driver lists to suit
      your needs.

  3.  From xc/programs/Xserver, run:

                make Makefile
                make Makefiles
                make includes
                make depend
                make

6.  Other useful make targets

There are some other useful targets defined in the top level Makefile of
XFree86:

      Everything
            After a make World, make Everything replicates make World except
            for the cleaning of the source tree. make Everything very quickly
            rebuilds the tree after a source patch, but there are times when
            it is better to force a full build by using make World.

      clean
            This does a partial cleaning of the source tree. Removes object
            files and generated manual pages, but leaves the Makefiles and
            the generated dependencies files in place. After a make clean you
            need to re-run

                         make includes
                         make depend
                         make

            to rebuild the XFree86.

      distclean
            This does a full cleaning of the source tree, removing all gener-
            ated files. After a make distclean, make World is the only option
            to rebuild XFree86.

      includes
            This generates all generated header files and in-tree symbolic
            links  needed by the build. These files are removed by a make
            clean.

      depend
            This recomputes the dependencies for the various targets in all
            Makefiles. Depending on the operating system, the dependencies
            are stored in the Makefile, or as a separate file, called
            .depend. This target needs the generated include files produced
            by make includes.

      VerifyOS
            This displays the detected operating system version. If the num-
            bers shown do not match your system, you probably need to set
            them manually in host.def and report the problem to
            <XFree86@XFree86.org>.

     Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/BUILD.sgml,v 3.20 dawes Exp $


$XFree86: xc/BUILD.txt,v 1.4tsi Exp $