xrootd build and installation notes

Introduction

xrootd is distributed a standalone package. The latest version of the standalone xrootd distribution can always be found linked from the main xrootd page.

It has no real external dependencies other than the standard compiler and OS installations on one of the supported platforms. If you are using the security plugins you will also need kerberos (more on this needed) and there is an optional perl interface to the admin functionality.

A version of xrootd is periodically integrated into ROOT. If you are using ROOT, starting from 4.01-02, you should already have an xrootd build available to you. Setup your PATH and LD_LIBRARY_PATH envvars to point to the bin and lib directories of your ROOT installation and you should be able to proceed.

If you need the latest version of xrootd, are working outside of ROOT, want to install the xrootd subset without the full ROOT build or working with ROOT before version 4.01-02 you may want to use the standalone builds. They are functionally identical to those provided in the ROOT builds. This page describes how to build and install the standalone xrootd.

Building and installing xrootd

If you want to download and install prebuilt binaries, rpms and binary tarballs are provided for each version for a subset of the supported platforms (primarily those used by BaBar: linux and solaris). Note that the rpms are relocatable so you should be able to install the contents in other locations should you wish.

For all supported platforms, simple unpack the tarball, 'cd' inside and then a simple:

prompt> ./configure; gmake
should suffice to build from the source code. Some special options are available, see

prompt> ./configure --help
When the build finishes you should point your PATH and LD_LIBRARY envvars to the "bin/arch/" and "lib/arch" directories, of your build, respectively, and you should be ready to go.

An example

For example on a relatively standard RHEL3 machine with gcc 3.2.3, a build of the xrootd 20050328-0656 production version leads to:

prompt> ./configure
Guessing architecture/compiler: linux:i686:2.4.21-27.8.ELsmp
linux | i686 | 2.4.21-27.8.ELsmp | i386_rhel30 | gcc
Configuring for i386_rhel30 and compiler gcc
Building monitor module ...
Checking whether strlcpy declared in /usr/include/string.h ... no: use xrd implementation
Checking whether getprotobyname_r declared in /usr/include/netdb.h ... yes
Checking whether gethostbyname_r is available ... yes
Checking whether getnameinfo is available ... yes
Checking whether sigwaitinfo declared in /usr/include/signal.h ... yes
Checking for /dev/poll support ... no
Checking for rm ... /bin/rm
Checking for ln ... /bin/ln
Checking for libpthread ... /usr/lib
Checking for kerberosIV/krb.h ... /afs/slac.stanford.edu/package/krb5/include
Checking for libk5crypto ... /afs/slac.stanford.edu/package/krb5/lib
Checking whether we're using MIT Kerberos ... yes
Checking for libkrb5 ... /afs/slac.stanford.edu/package/krb5/lib
Checking for libkrb4 ... /afs/slac.stanford.edu/package/krb5/lib
Checking for libkrb5 ... /afs/slac.stanford.edu/package/krb5/lib
Checking for libdes425 ... /afs/slac.stanford.edu/package/krb5/lib
Checking for libk5crypto ... /afs/slac.stanford.edu/package/krb5/lib
Checking for krb5.h ... /afs/slac.stanford.edu/package/krb5/include
Checking for libk5crypto ... /afs/slac.stanford.edu/package/krb5/lib
Checking whether we're using MIT Kerberos ... yes
Checking for libkrb5 ... /afs/slac.stanford.edu/package/krb5/lib
Checking for com_err.h ... /afs/slac.stanford.edu/package/krb5/include
Checking for libcom_err ... /afs/slac.stanford.edu/package/krb5/lib
Writing GNUmakefile  ... done
Writing src/GNUmake.env  ... done
Writing src/GNUmake.options  ... done

prompt> gmake
Making ouc component...
Compiling XrdOuca2x.cc
Compiling XrdOucError.cc
Compiling XrdOucHashVal.cc
Compiling XrdOucEnv.cc
<...>
Compiling XrdMonCtrMainApp.cc
Creating executable xrdmonCollector
Compiling XrdMonSndAdminApp.cc
Creating executable xrdmonAdmin
Make XrdMon done.
Make all done
and the contents of the bin and lib directories is:

