Build Process

In this section the following sections describe the requirements and actions that you need to build the office suite:

Overview of the Build Process

You can perform a full build, or you can build a project using a prebuild version. You can build in the following ways:

Overview of Performing a Full Build

To perform a full build, you need to follow these steps:

  1. Download the source code from the Get Source page. For more information, see Downloading the Full Source.
  2. On Linux and Solaris, run the configure script to generate the build environment.
    On Win32, edit the build environment variables batch file, and then run it.
  3. On Linux and Solaris, if the build tools necessary to build are not available, create these build tools.


    Note: At this point, this step is not necessary. You download the binary files for Linux, Solaris, and Win32 from the CVS Tree.
     

  4. Build using the dmake tool. For detailed build instructions, see Building a Full Build. You can view an illustration of the full build process.
Overview of Building an Individual Project

You can use a prebuild version to build an individual project. A project builds a particular component of the office suite. For example, the Writer project builds the Writer application. To build an individual project, you must follow these steps:

  1. Download the appropriate milestone build tarball from the Download page. For more information, see Downloading the Prebuild.
  2. Check out the modules for the project that you want to build from the OpenOffice.org CVS tree. If your project uses the resources module, res, check out this module also.
  3. On Linux and Solaris, configure the build environment. On Win32 systems, set the build environment variables.
  4. Unpack the milestone build tarball.


    Build each module with the prebuild version of the office suite, using the dmake tool. For detailed build instructions, see Building Individual Projects with a Prebuild. You can view an illustration of the full build process.

Build Requirements

StarOffice has been built successfully on the following operating systems:

Before you begin building, you must ensure that your system satisfies the recommended software and hardware requirements for the type of system you are working on.

Linux

The following table describes the build requirements for the Linux operating system.
 

Build Requirements for Linux
Software Requirements  Hardware Requirements
  • glibc 2.1.x or higher
  • gcc 2.95.2
  • JDK 1.2.2
  • Perl 5
  • csh
A PC with the following specifications: 
  • Intel Pentium II
  • 128 MB RAM
  • 3 GB free disk space

Solaris

The following table describes the build requirements for the Solaris operating system.
 

Build Requirements for Solaris
Software Requirements Hardware Requirements 
  • Solaris 2.6 or 2.7 
  • Solaris Workshop 5 Compiler and the following patch: 106327-06
    Note: The intention is to replace the Solaris Workshop 5 Compiler with gcc 2.95.2.
  • JDK 1.2.2
  • Perl 5
  • csh
A SPARC Ultra 1 with the following specifications
  • 128 MB RAM
  • 3 GB free disk space

Win32

The following table describes the build requirements for Win32 operating systems.
 

Build Requirements for Win32
Software Requirements Hardware Requirements 
A PC with the following specifications: 
  • Intel Pentium II
  • 128 MB RAM
  • 2 GB free disk space

Note: Before you use 4NT, you must ensure that the initialization file 4nt.ini is present in the 4NT application directory. The following code sample shows the content of the 4nt.ini file.

There are also external download requirements for building on Win32, follows:

  1.The header files adoctint.h and SqlUcode.h from the Microsoft Platforms SDK, April 2000 Edition.
     Download the the Platform SDK Setup, psdk-86.exe, from the Custom Installation section. Then run it in your Win32 environment. This starts an interactive download program. Follow the instructions on the screen. At the Custom Installation screen, select Build Environment/Data Acces Services/OLE DB and the Build Environment/Data Acces Services/ODBC from the Custom Installation tree. This downloads a number of files to your Win32 environment. You only need to copy the two header files to the external/download directory under the source tree top-level directory.

  2.Go to the PGP site, and download the following files:
         pgp553i-win95nt-src.zip
         pgp602i-win-src.zip
         pgp651i-win-src.zip
     Alternatively, you can download these files from a mirror site.
     Then unzip the three source zip files to the external/download directory under the source tree top-level directory.
 
 
[4NT] 

CommandSep = ^ 

EscapeChar = Ctrl-X 

ParameterChar = & 

LocalAliases = Yes
 

Generating the Build Environment for Linux and Solaris

You use the configure script to generate the build environment. The configure script does the following:

  1. Checks that all software, hardware, and system requirements for the build are satisfied.
  2. Sets the required build environment variables.
  3. Creates a configuration file that you then run the source command on to perform the build.
