Java

Solaris Build Instructions

JavaTM 2 SDK, Standard Edition, v1.4.1 fcs

Build Overview

Contents

Introduction

This README file contains build instructions for the JavaTM 2 SDK, Standard Edition, v1.4.1 (J2SDK 1.4.1) Community Source Release. Building the source code for the Java 2 SDK requires a high level of technical expertise. Sun provides the source code primarily for technical experts who want to conduct research, port the platform to new operating systems and hardware, or add enhancements that require access to platform internals. If you are not a technical professional in one of these categories, this release is probably not for you.

Solaris System Setup

The official build platform for the 32-bit version of J2SDK 1.4.1 is Solaris 2.6.

The minimum recommended hardware for building the Solaris-SPARC version is an UltraSPARC with 128 megabytes of RAM. For building the Solaris-x86 version, a Pentium class processor or better and at least 128 megabytes of RAM are recommended. Approximately 1.4 GB of free disk space is needed for a 32-bit build.

64-BIT-ONLY: The official build platform for the 64-bit version of J2SDK 1.4.1 is a 64-bit installation of Solaris 7 on SPARC. You may run the command "isainfo -v" to verify that you have a 64-bit installation. An additional .7 GB of free disk space is needed for a 64-bit build.

The build uses the tools contained in /usr/ccs/bin and /usr/bin of a standard developer or full installation of the Solaris operating environment.

Minimum patch revisions are given in the tables below, though later patch revisions are expected to work also. Patches may be downloaded from the J2SE download page. You should ensure that the latest patch cluster for your version of the Solaris operating environment has been installed prior to installing these patches. The patch clusters are available for download on the SunSolve web site.

Patches for Building on Solaris 5.6
SPARC patchx86 patchReq/OptDescription
106125-12 106126-12 Required For patch database
106429-02 none Required /kernel/drv/mm patch
105181-29 105182-30 Required Kernel update
105210-44 105211-46 Required LibC patch
105568-24 105569-24 Required Threads patch
107733-09 107734-09 Required Linker patch
105591-12 104678-10 Required C++ library patch
105633-60 106248-45 Required Xserver patch
105669-10 105670-09 Required libDTSvc patch

Patches for Building on Solaris 5.7

SPARC patchx86 patchReq/OptDescription
107544-03 107545-03 Required Kernel update
106541-18 106542-18 Required Kernel update, requires reboot
106980-18 106981-19 Required Threads patch
106950-16 106951-15 Required Linker patch
106327-11 106328-11 Required C++ library patch
106300-12 none Required C++ library patch
108376-33 108377-29 Required OpenWindows patch
107656-07 107657-06 Required OpenWindows libXt patch
107702-09 107703-09 Required CDE 1.3 dtsession patch
108374-05 108375-05 Required CDE libDtWidget patch
107226-18 107227-18 Required CDE window manager patch

Solaris Build Tools and Libraries Setup

Once the Solaris OS is set up, you will need to install additional tools and libraries for building the J2SDK.

Forte Compilers

Forte Developer 6 Update 1 (containing version 5.2 of the C and C++ compilers) is required, with patches as defined below. You may download these compilers with a free 30-day "Try and Buy" license. A permanent license may be obtained from the Forte Developer Tools web site: an Update 2 license will work with the Update 1 products.

Set ALT_COMPILER_PATH to point to the location of the compiler binaries, and place this location in the PATH. These patches are available for download on the SunSolve web site.

Compiler Patches for Building on Solaris
SPARC patchx86 patchReq/OptDescription
109505-06 109502-03 Required For C 5.0, C++ 5.0
109513-05 109514-03 Required For Forte Development 6 C compiler
109508-03 109509-03 Required For Forte Development 6 update 1 C++ compiler
109510-03 109511-03 Required For Forte 6.1 Debugger
109516-02 109517-02 Required For Forte 6.1 Performance Analyzer
110480-01 110481-01 Required For Forte TeamWare

Bootstrap J2SDK

