                RESOLVING KYLIX PREINSTALLATION PROBLEMS

                          **** IMPORTANT ****
                     About the borpretest software

    BORLAND MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF
    THIS SOFTWARE OR ABOUT ANY CONTENT OR INFORMATION MADE
    ACCESSIBLE BY THE SOFTWARE, FOR ANY PURPOSE. THE SOFTWARE IS
    PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    PARTICULAR PURPOSE OR NONINFRINGEMENT. THIS SOFTWARE IS
    PROVIDED GRATUITOUSLY AND, ACCORDINGLY, BORLAND SHALL NOT BE
    LIABLE UNDER ANY THEORY OR ANY DAMAGES SUFFERED BY YOU OR
    ANY USER OF THE SOFTWARE. BORLAND WILL NOT SUPPORT THIS
    SOFTWARE AND IS UNDER NO OBLIGATION TO ISSUE UPDATES TO THIS
    SOFTWARE.
________
CONTENTS

INTRODUCTION
INTERNATIONAL CONFIGURATION
SUPPORTED DISTRIBUTIONS
PREINSTALLATION TESTING
    Preinstall Requirements
    Running borpretest
    Using rpm to Detect Software Versions
INSTALLING LIBJPEG
FIXING GLIBC
    Red Hat 6.2
        Testing a Red Hat 6.2 System
        Applying the Red Hat 6.2 RPMs
        Using the Red Hat 6.2 Source Patches
    Red Hat 7.0
    Mandrake 7.2
        Testing a Mandrake 7.2 System
        Applying the Mandrake 7.2 RPMs
        Using the Mandrake 7.2 Source Patches
    SuSE 7.0
        Testing a SuSE 7.0 System
        Applying the SuSE 7.0 RPMs
CALDERA OPENLINUX 3.1.1 ISSUES
        Fixing glibc
        Setting up the Font Server
        Application Icons in KDE
RED HAT 7.3


____________
INTRODUCTION

Certain library incompatibilities exist in Linux software that can 
cause problems when running Kylix or Kylix applications. This 
document explains how to test and update your system so it meets the
installation requirements.

This document also describes the following software. This software is
included with the Kylix product and is also available as a
separate free download.

    -- The borpretest program, which searches for incompatibilities 
       that are known to affect Kylix. This program is run by the 
       Kylix installer, which aborts if any problems are discovered. 
       Other incompatibilities can be discovered using standard Linux 
       programs, such as rpm.

    -- An RPM containing libjpeg version 6.2. This version of libjpeg is
       required to run Kylix, but not Kylix applications.

    -- Patches and upgrades for specific Linux distributions. See
       "Supported Distributions" below.
       
___________________________
INTERNATIONAL CONFIGURATION

If you use a localized keyboard, make sure that the X keyboard map
matches the physical keyboard. Some Linux distributions do not do this
automatically. Refer to your distribution's documentation for further
information.

_______________________
SUPPORTED DISTRIBUTIONS

Borland supports Kylix installation on the following Linux distributions:

    -- * Red Hat 7.2
    -- * SuSE 7.3
    -- * Mandrake 8.2

When installing Kylix on a supported distribution it is not necessary
to perform the preinstallation steps outlined in this document. These 
included instructions and related software patches are provided to
ease installation on non-supported distributions.

The software documented here includes patches and upgrades for some non-
supported distributions. If you have another Linux distribution, you should 
be able to obtain the necessary patches and upgrades from the distribution 
maintainer or other Linux support sources. In theory, Kylix and 
applications created by Kylix can run on any Linux distribution, 
provided the system is properly upgraded and configured. However, Borland 
does not support Kylix on any distribution except those listed above.

NOTE - The software patches and utilities referenced below are available
       both on the installation CD ROM and through the Borland support
       site. http://www.borland.com/devsupport
________________________
PREINSTALLATION TESTING

------------------------
Preinstall Requirements

The following problems can interfere with Kylix and should be resolved
before you install Kylix.

    -- Some versions of the glibc loader can cause data corruption 
       during the dynamic loading and unloading of shared objects. 
       The result can be spontaneous segmentation faults in unrelated
       programs. Kylix is particularly sensitive to this issue, and
       will not install if that version of libc is present. This has
       been reported to glibc's maintainers, who have incorporated a fix
       in glibc 2.2. Systems that cannot upgrade to glibc 2.2 require
       a patched version of glibc 2.1.2 or later.

    -- Kylix and Kylix applications require glibc 2.1.2 or later.
       Upgrades are provided, where necessary, for all supported
       distributions. Note that SuSE Linux refers to glibc as "libc",
       but with the same version numbers as used by the glibc
       maintainers.

    -- Kylix requires Linux kernel 2.2 or higher. (Some, but not all,
       Kylix applications also have this requirement.) All supported
       distributions already meet this requirement.

    -- Kylix requires libjpeg 6.2 or higher. (Some, but not all, Kylix
       applications also have this requirement.) An RPM package for this
       version is provided.