To run the configure script, type the following command in the top directory of the source tree that you download from the Get Source page:
 
% ./configure
 

Note: This file is currently in the config_office directory.

There are a number of options that you can use with the configure script. To display these options, type the following command:
 
% ./configure --help
 

For more information on the options that you can use with the configure script, see Options Available with configure Script.

 

Build Instructions

For each operating system, you can build in one of the following ways:

This section provides you with the instructions for building, in both of these ways, for the following operating systems: Building a Full Build of the Office Suite

The following sections describe how to build the entire source for each operating system.

Building a Full Build on Linux Systems

To build the entire source tree on Linux, follow these steps:

    Download the source full source code. For more information, see Downloading the Full Source.
  1. Ensure that you are in the top-level directory.
  2. Change the current shell on the system to the csh shell.
  3. Use the source command to run the environment variable file for Linux.
  4. Run the dmake tool to start the build.
    The following example shows how to build the source tree on Linux:

     
    % csh

    % source LinuxIntelEnv.Set

    % dmake
     

Time Requirement

The following table shows the time required to build on a system with a particular specification. You can use these details to estimate the time required to build on your system.
 
Architecture Intel
Processor Pentium II
Processor speed 600 MHz
RAM 128 MB
Hard disk size 4 GB IDE
Time

Building a Full Build on Solaris Systems

To build the entire source tree on Solaris, follow these steps:

  1. Download the full source code. For more information, see Downloading the Full Source.
  2. Ensure that you are in the top-level directory.
  3. Change the current shell on the system to the csh shell:
  4. Use the source command to run the environment variable file for Solaris.
  5. Run the dmake tool to start the build.
    The following example shows how to build the source tree on Solaris:

     
    % csh

    % source SolarisSparcEnv.Set

    % dmake
     

Time Requirement

The following table shows the time required to build on a system with a particular specification. You can use these details to estimate the time required to build on your system.
 
Architecture SPARC
Model Ultra 1
RAM 128 MB
Hard disk size 4 GB IDE
Time

Building a Full Build of on Win32 Systems

Ideally, in keeping with the principles of open source, you would use an open source shell to build on a computer running a Win32 operating system. However, this is not possible at present. You must use a non-open source shell to build on a computer running a Win32 operating system. This shell is a 4NT command shell.

In the future, it may be possible to build on a Win32 system using the Cygnus bash shell. However, this requires syntax changes to the makefiles that the build uses. This is a future project for OpenOffice.org.

The autoconf tool does not run under the 4NT command shell. Because of this, the 4NT command shell does not run the configure script, which generates the build environment on Linux and Solaris. To build on Win32, you do not need to generate the build environment or create the build tools, as the environment variable file, winenv.bat, and the build tools are supplied when you download the source for Win32.

Alternatively, run the configure script from a Cygnus bash shell on a Win32 system. On the Cygnus bash command line type bash configure to run the configure script. This creates a winenv.bat file in the top-level directory. Read the README file in the config_office directory for more information.

To build the entire source tree on a Win32 system, follow these steps:

  1. Download the full source code. For more information, see Downloading the Full Source.
  2. Edit the local settings section in the environment variable file winenv.bat. Instructions for editing winenv.bat are included in the file.
  3. Open a 4NT command shell.
  4. Change the current directory to the top-level directory.
  5. Set the build environment variables. To do this, run the batch file that you updated. Then run the dmake tool to build. The following example shows the commands for setting build environment variables and running dmake:
    C:\OpenOffice> winenv.bat

    C:\OpenOffice> dmake
     

Time Requirement

The following table shows the time required to build on a system with a particular specification. You can use these details to estimate the time required to build on your system.
 
Architecture Intel
Processor Pentium III
Processor speed 500 MHz
RAM 256 MB
Time 18 hours

Building Individual Projects with a Prebuild

A project builds particular components of the office suite. For example, the Writer project builds the Writer application.

The source contains approximately 75 modules. There are many dependencies between these CVS modules. This means that the modules must build in a particular order.

For more information on modules and on the sequence that they build in, and on the dependencies, see Modules.