You will need access to a J2SDK 1.4.0 for Solaris installation. The 1.4.0 binaries can be downloaded from Sun's J2SDK 1.4.0 download site. Set ALT_BOOTDIR to point to the location of the bootstrap J2SDK installation. The installation instructions for the bootstrap J2SDK include a list of required and recommend patches that are needed at runtime. The subset of these patches that are required for building J2SDK are listed in the System Setup section above. However, all the runtime patches should be installed to ensure proper behavior of all J2SDK functionality after the build is completed.

GNU Make

GNU make version 3.78.1 or later is required to build the J2SDK. Information on GNU make, including download sites, is available on the GNU Make web site. For convenience, place the GNU make binary in the PATH.

Motif 1.2 and 2.1

Both Motif versions 1.2 and 2.1 headers and libraries are required for building the 32-bit J2SDK. Only Motif 1.2 headers and libraries are required for building the 64-bit J2SDK.

Create a Motif library and header area that contains header files and libraries for both Motif 1.2 and 2.1. Use the ALT_MOTIF_DIR environment variable to point to absolute path of the Motif directory. The top level of the directory must contain directories named motif12 and motif21, each of which must have subdirectories include and lib with contents as shown here:

         +- motif_area/  (set ALT_MOTIF_DIR to this level)
            +- motif12/             
            |  +- include/
            |  |  +- Xm/  (from /usr/include/Xm on Solaris 2.6)
            |  |     +- <many files>
            |  |    
            |  +- lib/    (from /usr/dt/lib/ on Solaris 2.6) 
            |     +- libXm.so (symbolic link to libXm.so.3)
            |     +- libXm.so.3
            |                          
            +- motif21/
               +- include/
               |  +- Xm/  (from /usr/include/Xm on Solaris 2.7)
               |     +- <many files>
               |    
               +- lib/    (from /usr/dt/lib/ on Solaris 2.7) 
                  +- libXm.so (symbolic link to libXm.so.4)
                  +- libXm.so.4
                  +- sparcv9/    (64-bit Motif library)
                     +- libXm.so (symbolic link to libXm.so.4)
                     +- libXm.so.4
    
In the example above, the name of the top-level directory is not significant; it is not required to be named motif_area.

JDBC-ODBC Bridge

The DataDirect Connect ODBC 2.11 driver is needed for building the JDBC-ODBC Bridge. A copy of the driver is on the Desktop 1.1.1 Solaris CD-ROM, which is part of older Solaris distributions.

Set up the following directory structure for the ODBC driver, and set the ALT_ODBCDIR environment variable to point to it.

       +- odbc/            (set ALT_ODBCDIR to this level)
          +- ISLIodbc/
             +- 2.11/       
                +- odbc files and directories (lib/, include/, etc.)
      
On SPARC systems you may use the DataDirect ODBC 3.7 driver in place of the 2.11 driver: use the directory structure above (including the 2.11 directory) if doing so.

An alternative to using a DataDirect driver is to build a dummy driver of your own. Create and then "cd" to the directory $ALT_ODBCDIR/ISLIodbc/2.11/lib, copy over the source file j2se/make/sun/jdbc/dummyodbc.c, and then compile as follows using the Forte C compiler:

        cc -G -h libodbc.so -o libodbc.so dummyodbc.c
        cc -G -h libodbcinst.so -o libodbcinst.so dummyodbc.c
      

zip

The build requires zip version 2.2 (November 3rd 1997). Set ALT_DEVTOOLS_PATH to point to the location of this binary.

cacerts

A certificates file named "cacerts" represents a system-wide keystore with CA certificates. In J2SDK and JRE binary bundles, the "cacerts" file contains root CA certificates from several public CAs (e.g., VeriSign, Thawte, and Baltimore).

The source bundles contain a cacerts file without CA root certificates. J2SDK builders will need to secure permission from each public CA and include the certficates into their own custom cacerts file. Failure to provide a populated cacerts file will result in verification of a certificat chain during runtime.

