Compiling the XFree86 Distribution

README for XFree86 4.2.0 on LynxOS : Compiling the XFree86 Distribution
Previous: Running XFree86
Next: README for XFree86 4.2.0 on LynxOS

## 4. Compiling the XFree86 Distribution

The next sections contain LynxOS specific notes with respect to the build process.

### 4.1. Disk space requirements

Currently there is no support for shared libraries in the LynxOS XFree86 port. A complete binary installation along with manual pages will require approximately 100 MBytes of disk space. To compile the system you will need at least 250 MBytes of free disk space.

### 4.2. Changes to system environment (LynxOS x86)

Before compiling the XFree86 distribution you will have to make a few little adjustments to your system:

- If not already installed on your system create a shell script named `/lib/cpp` as follows:

  > `

  >       #!/bin/sh
  >       /usr/lib/gcc-lib/i386-unknown-lynxos2.5/2.7-96q1/cpp \
  >          -traditional "$@"

  > `

  On other platforms than the x86 the paths for the compiler support programs are different. You may use

  > `

  >       gcc -v

  > `

  to find out the correct path. Set the file mode of `/lib/cpp` with

  > `

  >       # chown root /lib/cpp
  >       # chmod 755 /lib/cpp

  > `

- Modify `/lib/liblynx.a`. The X servers need the `smem_create()` system call to map the frame buffer into their address space. The system call is in `liblynx` library along with other Lynx proprietary calls which (unfortunately) overlap with calls in `libc`. To reduce confusion you should modify `liblynx` as follows:

  > `

  >       # mv /lib/liblynx.a /lib/liblynx.a.ORG
  >       # mkdir /tmp/xx; cd /tmp/xx
  >       # ar xv /lib/liblynx.a.ORG
  >       # ar rv /lib/liblynx.a *smem*
  >       # ranlib /lib/liblynx.a

  > `

### 4.3. make World

If you have the MTRR device driver installed, add a line

> `

>         #define HasMTRRSupport YES

> `

to the `config/cf/host.def` file.

You may then issue a

> `

>          make World

> `

to compile XFree86. After a few hours (and hopefully a successful build of the XFree86 system) you can install the software using

> `

>          make install

> `

You must be logged in as super-user (root) when you invoke `make install'.

On LynxOS x86 2.5.0 you may encounter problems with `make` in deeply nested subdirectories (eg core dumps, hangups). In this case update to GNU make version 3.75 or higher.

### 4.4. Installing XFree86 manual pages

LynxOS uses cat-able manual pages, and because a doc preparation system is definitely not a vital component of a real-time operating system you must first install groff-1.09 (or newer).

XFree86 manual pages may be installed using

> `

>          make install.man

> `

The index and whatis database for the XFree86 manual pages will be created automatically. If you already have a whatis database or index file in the destination directories you should perform a sort/uniq operation to remove duplicate entries:

> `

>          for i in 1 3 5
>          do
>            rm -f /tmp/tmpfile
>            sort /usr/X11R6/man/cat$i/LIST$i | uniq > /tmp/tmpfile
>            mv /tmp/tmpfile /usr/X11R6/man/cat$i/LIST$i
>          done
>          sort /usr/X11R6/man/whatis | uniq > /tmp/tmpfile
>          mv /tmp/tmpfile /usr/X11R6/man/whatis

> `

README for XFree86 4.2.0 on LynxOS : Compiling the XFree86 Distribution
Previous: Running XFree86
Next: README for XFree86 4.2.0 on LynxOS