Before you build a project, you must check out the project that you want to build from the OpenOffice.org CVS tree. when you check out a project, you check out the modules that the project contains. If your project uses the resources module, res, you must check out this module also.

To build a project, you build each of its modules individually. When you build a module, you use a dmake tool. The dmake tool uses the makefile to iterate through all directories of the module that contain source files, and executes dmake in each of them. The last or second to last directory is usually module-name/util, which is responsible for linking one or more shared libraries.

The following sections describe how to build individual projects with a prebuild version.

Building Projects on Linux Systems

To build an individual project on Linux with a prebuild version, follow these steps:

  1. Download the solver Linux milestone build tarball from the Get Source page. Then check out the project that you want to build from CVS. For more information, see Downloading the Prebuild.
  2. Configure the build environment. For more information, see Generating the Build Environment for Linux and Solaris.
  3. Change the shell on the system to the csh shell.
  4. Ensure that the current directory is the top-level directory.
  5. Run the tar command on the tarball, using the options xzf, as follows:
    % tar xzf solverxxx_linuxintel.tgz

     
  6. To build a particular module, enter the following commands:
    % cd module-name

    % dmake
     

    For example, to build the Writer (sw) module, enter the following commands:
     
    % csh

    % cd $SOLARVERSION

    % tar xzf solverxxx_linuxintel.tgz

    % cd sw

    % dmake
     

  7. To build other modules in the project, repeat step 6.
Building Projects on Solaris Systems

To build an individual project on Solaris with a prebuild version, follow these steps:

  1. Download the solver Solaris milestone build tarball from the Get Source page. Then check out the project that you want to build from CVS. For more information, see Downloading the Prebuild .
  2. Configure the build environment. For more information, see Generating the Build Environment for Linux and Solaris.
  3. Change the shell on the system to the csh shell.
  4. Ensure that the current directory is the top-level directory.
  5. Run the tar command on the tarball, using the xzf options, as follows:
    % tar xzf solverxxx_solarissparc.tgz

     
  6. To build a particular module, enter the following commands:
    % cd module-name

    % dmake
     

    For example, to build the Writer (sw) module, enter the following commands:
     
    % csh

    % cd $SOLARVERSION

    % tar xzf solverxxx_linuxintel.tgz

    % cd sw

    % dmake
     

  7. To build other modules in the project, repeat step 6.
Building Projects on Win32 Systems

To build an individual project on Win32 with a prebuild version, follow these steps:

  1. Download the solver Win32 milestone build tarball from the Get Source page. Save the tarball in an appropriate location in your local environment, for example C:\OpenOffice. Then check out the project that you want to build from the CVS tree. For more information, see Downloading the Prebuild.
  2. Edit the local settings section in the environment variable file winenv.bat. Instructions for editing winenv.bat are included in the file.
  3. Open a 4NT command shell.
  4. Change the current directory to the top-level directory, for example C:\OpenOffice.
  5. Set the build environment variables. To do this, run the batch file that you updated.
  6. Unpack the tarball. To do this, run the following command:
    C:\OpenOffice> tar xzmf solverxxx_win32intel.tgz

     
  7. To build a particular module, enter the following commands:
    C:\OpenOffice> cd module-name

    C:\OpenOffice\module-name> dmake
     

    For example, to build the Writer (sw) module, enter the following commands:
     
    C:\> cd openoffice

    C:\OpenOffice> winenv.bat

    C:\OpenOffice> tar xzmf solverxxx_win32intel.tgz

    C:\OpenOffice> cd sw

    C:\OpenOffice\sw> dmake
     

  8. To build other modules in the project, repeat step 7.
Building a Project with Debug Information

To rebuild a complete project with debug information, remove all object files by removing the /$INPATH directory. Then run the following command:
 
% dmake debug=true

 

To build a single source subdirectory, use the dmake command. see dmake for further information.
 

Instructions to Build an Installation Set

When you have completed the build, you need to do the following to install and set up the office suite:

  1. From the top-level directory, run the dmake install command.
  2. Change directory to the location of the installation set. Then change to the normal directory under the delivered input directory.
  3. Run the setup binary.
    The following is a sample installation procedure for Linux:

     
    % cd $SRC_ROOT

    % dmake install

    % cd instsetoo

    % cd $INPATH/normal

    % ./SETUP