The ALT_CACERTS_FILE should be set to point to the location of the populated cacerts file.

GNU C Compiler (32-bit build only)

GNU gcc version 2.95.2 is required for building the Plug-in. The source code for gcc is available from http://www.gnu.org/software/gcc/, and some pre-built binaries are available from sunfreeware.com. Set ALT_GCC_COMPILER_PATH to point to the location of the gcc binary.

Mozilla Headers (32-bit build only)

Mozilla headers are required for building Java Plug-in. As a convenience, the source bundles include an archive of these files. Unpack the archive into a directory similar to the one shown below, and set the ALT_MOZILLA_PATH environment variable to the absolute path of the top-level directory.
      +- devtools/          (set ALT_MOZILLA_PATH to this level)
         +- share/
            +- plugin/
               +- mozilla_headers_ns600/
               +- mozilla_headers_ns610/
    
The name of the top-level directory is not significant; it is not required to be named devtools.

Solaris Build Environment Variables

This section describes environment variables that you can set to influence various aspects of the build. Some of these variables are mentioned specifically in the setup and build instructions above. Others you may set at your discretion.

Environment variables may be set in the shell environment or on the GNU make command line.

PATH
Set the PATH to contain:
  • The location of the GNU make binary
  • The location of the Forte compiler binaries (ALT_COMPILER_PATH)
  • /usr/bin

ALT_BOOTDIR
The location of the J2SDK 1.4.0 bootstrap installation.

ALT_OUTPUTDIR
An override for specifying the (absolute) path of where the build output is to go.

ALT_UNIXCOMMAND_PATH
An override for specifying where the Unix command set are located. You usually do not need to set this variable: the default location is /usr/bin.

ALT_UNIXCCS_PATH
An override for specifying where the Unix CCS command set are located. You usually do not need to set this variable: the default location is /usr/ccs/bin

ALT_COMPILER_PATH
The location of the Forte compilers and tools. See Forte Compilers for details.

ALT_DEVTOOLS_PATH
The location of the zip binary. See zip for details.

ALT_CACERTS_FILE
The location of the cacerts file. See cacerts file for details.

ALT_MOTIF_DIR
The location of the Motif 1.2 (for 32-bit build only) and Motif 2.1 (for both 32-bit and 64-bit builds) headers and libraries. See Motif 1.2 and 2.1 for details.

ALT_MOZILLA_PATH
The location of the the Mozilla headers. See Mozilla Headers for details.

ALT_ODBCDIR
The location of the ODBC driver. See JDBC-ODBC Bridge for details.

ALT_GCC_COMPILER_PATH (32-bit build only)
The location of the GNU C compiler and tools, for building the Plug-in. See GNU C Compiler for details.

ARCH_DATA_MODEL
The ARCH_DATA_MODEL variable is used to specify whether the build is to generate 32-bit or 64-bit binaries. The Solaris build supports either 32-bit or, on SPARC platforms only, 64-bit builds. Leave ARCH_DATA_MODEL unset or set to 32 for generating 32-bit binaries, or set to 64 for generating 64-bit binaries.

MILESTONE
The milestone name for the build (e.g. "beta").

BUILD_NUMBER
The build number for the build (e.g. "b27").

DEV_ONLY
This is set to indicate that no attempt should be made to build certain components that are not required for development builds.
The following environment variables should not be set:

Solaris Build

  1. cd into the control/make directory.
  2. Start the build with the command:
        gnumake all DEV_ONLY=true [ARCH_DATA_MODEL=32 or 64] [ALT_OUTPUTDIR=directory-name-for-output] [MILESTONE=milestone_name] [BUILD_NUMBER=build_number] [other "ALT_" overrides]
64-BIT-ONLY: Before 64-bit binaries can be used, they must be merged with the binaries from a separate 32-bit build. The merged binaries may then be used in either 32-bit or 64-bit mode, with the selection occurring at runtime.

Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California 94303, U.S.A.
All rights reserved.

Sun