From b4411d37b43b0a934028af39fe8594bbd82e1733 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 15 Jul 2010 16:29:27 -0700 Subject: [PATCH] Flesh out the configuration documentation Remove obsolete configure options and document all remaining options other than some provided by Autoconf and some that are currently not very interesting. Document that, on modern Linux systems, configure can find the kernel build system and headers by itself and doesn't need the flag. Include some more information in README about changing the default installation paths, and mention that the da* versions of the file server and volserver also aren't stripped. Remove the generic GNU installation instructions, which aren't useful for OpenAFS. Change-Id: I56d0003ff0173749e9a5e04f1d0ed4d004787dfd Reviewed-on: http://gerrit.openafs.org/2438 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- INSTALL | 160 ------------------------------------- README | 274 ++++++++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 191 insertions(+), 243 deletions(-) delete mode 100644 INSTALL diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 3b69cc5..0000000 --- a/INSTALL +++ /dev/null @@ -1,160 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Resulting binaries will be in a directory named for the AFS system - name for which you're building, e.g. i386_linux24 or sun4x_57. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. - diff --git a/README b/README index a8910aa..b3073e7 100644 --- a/README +++ b/README @@ -79,6 +79,7 @@ A Configuring 2. Using configure in the top level directory, configure for your AFS system type, providing the necessary flags: + % ./configure --with-afs-sysname=sun4x_58 --enable-transarc-paths If you do not have the "configure" script, or if you modify the @@ -93,10 +94,11 @@ A Configuring ./configure command line. All binaries, except for the 'fileserver' and 'volserver' - executables, are stripped of their symbol table information by - default. To enable a debugging build, specify the --enable-debug - option on the ./configure command line. This builds with debugging - compiler options and disables stripping of binaries. + executables and their 'da' variants, are stripped of their symbol + table information by default. To enable a debugging build, specify + the --enable-debug option on the ./configure command line. This + builds with debugging compiler options and disables stripping of + binaries. You can also use different combinations of --enable-debug and --enable (or --disable)-strip-binaries for finer control. One can, @@ -105,8 +107,9 @@ A Configuring to not be stripped. Note that these combinations are not necessarily useful. - The two binaries noted above, 'fileserver' and 'volserver' will - never be stripped, regardless of any options given to configure. + The binaries noted above, 'fileserver' and 'volserver' and their + 'da' variants, will never be stripped, regardless of any options + given to configure. There are two modes for directory path handling: "Transarc mode" and "default mode": @@ -115,7 +118,7 @@ A Configuring by putting client configuaration files in /usr/vice/etc, and server files in /usr/afs under the traditional directory layout. - In default mode, files are located in standardized locations, usually - under $(prefix). + under $(prefix), which defaults to /usr/local. - Client programs, libraries, and related files always go in standard directories under $(prefix). This rule covers things that would go into $(bindir), $(includedir), $(libdir), $(mandir), and $(sbindir). @@ -132,12 +135,11 @@ A Configuring afsbosconfig $(afslocaldir)/BosConfig $(afsconfdir)/BosConfig afsbosserver $(afsbindir)/bosserver $(sbindir)/bosserver - The Demand Attach Fileserver (DAFS), is built by providing the - --enable-demand-attach-fs argument to configure. Note that the - bosserver must be built with DAFS in order to be able to create the - dafs instance, which will be used in place of the fs instance. In - addition, the fileserver, volserver, salvager, salvage, and - salvageserver binaries must be built for DAFS. + In default mode, you can change all of the variables named above that + do not start with "afs" by passing the flags with the same name to + configure. For example, if you want to install the server binaries in + /usr/local/lib/openafs instead of /usr/local/libexec/openafs, pass the + --libexecdir=/usr/local/lib flag to configure. For additional options, see section H below. @@ -156,10 +158,12 @@ B Building under the directory named for the sys_name you built for, e.g. sun4x_57/dest or i386_linux22/dest - 2. As appropriate you can clean up or, if you're using Linux, build for + 3. As appropriate you can clean up or, if you're using Linux, build for another kernel version. + To clean up: - % make clean + + % make clean C Problems @@ -172,25 +176,33 @@ C Problems D Linux Notes - For Linux systems you need also provide the path in which your - kernel headers for your configured kernel can be found. This should - be the path of the directory containing a child directory named - "include". So if your version file was - /usr/src/linux/include/linux/version.h you would invoke: + With current Linux versions, the /lib/modules/`uname -r`/source symlink + will be used to locate the kernel headers, but you will need to have + the headers and build system for your kernel installed in order to + build the kernel module. These are usually found in a separate package + from the kernel, often called something like linux-headers-. + + For older Linux systems, you may also need to provide the path in which + your kernel headers for your configured kernel can be found. This + should be the path of the directory containing a child directory named + "include". So if your version file were + /usr/src/linux/include/linux/version.h you would run: + % ./configure --with-afs-sysname=i386_linux24 \ --with-linux-kernel-headers=/usr/src/linux - Currently you can build for only one Linux kernel at a time, - and the version is extracted from the kernel headers in the root - you specify. + Currently you can build for only one Linux kernel at a time, and the + version is extracted from the kernel headers in the root you specify. + + To build for another Linux kernel version, determine the sysname for + the system type as defined in step A1 for the other kernel version and + then run: - To build for another Linux kernel version: - the system type defined in step A1. - % ./configure --with-afs-sysname=i386_linux24 \ + % ./configure --with-afs-sysname= \ --with-linux-kernel-headers=/usr/src/linux-2.2.19-i686 % make - Your dest tree will now include an additional kernel module for your + Your build tree will now include an additional kernel module for your additional kernel headers. Be aware that if the kernel version string which UTS_RELEASE is defined to in include/linux/version.h matches the last kernel you built for, the previous kernel module will be @@ -249,8 +261,10 @@ H AIX notes Make sure that your default build environment is 32bit, ie. the OBJECT_MODE environment variable is either unset or set to "32". - Verify this before doing configure and make. For example, assuming ksh/bash: - export OBJECT_MODE=32 + Verify this before doing configure and make. For example, assuming + ksh/bash: + + % export OBJECT_MODE=32 To build aklog (in order to be able to get tokens from your Kerberos v5 ticket), you will need Kerberos libraries. On AIX 6.1, the IBM @@ -262,56 +276,58 @@ I Other configure options AFS has a ton of other optional features that must be enabled using configure options. Here is a summary: + --enable-bigendian + --enable-littleendian + These configure options are normally not required and should not be + given. They're only needed if the OpenAFS build system cannot + determine the endianness of your system, in which case configure + will abort and say to use one of these options. + --enable-bitmap-later Speeds the startup of the fileserver by deferring reading volume bitmaps until necessary. Demand attach is a better solution to the same problem. - --enable-bos-new-config - A bosserver built with this option will look for BosConfig.new when - it restarts and, if present, replace BosConfig with that file - before reading its configuration. - - --enable-bos-restricted-mode - Enables support for restricted mode in the bosserver. This mode - can be enabled or disabled via a command-line switch and a signal - and can be enabled (but not disabled) remotely. When enabled, - bosserver will not permit any operations that change the local file - system (install, uninstall, prune), run commands on the server - (exec, create, delete), or view files (getlog). - - --enable-demand-attach-fs - Enable Demand Attach file servers. Demand Attach is an extensive - re-engineering of the file server that avoids the long startup and - shutdown delays of the traditional file server by enabling - persistance of file server state to disk. It is still very new, - but is expected to become the default in a future version of - OpenAFS. - - --enable-disconnected - Enable disconnected support in the cache manager (EXPERIMENTAL). - - --enable-fast-restart - When restarting the fileserver, don't salvage volumes. Instead, - assume all volumes are okay and only take them off-line if that - assumption is incorrect. Using this option safely requires - scanning the fileserver log for error messages when volumes are - taken off-line and salvaging them manually. Not recommended; use - demand attach instead. - - --enable-icmp-pmtu-discovery - Enable path MTU discovery in the Rx libraries by decoding ICMP - unreachable packets. + --enable-checking + Enable compiler warnings when building with GCC and turn compiler + warnings into errors so that new warnings will cause compilation + failures. If you are developing patches to contribute to OpenAFS, + please build OpenAFS with this flag enabled. Warning-free code is + a requirement for all new submissions to OpenAFS. + + --enable-debug + --enable-debug-kernel + --enable-debug-lwp + --enable-debug-pam + Compile the userspace code (for --enable-debug) or the code named + by the option with debugging information. If --enable-debug is + given, also do not strip binaries when installing them. + + --enable-linux-syscall-probing + OpenAFS now uses keyrings to manage PAGs by default on Linux, which + does not require hooking into the system call table. On older + versions of Linux without keyring support, OpenAFS uses groups to + manage PAGs and probes for the system call table to hook into it to + preserve that group information. Normally, which method to use is + detected automatically, and if keyring support is present, support + for system call table probing is not compiled in. Use this + configure option to force inclusion of the system call table + probing code even if the kernel appears to support keyrings. --enable-namei-fileserver - Forces the namei fileserver on platforms (like Solaris) where the - inode fileserver is the default. + Forces the namei fileserver on platforms (like Solaris 8 and 9) + where the inode fileserver is the default. --enable-pthreaded-ubik Enable the threaded version of Ubik and install the threaded versions of Ubik servers. See README.PTHREADED_UBIK for more information. (EXPERIMENTAL) + --enable-redhat-buildsys + Enable compilation of the kernel module for the Red Hat build + system kernel. Use this configure flag when building kernel + modules for Red Hat Linux systems. + --enable-reduced-depends Try to minimize the shared library dependencies encoded in the binaries. This omits from the link line all the libraries included @@ -329,29 +345,45 @@ I Other configure options Enables support of nested groups in the ptserver. 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. + ptserver built without this option. If some of your ptservers were + built with this option and some without this option, you will + probably corrupt your PTS database. --enable-tivoli-tsm Build with the Tivoli TSM API libraries for butc support of the Tivoli backup system. - --enable-unix-sockets - Enable use of UNIX domain sockets for fssync. - - It's also possible to disable some standard features. None of these - options are recommended but may be useful in unusual circumstances: + --enable-transarc-paths + As discussed in A2 above, build for the traditional paths used by + the Transarc and IBM AFS distributions instead of the more typical + open source /usr/local paths. Passing this option to configure and + then running make dest will generate, in the dest directory, the + set of files and directory layout matching a Transarc or IBM AFS + tape distribution. - --disable-afsdb - Disable AFSDB DNS record support in the cache manager, normally - used to find cell VLDB servers. + --enable-warnings + Enable compilation warnings when built with GCC. This is similar + to --enable-checking, but new warnings will only be displayed, not + cause a build failure. - --disable-full-vos-listvol-switch - Removes support for the -format option to vos listvol and also - suppresses some additional fields that were added to vos examine - output but may confuse older software. - - --disable-largefile-fileserver - Disable large file (>2GB) support in the fileserver. + It's also possible to disable some standard features. None of these + options are normally needed, but they may be useful in unusual + circumstances: + + --disable-kernel-module + Even if kernel headers are found, do not attempt to build the + kernel module. On Linux, if you provide this flag, you'll also + need to provide --with-afs-sysname, since OpenAFS cannot determine + the correct sysname automatically without the kernel headers. + + --disable-optimize + --disable-optimize-kernel + --disable-optimize-lwp + --disable-optimize-pam + Disable optimization for the given portion of the OpenAFS code. + Usually used either for debugging to avoid code optimization making + it harder to use a debugger, or to work around bugs in the compiler + optimizers or in the OpenAFS code. --disable-pam Do not build the AFS PAM modules. Normally building them is @@ -359,8 +391,25 @@ I Other configure options and should not be used unless you're still using the OpenAFS kaserver (which is itself deprecated and should not be used). + --disable-strip-binaries + Disable stripping of binaries on installation. You probably want + to use --enable-debug instead of this flag to also inclusion of + debugging information. + + --disable-unix-sockets + Disable use of UNIX domain sockets for fssync. A TCP connection to + localhost will be used instead. + You may need to pass one or more of the following options to specify - the paths and locations of files needed by the OpenAFS build process: + paths and locations of files needed by the OpenAFS build process or + additional information required by the build process: + + --with-afs-sysname=SYSNAME + Specifies the AFS sysname of the target system is SYSNAME. + Normally this is determined automatically from the build + architecture plus additional information (such as, on Linux, from + the kernel headers). The SYSNAME should be one of the options + listed in A2. --with-krb5[=DIR] --with-krb5-include=DIR @@ -380,10 +429,51 @@ I Other configure options Autoconf can't figure out whether to use lib, lib32, or lib64 on your platform. + --with-linux-kernel-build=PATH + --with-linux-kernel-headers=PATH + --with-bsd-kernel-build=PATH + --with-bsd-kernel-headers=PATH + Specifies the path to the kernel headers and build system. See the + information above for Linux and *BSD systems. + + --with-linux-kernel-packaging + Tells the OpenAFS kernel module build system to use conventions + appropriate for building modules to include in Linux kernel module + packages. Primarily, this renames the kernel module to openafs.ko + rather than libafs-.ko, which is easier to handle in Linux + distribution init scripts. + + --with-html-xsl=PATH + --with-xslt-processor=PROGRAM + Specifies the XSLT style sheet and XSLT processor to use to convert + the DocBook manuals into HTML. + There are also some environment variables that you can set to control aspects of the build. They can be set either on the configure command line (preferred) or in the environment. + CC + The C compiler to use. Be aware that this is overridden on some + architectures that require a specific compiler be used to build the + kernel module. + + CFLAGS + Additional flags to pass to the C compiler. + + CPP + The C preprocessor to use. Defaults to cpp if found, otherwise + $CC -E. + + CPPFLAGS + Additional flags to pass to the C preprocessor or compiler. This + is where to put -I options to add paths to the include file search. + + FUSE_CFLAGS + Compiler flags required for building applications that use FUSE. + + FUSE_LIBS + Libraries required for linking applications that use FUSE. + KRB5_CONFIG To specify a particular krb5-config script to use, either set the KRB5_CONFIG environment variable or pass it to configure like: @@ -395,3 +485,21 @@ I Other configure options path: ./configure KRB5_CONFIG=/nonexistent + + LDFLAGS + Additional flags to pass to the linker. This is where to put -L + options to add paths to the library search. + + LIBS + Additional libraries to link all userspace programs with. + + PKG_CONFIG + The path to the pkg-config utility. Currently, this is only used + to locate the flags for building the FUSE version of afsd. + + YACC + The yacc implementation to use. Defaults to bison, byacc, or yacc, + whichever is found first. + + YFLAGS + Additional flags to pass to yacc. -- 1.9.4