(no commit message)
[openafs-wiki.git] / HowToBuildOpenAFSFromSource.mdwn
index ab0199a..c431a5b 100644 (file)
@@ -3,10 +3,13 @@ The information is specific to unix-like systems. See the
 README-WINDOWS file in the root of the OpenAFS source code tree for
 instructions and software needed to build OpenAFS on Microsoft Windows.
 
-Unless otherwise noted, the information on this page is for version 1.6.x
-(available as pre-release 3 at the time of this writing).
+Unless otherwise noted, the information on this page is for building
+the OpenAFS master branch or the OpenAFS stable releases (currently
+the 1.6.x series).
 
-## The Short Version
+[[!toc levels=3]]
+
+# The Short Version #
 
 For the impatient, this section describes how to get a code tree and
 build it, assuming you have a development environment already setup.
@@ -16,13 +19,13 @@ OpenAFS binaries:
 
     $ wget http://openafs.org/dl/openafs/<version>/openafs-<version>-src.tar.bz2
     $ wget http://openafs.org/dl/openafs/<version>/openafs-<version>-doc.tar.bz2
-    $ tar xjf openafs-<version>-src.tar.bz2 
-    $ tar xjf openafs-<version>-doc.tar.bz2 
+    $ tar xjf openafs-<version>-src.tar.bz2
+    $ tar xjf openafs-<version>-doc.tar.bz2
     $ cd openafs-<version>
     $ ./configure
     $ make
 
