Information for Solaris for x86 Users : Notes for building XFree86 on Solaris x86
Previous: The VT-switching sub-system in Solaris x86
Next: Notes for running XFree86 on Solaris x86

## 4. Notes for building XFree86 on Solaris x86

1. The majority of all modifications you will need to make are now in `~xc/config/cf/xf86site.def`.
2. Both Gcc, and ProWorks are supported by XFree86. Gcc-2.5.8 or gcc-2.7.2.3 are suggested, Gcc-2.6.0 is known not to work. You also need to set HasGcc2 correctly in `~xc/config/cf/xf86site.def`. You should also make certain your version of GCC predefines `sun'. 2.4.5 is known NOT to by default. If needed edit `/usr/local/lib/gcc-lib/*/*/specs`, and modify the `*predefines:` line.

   Note: A Threaded Xlib compiled with GCC has subtle problems. It'll work 98% of the time, however clients will occasionally exhibit strange hangs. Most notably image viewers such as xv-3.10 exhibit this problem.

   It is recommended that you set ThreadedX in `~xc/config/cf/sun.cf` to NO, if you are using GCC. ProWorks does not have this problem.

3. To build XFree86 with gcc you need gcc and (optionally) c++filt from GNU binutils. Don't install gas or ld from GNU binutils, use the one provided by Sun.

   With XFree86 3.3.2, you will need to setup a /opt/SUNWspro/bin directory containing symbolic links named `cc`, `CC`, and `c++filt` pointing respectively to the actual `gcc`, `g++` and `c++filt` commands.

4. If you don't have c++filt or if you have troubles in making World with c++filt, you need to set UseExportLists to NO in `~xc/config/cf/host.def`.

5. If you are using ProWorks to compile the XFree86 distribution, you need to modify your PATH appropriately so the ProWorks tools are available. Normally, they should be in `/opt/SUNWspro/bin`
6. You MUST put `/usr/ccs/bin` at the front of your PATH. There are known problems with some GNU replacements for the utilities found there. So the `/usr/ccs/bin` versions of these programs must be found before any other possible GNU versions. (Most notably GNU '`ar`' does not work during the build).
7. If you wish to use the "memory aperture" feature of the S3, and Mach32 servers, you need to compile, and install the Solaris x86 aperture driver for memory mapped I/O support. This driver is REQUIRED for the I128, P9000 and Mach 64 servers.

   You need to set HasSolx86apertureDrv to YES in `~xc/config/cf/xf86site.def`.

   to enable the aperture driver.

   Under Solaris 2.5 and later, there's a system driver (`/dev/xsvc` that provides this functionality. It will be detected automatically by the server, so you don't need to install the driver.

   For Solaris 2.1 and 2.4, the source for this driver is included in `~xc/programs/Xserver/hw/xfree86/etc/apSolx86.shar`. Building, and installing the driver is relatively straight forward. Please read its accompanying README file.

Information for Solaris for x86 Users : Notes for building XFree86 on Solaris x86
Previous: The VT-switching sub-system in Solaris x86
Next: Notes for running XFree86 on Solaris x86