prompt> ls -l bin/i386_rhel30/
total 2943
-rwxr-xr-x    1 elmer    ec         697321 Apr  9 03:27 TestXrdClient
-rwxr-xr-x    1 elmer    ec         266881 Apr  9 03:26 olbd
-rwxr-xr-x    1 elmer    ec         118214 Apr  9 03:25 testaccess
-rwxr-xr-x    1 elmer    ec          13055 Apr  9 03:26 testclient
-rwxr-xr-x    1 elmer    ec          37347 Apr  9 03:26 testserver
-rwxr-xr-x    1 elmer    ec         130930 Apr  9 03:26 xrclient
-rwxr-xr-x    1 elmer    ec         826059 Apr  9 03:27 xrdcp
-rwxr-xr-x    1 elmer    ec         113644 Apr  9 03:28 xrdmonAdmin
-rwxr-xr-x    1 elmer    ec         434087 Apr  9 03:28 xrdmonCollector
-rwxr-xr-x    1 elmer    ec         373135 Apr  9 03:27 xrootd

prompt> ls lib/i386_rhel30/
total 7256
-rw-r--r--    1 elmer    ec           1524 Apr  9 03:27 XrdClientAdmin.pm
-rw-r--r--    1 elmer    ec         190852 Apr  9 03:26 libXrd.a
-rw-r--r--    1 elmer    ec         117048 Apr  9 03:25 libXrdAcc.a
-rw-r--r--    1 elmer    ec        1381956 Apr  9 03:27 libXrdClient.a
-rw-r--r--    1 elmer    ec         104918 Apr  9 03:27 libXrdMonCollector.a
-rw-r--r--    1 elmer    ec         211736 Apr  9 03:27 libXrdMonCommon.a
-rw-r--r--    1 elmer    ec         474330 Apr  9 03:28 libXrdMonDecoder.a
-rw-r--r--    1 elmer    ec         280184 Apr  9 03:28 libXrdMonDummySender.a
-rw-r--r--    1 elmer    ec          76002 Apr  9 03:25 libXrdNet.a
-rw-r--r--    1 elmer    ec          91040 Apr  9 03:26 libXrdOdc.a
-rwxr-xr-x    1 elmer    ec         464976 Apr  9 03:26 libXrdOfs.so
-rw-r--r--    1 elmer    ec         224346 Apr  9 03:26 libXrdOss.a
-rw-r--r--    1 elmer    ec          93178 Apr  9 03:25 libXrdOuc.a
-rwxr-xr-x    1 elmer    ec         681764 Apr  9 03:27 libXrdPosix.so
-rwxr-xr-x    1 elmer    ec          37201 Apr  9 03:26 libXrdRootd.so
-rw-r--r--    1 elmer    ec          68676 Apr  9 03:26 libXrdSec.a
-rwxr-xr-x    1 elmer    ec          76443 Apr  9 03:26 libXrdSec.so
-rwxr-xr-x    1 elmer    ec        1384626 Apr  9 03:26 libXrdSeckrb4.so
-rwxr-xr-x    1 elmer    ec        1417768 Apr  9 03:26 libXrdSeckrb5.so
-rw-r--r--    1 elmer    ec          39962 Apr  9 03:26 libXrdXr.a
The pieces (binaries and plugin libraries) which are interesting for run-time use at this time are those highlighted in green.

A very basic test to see that the build is okay is just to start the server. It should look like:

prompt> bin/arch/xrootd 
050409 03:42:20 001 (c) 2004 Stanford University/SLAC xrd version 20050328-0656_dbg
050409 03:42:20 001 xrd@noric01.slac.stanford.edu initialization started.
050409 03:42:20 001 Optimizing for 256 connections; maximum is 1024
050409 03:42:20 001 (c) 2004 Stanford University/SLAC XRootd (eXtended Root Daemon).
050409 03:42:20 001 XRootd seclib not specified; strong authentication disabled
050409 03:42:20 001 XRootd fslib not specified; using native file system
050409 03:42:20 001 (c) 2005 Stanford University/SLAC sfs (Standard File System) v 9.0n
050409 03:42:20 001 Prep log directory not specified; prepare tracking disabled.
050409 03:42:20 001 Warning, only '/tmp' will be exported.
050409 03:42:20 001 XRootd protocol version 2.3.0 build 20050328-0656 successfully loaded.
050409 03:42:20 001 xrd@noric01.slac.stanford.edu:1094 initialization completed.
If this looks okay, hit ctrl-C to kill it and you should be able to proceed with setting up and testing a real system. (See the examples.)

Last modified 09-Apr-2005, Peter.Elmer@cern.ch