-See <http://openafs.org/dl/openafs> for available versions.
+See [openafs downloads](http://openafs.org/dl/openafs) for available versions.
 
 The following shows how to do a git checkout and build the OpenAFS binaries,
 
@@ -38,13 +41,17 @@ traditional Transarc/IBM AFS installation paths, run configure with the
 --enable-transarc-paths option. (Read on for more information about configure
 options.)
 
-    $ ./configure --enable-transarc-paths $ make
+    $ ./configure --enable-transarc-paths --enable-checking --enable-debug
     $ make
-    $ make dest 
+    $ make dest
+
+This will build the binaries and place them in the &lt;platform&gt;/dest
+directories, that is, the Transarc-style binary distribution directory layout.
 
-See the end of this page for instructions on how to build RPM packages.
+See [[how to build OpenAFS RPM packages|HowToBuildOpenAFSRpmPackages]] for
+instructions on how to build RPM packages.
 
-## Build OpenAFS 
+# Building OpenAFS #
 
 Building and packaging OpenAFS is not difficult on current unix-like
 systems. A small number of fairly common libraries and tools are required. The
@@ -83,9 +90,9 @@ just described above.  Packaging scripts in the source tree are used to build
 rpms from a source code tree tar file. You'll need to create two tar files, one
 of the source and one of the documentation. A script is run to build a source
 rpm, which can be used to build the various rpm packages.  Details are given
-on the page [[How to build OpenAFS RPM packages|AFSLore/HowToBuildOpenAFSRpmPackages]].
+on the page [[How to build OpenAFS RPM packages|HowToBuildOpenAFSRpmPackages]].
 
-## Prerequisites
+## Prerequisites ##
 
 The following tools are needed to build OpenAFS from source from a tar file:
 
@@ -98,13 +105,13 @@ The following tools are needed to build OpenAFS from source from a tar file:
 - install
 - perl 5.6 or better (only to build the documention)
 
-In addition to the above, the following tools are needed to build OpenAFS 
+In addition to the above, the following tools are needed to build OpenAFS
 from a git checkout:
 
 - git
-- libtool
 - autoconf 2.60 or better
 - automake
+- libtool
 
 The compiler used must be capable of building kernel modules for the target
 platform.
@@ -124,6 +131,7 @@ The following development libraries are needed:
 
 - libc
 - kerberos 5
+- perl
 - ncurses (optional, needed to build scout/afsmonitor)
 - pam (optional)
 - kernel headers
@@ -132,39 +140,86 @@ The ncurses libraries are needed to build the ncurses based admin tools
 scout and afsmonitor. The kerberos 5 libraries are needed to build kerberos 5
 support, which is *strongly* recommended.
 
-### Linux Debian Packages
+### Linux Debian Packages ###
 
 On a Debian 6, the required packages can be install with the following commands apt-get commands,
 
-    $ apt-get install git libtool autoconf automake make gcc flex bison
-    $ apt-get install libc6-dev libkrb5-dev libncurses5-dev linux-headers-$(uname -r)
+    $ apt-get install git autoconf automake libtool make gcc flex bison
+    $ apt-get install libc6-dev libkrb5-dev libperl-dev libncurses5-dev linux-headers-$(uname -r)
 
-### Linux RPM Packages
+### Linux RPM Packages ###
 
 On a RedHat-based linux distributions, all of the required packages can be
 installed with the following yum commands,
 
-     $ yum install git-core gcc autoconf automake make flex bison rpm-build
-     $ yum install glibc-devel krb5-devel ncurses-devel pam-devel kernel-devel-$(uname -r)
+     $ yum install git-core gcc autoconf automake libtool make flex bison
+     $ yum install glibc-devel krb5-devel perl-devel ncurses-devel pam-devel kernel-devel-$(uname -r)
+
+The following additional packages are needed to [[build RPM packages|HowToBuildOpenAfsRpmPackages]].
+
+     $ yum install wget perl-devel perl-ExtUtils-Embed rpm-build
+
+### Solaris Packages ###
+
+[Oracle Solaris Studio][1] can be used to build OpenAFS binaries on the
+solaris platform. Solaris Studio is freely available for the solaris and linux
+platforms with a no-cost Oracle Technology Network (OTN) account.  For recent
+versions of Solaris, use the `pkg' command to install Solaris Studio.  Follow the
+package installer instructions on the Solaris Studio download page for
+your platform type and version. This requires you to create and download a key
+and certificate using your OTN account.
+
+[1]: http://www.oracle.com/technetwork/server-storage/solarisstudio
+
+All the tools and libs needed to build OpenAFS are available with the `pkg`
+command on Solaris 11.  Earlier versions of Solaris require third party tools
+and libs.
+
+#### Solaris 10 and earlier ####
+
+The [OpenCSW][2] project provides software packages for solaris 10 and earlier
+which can be easily installed to build OpenAFS.  Follow the [OpenCSW getting started][3]
+instructions to setup the `pkgutil` package manager tool.
+
+[2]: http://www.opencsw.org
+[3]: http://www.opencsw.org/manual/for-administrators/getting-started.html
+
+Update your path to include `/opt/csw/bin`.
+
+With `pkgutil` installed, install the necessary packages;
+
+     $ sudo pkgutil -y --install git
+     $ sudo pkgutil -y --install gmake flex bison gsed automake autoconf libtool
+     $ sudo pkgutil -y --install libkrb5_dev libncurses_dev
+
+Note: Is a perl devel lib needed on solaris?
+
+#### Solaris 11 ####
+
+Install [SolarisStudio][1] using the `pkg' command. You will need an SSL
+certificate and key, which can be created using your OTN account. See the instructions
+on the Solaris Studio download page.
+
+(Alternately, install Solaris Studio from the tar file installer, and then find
+and install any missing dependencies.)
 
-### Solaris Packages
+Use the `pkg` tool to install the other necessary packages:
 
-For Solaris packages, start by installing pkg-get, if you have not already.
+      $ sudo pkg install git
+      $ sudo pkg install text/locale
+      $ sudo pkg install gnu-coreutils gnu-binutils gnu-sed
+      $ sudo pkg install make flex bison
+      $ sudo pkg install automake autoconf libtool
 
-     $ wget http://www.opencsw.org/pkg-get
-     $ pkgadd -d /path/to/pkg-get
-     $ wget --output-document=/tmp/gpg.key http://www.opencsw.org/get-it/mirrors/
-     $ gpg --import /tmp/gpg.key
+If you have dependency issues with automake, try automake-110
 
-Check to make sure pkg-get is installed properly by doing a pkg-get compare.
-It should output a list of installed packages compared to up-to-date remote packages.
+If you have installed Solaris Studio via the tar file, you may need to install
+the `system/header' package manually:
 
-With pkg-get installed, go ahead and begin installing the necessary packages
+      $ sudo pkg install system/header
 
-     $ pkg-get install gcc flex bison automake autoconf gmake
-     $ pkg-get install krb5_kdc ncurses
 
-## Getting the Source Code
+## Getting the Source Code ##
 
 See [[GitDevelopers]] for details on how to use git to fetch OpenAFS source
 code and to submit source code changes to the OpenAFS project. This is the
@@ -272,7 +327,7 @@ utility (part of the kerberos 5 development package).
     --with-krb5-conf=/usr/bin/krb5-config
 
 
-### Debugging Options
+### Debugging Options ###
 
 To enable a debugging build, specify the --enable-debug option on the
 ./configure command line.  This builds with debugging compiler options and
@@ -286,12 +341,12 @@ disables stripping of binaries.
                                     with gcc and treat compiler warnings
                                     as errors
 
-### Feature Options
+### Feature Options ###
 
 There are many configure options for OpenAFS. See the ./configure --help
 for a complete list and README for more details.  Common options are:
 
-    --enable-bos-restricted-mode  enable bosserver restricted mode 
+    --enable-bos-restricted-mode  enable bosserver restricted mode
                                      which disables certain bosserver functionality
     --enable-bos-new-config       enable bosserver pickup of BosConfig.new on restarts
     --enable-namei-fileserver     force compilation of namei fileserver
@@ -301,10 +356,10 @@ for a complete list and README for more details.  Common options are:
                                    WARNING: Once you make use of this option
                                    by nesting one group inside another,
                                    the resulting PTS database cannot be correctly
-                                   and safely used by a ptserver built 
-                                   without this option. 
+                                   and safely used by a ptserver built
+                                   without this option.
 
-### Configure changes in 1.6.0
+### Configure changes in 1.6.0 ###
 
 If you have been building the 1.5.0 freatures branch, note the following configure
 options have been removed in 1.6.0. Each feature is now always on, except as noted:
@@ -332,11 +387,11 @@ default target will build all.
     $ make
 
 
-## Install
+## Install ##
 
 You can install the OpenAFS binaries outside a package system
 by copying the binaries. If you built OpenAFS in the default
-mode (that is without --enable-transarc-paths), run the install
+mode (that is, without --enable-transarc-paths), run the install
 target as root to install the binaries.
 
     $ sudo make install
@@ -371,7 +426,7 @@ these file into your local filesystem:
 See [Storing AFS Binaries in AFS](http://docs.openafs.org/QuickStartUnix/ch02s29.html) for instructions on
 how to store the workstation binaries in AFS.
 
-## Post build
+## Post build ##
 
 Some make targets of interest