The borpretest program detects all the problems described above. Except
for the loader bug, these problems can also be detected manually; see
"Using RPM to Detect Software Versions" below.

Fixing the libjpeg problem on supported distributions (and other
RPM-based distributions) consists of a simple upgrade. See "Installing
libjpeg" below.

There is no general fix for the glibc problems, only distribution
specific fixes. Borland supplies fixes for the supported distributions,
which are described under "Fixing glibc" below. Some of these fixes can
be adapted to other distributions, but Borland cannot provide support for
adaptation efforts.


------------------
Running borpretest

The borpretest directory contains all the files required to
automatically detect preinstallation problems. These are:

    -- The borpretest program itself.

    -- The testsystem shell script, a simplified way to run borpretest.

    -- Three shared-object files, lib-a.so, lib-b.so, and lib-c.so.
       These are used by borpretest to test for the loader bug.

The simplest way to run borpretest is to have all the above files in a
single directory and run this shell command from that directory:

    cd borpretest
    ./testsystem

You can do this in place if the files are on a file system that allows
program execution. Otherwise, you should copy the borpretest directory
to a local hard disk and run it there. For example:

    cp -r borpretest /home/tester
    cd /home/tester/borpretest
    ./testsystem

Running the testsystem script produces a brief summary of the problems
that need to be resolved.

To run borpretest directly, set the LD_LIBRARY_PATH environment variable
to the directory containing the test shared-object files. By default,
borpretest prints only a simple summary of problems or their absence.
The -v option expands this output to a detailed log of the tests
performed. The -q options suppresses all printed output, so borpretest
can be used in a shell script that relies on the program's exit code.

Possible exit codes are:

    0 -- No problems detected
    1 -- Loader bug detected
    2 -- Upgrade needed for Linux kernel
    3 -- Upgrade needed for glibc
    4 -- Install or upgrade needed for libjpeg
    5 -- Invalid argument

-------------------------------------
Using rpm to Detect Software Versions
    
The shell command "rpm -qa" lists all RPM packages installed on your
system. Using grep as a filter, you can restrict output to package
names with a specified search string. For example, the command

    rpm -qa | grep libc

might produce the output

    glibc-2.1.3-21b

