Building gLExec and its gLite dependencies from SVN source
Introduction
This page explains the steps needed to build gLite tools, in particular gLExec and its LCMAPS and LCAS dependencies directly from the source in CVS. Note that the order in which these packages are described below ensures that all the dependencies are resolved.
We also provide two example scripts which build all the different tools consecutively which has been used as the source for this wiki page.
Note that this is work in progress, hence comments, suggestions etc. are highly appreciated.
Prerequisites: Globus and global settings
First define the build and runtime installation paths:
export source=/tmp/source # Where to download sources export globus=/tmp/build/globus # Where to install globus export glite=/tmp/build/glite # Where to find glite builds export prefix=${glite} # Where to install glite builds
Make sure ${source} exists. Set the correct CVSROOT for gLite downloads:
export CVSROOT=:pserver:anonymous@glite.cvs.cern.ch:/cvs/glite # anonymous CVS root
There are currently two ways to get a working globus library.
Binary Globus installation
For the following OSes it can be found in the Etics repositories:
- RedHat-4 32 bits (also for SL(C)-4 and Centos-4): globus-4.0.3-VDT-1.6.1-7.tar.gz
- RedHat5 64 bits (also for SL(C)-5 and Centos-5): globus-4.0.7-VDT-1.10.1-1.tar.gz
- OpenSUSE 11 64 bits: globus-4.0.7-VDT-1.10.1-1.tar.gz
- Debian-5 64 bits: globus-4.0.8-VDT-2.0.0-2.tar.gz
Since all these tarballs assume installation in /opt/globus unpack and 'relocate' as follows:
mkdir -p ${globus} && \ cd ${globus} && \ tar -zxf <globus tarball> && \ find -type f -name \*.la|while read file;do sed s+/opt/globus+${globus}+g ${file} > ${file}.new && \ mv -f ${file}.new ${file} done
Set one of the following exports, depending on 32 or 64 bit platform:
export globus_flav=gcc32dbg |
or | export globus_flav=gcc64dbg |
Globus installation from source
Download the gt4.0.8-all-source-installer.tar.bz2 source tarball, unpack and go to the created gt4.0.8-all-source-installer directory.
./configure --prefix=${globus} \ --disable-gridftp --disable-gsiopenssh --disable-myproxy \ --disable-rls --disable-drs --disable-rendezvous --disable-tests \ --disable-prewsgram --disable-wsgram --disable-wsjava --disable-wsc \ --disable-wsmds --disable-wsdel --disable-wsrft --disable-wscas \ --disable-wstests --disable-webmds make globus-gsi make install
Now set the correct globus flavour, e.g.:
export globus_flav=unset if [ -f "${globus}/etc/globus_core/flavor_gcc64dbg.gpt" ];then globus_flav=gcc64dbg elif [ -f "${globus}/etc/globus_core/flavor_gcc64.gpt" ];then globus_flav=gcc64 elif [ -f "${globus}/etc/globus_core/flavor_gcc32dbg.gpt" ];then globus_flav=gcc32dbg elif [ -f "${globus}/etc/globus_core/flavor_gcc32.gpt" ];then globus_flav=gcc32 fi
VOMS API
Dependencies: Globus
cd ${source} cvs co -r glite-security-voms_R_1_9_16_2 org.glite.security.voms cd org.glite.security.voms ./configure --prefix=${prefix} --with-globus-prefix=${globus} --disable-java --with-api-only make && make install
LCMAPS
Dependencies: Globus, VOMS API
Note: It is important to use the given org.glite.build.common-cpp version!
Also note that we use the same value for both globus*flavor options. This is only relevant when building globus from source: since we only need to build the non-threading library, while the glite_security.m4 macro uses the threaded include path, the voms test will fail unless we use this 'hack'.
cd ${source} cvs co -r glite-build-common-cpp_R_3_2_7_1 org.glite.build.common-cpp cvs co org.glite.security.lcmaps cd org.glite.security.lcmaps cp -p ../org.glite.build.common-cpp/m4/{globus,glite,glite_security,lcmaps}.m4 ./project ./bootstrap ./configure --prefix=${prefix} \ --with-glite-location=${glite} \ --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav} --with-globus-nothr-flavor=${globus_flav} make && make install
LCAS
Dependencies: Globus
Note: glite-build-common-cpp is also checked out under LCMAPS.
cd ${source} cvs co -r glite-build-common-cpp_R_3_2_7_1 org.glite.build.common-cpp cvs co org.glite.security.lcas cd org.glite.security.lcas cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project ./bootstrap && \ ./configure --prefix=${prefix} \ --with-glite-location=${glite} \ --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install
LCAS interface
cd ${source} cvs co org.glite.security.lcas-interface cd org.glite.security.lcas-interface cp -p ../org.glite.build.common-cpp/m4/glite.m4 ./project ./bootstrap ./configure --prefix=${prefix} make install
gLExec
Dependencies: Globus, LCMAPS, LCAS, LCAS interface
Note: for Debian-5 set the following extra export:
export LDFLAGS="-Wl,--rpath -Wl,${globus}/lib"
Note: the HEAD version of gLExec has a new configure option --with-glexec-conf to allow setting the fixed location of the configuration file, which defaults to /opt/glite/etc/glexec.conf. In older versions (including production), it is possible to do this by setting the following export before calling configure. Note the particular combination of single quotes and escaped double quotes:
export CPPFLAGS=-DGLEXEC_CONFIG_FILE='\"'${prefix}/etc/myglexec.conf'\"'
cd ${source} cvs co org.glite.security.glexec cd org.glite.security.glexec cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps}.m4 ./project ./bootstrap ./configure --prefix=${prefix} \ --with-glite-location=${glite} --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install
LCMAPS plugins basic
cd ${source} cvs co org.glite.security.lcmaps-plugins-basic cd org.glite.security.lcmaps-plugins-basic cp -p ../org.glite.build.common-cpp/m4/{glite,globus,lcmaps,gridlist}.m4 ./project ./bootstrap ./configure --prefix=${prefix} --with-glite-location=${glite} --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install
LCMAPS plugins verify-proxy
Dependencies: LCMAPS
cd ${source} cvs co org.glite.security.lcmaps-plugins-verify-proxy cd org.glite.security.lcmaps-plugins-verify-proxy cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project ./bootstrap ./configure --prefix=${prefix} --with-glite-location=${glite} make && make install
LCMAPS plugins voms
Dependencies: Globus, VOMS API, LCMAPS
cd ${source} cvs co org.glite.security.lcmaps-plugins-voms cd org.glite.security.lcmaps-plugins-voms cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,globus,lcmaps,gridlist}.m4 ./project ./bootstrap ./configure --prefix=${glite} --with-glite-location=${glite} --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install
PEP-C Library
Note: the way the PEP-C library determines the library path is not fully compatible with the way LCMAPS does it. To fix this, define:
export pepclibdir=${glite}/<libdir used by LCMAPS>
cd ${source} svn co http://svnweb.cern.ch/guest/glxa/pep-c-lib/tags/1_3_0 org.glite.authz.pep-c cd org.glite.authz.pep-c ./autotools.sh ./configure --prefix=${glite} --libdir=${pepclibdir} make && make html && make install
LCMAPS plugins C-pep
Dependencies: LCMAPS, PEP-C Library
cd ${source} cvs co org.glite.security.lcmaps-plugins-c-pep cd org.glite.security.lcmaps-plugins-c-pep cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security}.m4 ./project ./bootstrap ./configure --prefix=${glite} --with-glite-location=${glite} make && make install
SAML2-XACML2 Library
Note: glite-build-common-cpp is also checked out under LCMAPS and/or LCAS
cd ${source} cvs co -r glite-build-common-cpp_R_3_2_7_1 org.glite.build.common-cpp cvs co org.glite.security.saml2-xacml2-c-lib cd org.glite.security.saml2-xacml2-c-lib cp -v -p ../org.glite.build.common-cpp/m4/glite.m4 ./project export CXXFLAGS=-fPIC cd gsoap-2.7 ../autogen.sh ./configure --prefix=${glite} make && make install cd ../xacml-1.0 ../autogen.sh ./configure --prefix=${glite} --with-gsoap=${glite} make && make install
LCMAPS plugins SCAS client
Dependencies: LCMAPS, SAML2-XACML2 Library
cd ${source} cvs co org.glite.security.lcmaps-plugins-scas-client cd org.glite.security.lcmaps-plugins-scas-client cp -p ../org.glite.build.common-cpp/m4/{glite,glite_security,lcmaps}.m4 ./project ./bootstrap ./configure --prefix=${glite} --with-glite-location=${glite} make && make install
LCAS plugins basic
cd ${source} cvs co org.glite.security.lcas-plugins-basic cd org.glite.security.lcas-plugins-basic cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project ./bootstrap ./configure --prefix=${glite} --with-glite-location=${glite} --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install
LCAS plugins check-executable
cd ${source} cvs co org.glite.security.lcas-plugins-check-executable cd org.glite.security.lcas-plugins-check-executable cp -p ../org.glite.build.common-cpp/m4/{glite,globus,gridlist}.m4 ./project ./bootstrap ./configure --prefix=${glite} --with-glite-location=${glite} --with-globus-prefix=${globus} --with-globus-thr-flavor=${globus_flav}pthr --with-globus-nothr-flavor=${globus_flav} make && make install