indicating glibc, version 2.1.3, release 21b is installed. Additional
glibc packages, which support features such as C programming and
profiling, may also be installed. On a SuSE system, this search might
report both a libc package (libc being SuSE's name for glibc) and a
"placeholder" glibc, installed for software that needs a package named
glibc to run.

The rpm command can also provide detailed
information on a specific package:

    rpm -qi glibc-2.1.3-21b

Use of the rpm command to verify and install specific package versions
is described in "Update Procedures for Supported Distributions"
below.

For more information on using rpm, refer to the rpm(1) man page.

__________________
INSTALLING LIBJPEG

An RPM install for libjpeg 6.2 is provided in the directory
patches/libjpeg-6.2.0. The following commands install this package:

    cd patches/jpeg-6.2.0
    rpm -U libjpeg-6.2.0
    cd /usr/lib
    ln -sf libjpeg.so.62.0.0 libjpeg.so.6


____________
FIXING GLIBC


-----------
Red Hat 6.2

============================
Testing a Red Hat 6.2 System

Your first step is to run borpretest to establish the glibc version and
whether the loader bug is present. Your next step depends on what
borpretest reports.

    -- If borpretest reports that glibc is version 2.1.2 or later, and
       that the loader bug is not present, the system is ready to run
       Kylix and Kylix applications -- no further steps are necessary.

    -- If borpretest reports that glibc is a version previous to 2.1.2,
       upgrade glibc 2.1.3 using the supplied RPMs. These RPMs also
       incorporate the patch for the loader bug. See "Applying the Red
       Hat 6.2 RPMs" below.

    -- If borpretest reports that glibc is version 2.1.2 or 2.1.3, but
       that the loader bug is present, replace the installed glibc
       package with the patch version on the supplied RPMs. See
       "Applying the Red Hat 6.2 RPMs" below.

    -- If borpretest reports that glibc is a version later than 2.1.3,
       but that the loader bug is present, you need to obtain a version
       of glibc that includes a fix for the loader bug. Possible sources
       include the maintainer for your current glibc package and online
       Linux resources such as rpmfind.net.

If you prefer to compile changes to glibc yourself, you can use the
source patches provided by Borland instead of installing the supplied
RPMs. Note that Borland provides source patches solely as a convenience 
for programmers and does not provide user support for them. These 
patches are specific to glibc 2.1.3, but should be adaptable to
later versions. See "Using the Red Hat 6.2 Source Patches" below.

=============================
Applying the Red Hat 6.2 RPMs

Patched versions of glibc-related RPMs are supplied in the directory
patches/glibc_redhat/6.2. (These RPMs were developed by Borland.) The
original subdirectory contains unpatched versions of these same RPMs.

Binary RPMs are provided for the following packages: glibc, glibc-devel,
glibc-profile, and nscd. All are version 2.1.3. A glibc source RPM is
also supplied.

Kylix requires only that glibc itself be upgraded and/or patched as
necessary. You need to install the other packages only on systems that
already have previous or unpatched versions of these same packages.


====================================
Using the Red Hat 6.2 Source Patches

Note that Borland provides source patches solely as a convenience
for programmers and does not provide user support for them. These
patches are specific to glibc 2.1.3, but should be adaptable to later
versions.

The directory patches/glibc_redhat/6.2/patches contains the source
patches required to fix the loader bug in glibc 2.1.3. The patch files
are simply short summaries of changes between the original and patched
versions of glibc, generated by the diff program. These changes can be
applied to the source for glibc 2.1.3 using the patch program. The
patches are version specific, but should be adaptable to later versions
of glibc. See the patch(1) and diff(1) man pages for more information.


-----------
Red Hat 7.0

Red Hat 7.0 comes with glibc 2.1.92, a version compatible with Kylix.
You still need to run borpretest to check for the loader bug. If the bug
is present, upgrade to glibc 2.2, which contains a fix. RPMs for Red
Hat's official upgrade are provided in the directory
patches/glibc_redhat/7.0.  They are also available from Red Hat.

Binary RPMs are provided for the following packages: glibc, glibc-devel,
glibc-profile, and nscd. A glibc source RPM is also supplied. Kylix
requires only the upgrade for glibc itself. You need to install the
other packages only on systems that already have previous versions of
these same packages.


------------
Mandrake 7.2

=============================
Testing a Mandrake 7.2 System

Your first step is to run borpretest to establish the glibc version and
whether the loader bug is present. Your next step depends on what
borpretest reports.

    -- If borpretest reports that glibc is version 2.1.2 or later, and
       that the loader bug is not present, the system is ready to run
       Kylix and Kylix applications -- no further steps are necessary.

    -- If borpretest reports that glibc is a version previous to 2.1.2,
       upgrade glibc to 2.1.3 using the supplied RPMs. These RPMs also
       incorporate the patch for the loader bug. See "Applying the
       Mandrake 7.2 RPMs" below.

    -- If borpretest reports that glibc is version 2.1.2 or 2.1.3, but
       that the loader bug is present, replace the installed glibc
       package with the patch version on the supplied RPMs. See
       "Applying the Mandrake 7.2 RPMs" below.

    -- If borpretest reports that glibc is a version later than 2.1.3,
       but that the loader bug is present, you need to obtain a version
       of glibc that includes a fix for the loader bug. Possible sources
       include the maintainer for your current glibc package and online
       Linux resources such as rpmfind.net.

If you prefer to compile changes to glibc yourself, you can use the
source patches provided by Borland instead of installing the supplied
RPMs. Note that Borland provides source patches solely as a convenience 
for programmers and does not provide user support for them. These 
patches are specific to glibc 2.1.3, but should be adaptable to
later versions. See "Using the Mandrake 7.2 Source Patches" below.

==============================
Applying the Mandrake 7.2 RPMs

Patched versions of glibc-related RPMs are supplied in the directory
patches/glibc_mandrake/7.2/stripped/i586. (These RPMs were developed by
Borland.) These RPMs, like those in the Mandrake distribution, are
optimized for Pentium-compatible processors and do not include debugging
information. RPMs compiled for 386 systems and with debugging
information retained are also provided, but should only be used if you
have a specific need for them.

Binary RPMs are provided for the following packages: glibc, glibc-devel,
glibc-profile, and nscd. All are version 2.1.3. A glibc source RPM is
also supplied.

Kylix requires only that glibc itself be upgraded or patched as
necessary. You need to install the other packages only on systems that
already have previous or unpatched versions of these same packages.


=====================================
Using the Mandrake 7.2 Source Patches

Note that Borland provides source patches solely as a convenience
for programmers and does not provide user support for them. These
patches are specific to glibc 2.1.3, but should be adaptable to later
versions. 

The directory patches/glibc_mandrake/7.2/patches contains the source
patches required to fix the loader bug in glibc 2.1.3. The patch files
are simply short summaries of changes between the original and patches
versions of glibc, generated by the diff program. These changes can be
applied to the source for glibc 2.1.3 using the patch program. The
patches are version specific, but should be adaptable to latter versions
of glibc. See the patch(1) and diff(1) man pages for more information.


--------
SuSE 7.0

NOTE: The following items apply ONLY if you are not using
      the SUSE distribution supplied with your Kylix CD.

=========================
Testing a SuSE 7.0 System

Your first step is to run borpretest to establish the libc (SuSE's name
for glibc) version and whether the loader bug is present. Your next step
depends on what borpretest reports.

    -- If borpretest reports that glibc is version 2.1.2 or later, and
       that the loader bug is not present, the system is ready to run
       Kylix and Kylix applications -- no further steps are necessary.

    -- If borpretest reports that glibc is a version previous to 2.1.2,
       upgrade glibc to 2.1.3 using the supplied RPMs. These RPMs also
       incorporate the patch for the loader bug. See "Applying the
       SuSE RPMs" below.

    -- If borpretest reports that glibc is version 2.1.2 or 2.1.3, but
       that the loader bug is present, replace the installed glibc
       package with the patch version on the supplied RPMs. See
       "Applying the SuSE 7.0 RPMs" below.

    -- If borpretest reports that glibc is a version later than 2.1.3,
       but that the loader bug is present, you need to obtain a version
       of glibc that includes a fix for the loader bug. Possible sources
       include the maintainer for your current glibc package and online
       Linux resources such as rpmfind.net.

==========================
Applying the SuSE 7.0 RPMs

The directory patches/glibc_suse/7.0 contains RPMs that can be applied
to patch SuSE 7.0 to contain libc 2.1.3 with a fix for the loader bug.
In addition to an updated glibc (called libc in SuSE), these RPMs
include upgrades for various software dependent on libc. (These RPMs
were developed by SuSE in cooperation with Borland.) All RPMs in this
directory should be applied.

______________________________
Caldera OpenLinux 3.1.1 Issues

=============================================
Obtaining the glibc 2.1 Compatibility Library

To install Kylix 3 on Caldera OpenLinux 3.1.1 you must first
install the glibc2.1 compatibility library "libdb.so.3"
which is not available on OpenLinux 3.1.1. As the root 
user:

1) Change to your /tmp directory and download the rpm file
   from ftp://ftp.caldera.com/.
   
    #wget ftp://ftp.caldera.com/pub/OpenLinux3.1/Workstation/RPMS/csm-compat-1.0-3.i386.rpm
   
   
2) Extract the libraries and directory structure from the RPM
   file by using the rpm2cpio and cpio utilities.
   
    #rpm2cpio /tmp/csm-compat-1.0-3.i386.rpm | cpio -idum "*/libdb*"
   
3) Move the library to your /lib directory.

    #mv /tmp/opt/csm/lib/compat/libdb-2.1.2.so /lib/libdb.so.3
   
4) Clean up extraneous files.

    #rm -rf /tmp/opt /tmp/csm-compat-1.0.3.i386.rpm
    
==========================
Setting Up the Font Server

1) Next, set up your system so that it starts the X font server during 
   the boot process. Add the following line to your /etc/rc.d/rc.local 
   file:

    sh -c 'PATH=$PATH:/usr/X11R6/bin; export Path; xfs -daemon'
  
   NOTE: This will not start the font server until you restart your
         system. To start xfs without rebooting, issue the following
         command:
       
         #/usr/X11R6/bin/xfs -daemon

2) Now, you must include the X font server in your path. For example,
   if you use bash as your login shell, you could add the following
   lines at the end of your #HOME/.bash_profile initialization file:
   
     if [ x$DISPLAY = x: ]
     then
       xset +fp unix/:7100
       xset fp rehash
      fi
      
   NOTE: Log out and log back in for these changes to take effect.
___________________________
Red Hat 7.3

For Red Hat 7.3 it is necccessary to obtain and install the
kernel headers for glibc, and to create a symbolic link for
X11R6. Perform the following:

   rpm -ivh glibc-kernheaders-2.4-7.12.i386.rpm
   rpm -ivh glibc-devel-2.2.5-30.i386.rpm
   cd /usr/X11R6/lib
   ln -sf libX11.so.6 libX11.so

-------------------------------------------------------
Copyright (c) 2002 Borland Software Corporation. 
 All rights reserved.
-------------------------------------------------------
