Changeset 13910
- Timestamp:
- Jun 19, 2007, 5:24:44 PM (19 years ago)
- Location:
- trunk/doc/manual
- Files:
-
- 5 added
- 1 edited
-
ippMonitor.eps (added)
-
ippMonitor.png (added)
-
manual.tex (modified) (12 diffs)
-
skycells.ps (added)
-
tau-region.ps (added)
-
userview.ps (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/manual.tex
r13881 r13910 1 %%% $Id: manual.tex,v 1. 9 2007-06-19 21:38:53eugene Exp $1 %%% $Id: manual.tex,v 1.10 2007-06-20 03:24:44 eugene Exp $ 2 2 \documentclass[panstarrs,psreport,spec]{panstarrs} 3 3 4 4 % basic document variables 5 5 \title{Pan-STARRS Image Processing Pipeline} 6 \subtitle{User Guide}6 \subtitle{User's Guide} 7 7 \shorttitle{PS IPP UG} 8 8 \author{Eugene A. Magnier, Paul A. Price, Joshua Hoblitt} … … 132 132 The operating goals of the IPP can be broken down into several major categories: 133 133 \begin{itemize} 134 \item reduction, analysis, and calibration of individual astronomical science images. 135 \item combinations (additions and subtractions) of groups of science image, along with their analysis and calibration. 136 \item analysis of the ensemble properties of astronomical objects detected from many images, including improved astrometric and photometric calibrations. 137 \item construction of the necessary master detrend images and other calibration information needed to perform the science analysis. 138 \item enabling further investigation into the data characteristics by tracking sufficient metadata and providing tools for this analysis. 134 \item reduction, analysis, and calibration of individual astronomical 135 science images. 136 \item combinations (additions and subtractions) of groups of science 137 image, along with their analysis and calibration. 138 \item analysis of the ensemble properties of astronomical objects 139 detected from many images, including improved astrometric and 140 photometric calibrations. 141 \item construction of the necessary master detrend images and other 142 calibration information needed to perform the science analysis. 143 \item enabling further investigation into the data characteristics by 144 tracking sufficient metadata and providing tools for this analysis. 139 145 \end{itemize} 140 146 Furthermore, the IPP is designed to perform these tasks with a high … … 142 148 instruments. 143 149 144 A cartoon of the user's view on the IPP is seen in Figure~\ref{}. 145 Images are injected into the IPP, either automatically by software 146 interacting with the telescope systems or manually by the user. The 147 images are processed by the IPP through any number of analysis steps; 148 the specifics of the analysis will depend on the type of image, the 149 overall configuration, and additional requests the user may make. The 150 user may use the program \code{pantasks} to control and monitor the 151 ongoing processing, or view summary result information in the 152 ippMonitor web browser. As science images are processed, the 153 information about the objects detected in these images is passed to 154 the DVO database. The user may explore the results or perform further 155 science analysis by interacting with the DVO database via the DVO 156 Shell. From this tool, the user may, for example, create 157 color-magnitude diagrams of regions in the sky, or plot light curves 158 of specific objects. The DVO Shell makes it possible to performing 159 data extraction and data visualization on the DVO database. 150 \begin{figure} 151 \psfig{file=userview.ps,width=6in,angle=0} 152 \caption{User's view of the IPP} 153 \label{fig:ipp-userview} 154 \end{figure} 155 156 A cartoon of the user's view on the IPP is seen in 157 Figure~\ref{fig:ipp-userview}. Images are injected into the IPP, 158 either automatically by software interacting with the telescope 159 systems or manually by the user. The images are processed by the IPP 160 through any number of analysis steps; the specifics of the analysis 161 will depend on the type of image, the overall configuration, and 162 additional requests the user may make. The user may use the program 163 \code{pantasks} to control and monitor the ongoing processing, or view 164 summary result information in the ippMonitor web browser. As science 165 images are processed, the information about the objects detected in 166 these images is passed to the DVO database. The user may explore the 167 results or perform further science analysis by interacting with the 168 DVO database via the DVO Shell. From this tool, the user may, for 169 example, create color-magnitude diagrams of regions in the sky, or 170 plot light curves of specific objects. The DVO Shell makes it 171 possible to performing data extraction and data visualization on the 172 DVO database. 160 173 161 174 Below, we discuss in more detail how a user would use the IPP in … … 199 212 200 213 In this section, we introduce the user to the IPP user interface 201 tools. 214 tools. These are the elements of the IPP which provide feedback to 215 the user or allow the user to initiate a new type of analysis or to 216 start and stop the automatic processing of the IPP. 202 217 203 218 \subsubsection{ippMonitor} 219 220 \begin{figure} 221 \psfig{file=ippMonitor.eps,width=6in,angle=0} 222 \caption{Example Screen Shot from the ippMonitor} 223 \label{fig:ippMonitor} 224 \end{figure} 204 225 205 226 The \code{ippMonitor} is a web-based tool that allows the end-user to … … 234 255 many cases if the command is typed without arguments. 235 256 236 \begin{verbatim} 237 catdir demo 257 \begin{figure} 258 \psfig{file=skycells.ps,width=4in,angle=0} 259 \psfig{file=tau-region.ps,width=2in,angle=0} 260 \caption{Example Plots from DVO} 261 \label{fig:dvo-sample} 262 \end{figure} 263 264 \begin{verbatim} 265 catdir skycells 238 266 region -n view1 0 0 80 ait 239 267 images 240 268 241 region -n view2 10 40 2 269 catdir taurus-project 270 region -n view2 64.8 26.1 4.0 271 images 242 272 avextract ra,dec where (g - i > 2.0) 243 273 cplot ra dec -c red … … 252 282 \code{ait} (aitoff projection), \code{sin} (sin projection), .... 253 283 254 \subsubsection{ pantasks}284 \subsubsection{Pantasks} 255 285 256 286 Pantasks is the program which schedules the analysis to be performed … … 312 342 \end{itemize} 313 343 344 The collection of programs which are used to initiate different stages 345 of the IPP analysis is called \code{ippTools}. This suite of programs 346 314 347 \subsection{Operational Scenarios} 315 348 … … 401 434 of this fact by setting the FRINGE.FILTERS entry in the 402 435 \code{ppImage.config} file. Use a set of night-time sky images to 403 generate a fringe frame. \ note{how to specify more than one fringe404 mode?}436 generate a fringe frame. \tbd{How to specify more than one fringe 437 mode?} 405 438 406 439 Activate the chip-level science analysis tasks in pantasks: chip.on. 407 440 With this off, no data will be processed before the detrend images are 408 441 ready. Once this is turned on, the science images will start to be 409 processed \note{discuss blocks; re-queue; versions}. 410 411 \note{specifying the dvo output database} 442 processed. 443 444 \tbd{Discuss blocks, re-queuing science images, analysis versions}. 445 446 \tbd{Illustrate how to specify the DVO output database} 412 447 413 448 \subsubsection{Pipeline Reduction : PI-Oriented Observatory} … … 436 471 so than in a single-user situation, it may be perfereable to use the 437 472 Nebulous infrastructure to manage the location and copies of the image 438 data. \t db{define an inject mechanism that uses Nebulous}.473 data. \tbd{Define an inject mechanism that uses Nebulous}. 439 474 440 475 Second, it is interesting to consider on what timescale to test and … … 501 536 Standard IPP-wide command-line options (document elsewhere): 502 537 \begin{itemize} 503 \item C{-site site.mdc}504 \item C{-camera camera-name}505 \item C{-recipe NAME VALUE}506 \item C{-D KEY VALUE}507 \item C{-Df KEY VALUE}508 \item C{-Db KEY VALUE}509 \item C{-Di KEY VALUE}538 \item \code{-site site.mdc} 539 \item \code{-camera camera-name} 540 \item \code{-recipe NAME VALUE} 541 \item \code{-D KEY VALUE} 542 \item \code{-Df KEY VALUE} 543 \item \code{-Db KEY VALUE} 544 \item \code{-Di KEY VALUE} 510 545 \end{itemize} 511 546 … … 765 800 766 801 \section{Installation} 802 803 \subsection{psconfig} 804 805 The psconfig system allows the user to build and install the IPP 806 software suite into a location which is flexibly defined by the user. 807 The tools here also set up the user's environment variables 808 (\code{PATH}, \code{PERL5LIB}, \code{LIBRARY_PATH}, etc) to make use 809 of the installed software. With the psconfig tools, it is easy to 810 switch between different installed versions or to recompile subsets of 811 the IPP tree. It is also possible for a user to install the complete 812 IPP system without access to the root password. 813 814 \subsubsection{Preparation} 815 816 \paragraph{Unpack the IPP tarball.} The IPP source code is 817 distributed as a single tarball for all of the IPP software 818 (ipp-M.NN.tgz, where M.NN is the version number, currently 2.1). Use 819 the command \code{tar xvzf ipp-M.NN.tgz} or \code{gzcat ipp-M.NN.tgz | 820 tar xvz} on older platforms. The tarball will unpack into a directory 821 named ipp-M.NN. 822 823 \paragraph{Unpack the external Perl modules.} If needed, the complete 824 collection of Perl modules used by the IPP is also distributed from 825 the IPP web site as a tarball, extperl.tgz. Use the command \code{tar 826 xvzf extperl.tgz}, which will unpack the tarball into a directory 827 called \code{extperl}. This must be at the same location as the top 828 level directory. The program \code{pscheckperl} below will identify 829 any external Perl modules which are missing from your system. 830 831 \paragraph{Download the external C libraries.} If needed, the 832 external libraries needed by the IPP are available from the IPP web 833 pages. Download these as needed to a directory called \code{extlibs}, 834 again parallel to the \code{ipp-M.NN} directory. The program 835 \code{pschecklibs} below will identify any external C libraries which 836 are missing from your system. 837 838 \paragraph{Set up your account to use the psconfig system.} The 839 psconfig system provides a script which sets up the necessary UNIX 840 environment variables and aliases, enabling the compiler and the 841 programs to find your installed libraries and Perl modules. The 842 details depend on your UNIX shell: 843 844 \subparagraph{csh users} 845 846 To use the psconfig system, place the following line in your ~/.cshrc 847 file: 848 849 \code{alias psconfig "source ../ipp-M.NN/psconfig/psconfig.csh"} 850 851 where ../ipp-M.NN is the location of the extracted ipp tarball. If 852 you prefer, you may copy the file psconfig.csh to another location. 853 If, for example, you would like to remove the build directories after 854 building the IPP, you will need a persistent copy of psconfig.csh. 855 856 By default, the psconfig system places the installed IPP programs and 857 configuration files in a directory in your home directory: 858 \code{~/psconfig}. To use a different location, place the following 859 line in \code{~/.psconfigrc} (otherwise not needed): 860 861 \code{set PSCONFDIR = INSTALL_PATH} 862 863 where \code{INSTALL_PATH} is the top-level directory for all installed files. 864 865 \subparagraph{bash users} 866 867 Add the following line to your \code{~/.bashrc} file: 868 869 \code{alias psconfig="source PATH/psconfig.bash"} 870 871 It is also necessary to edit the file psconfig.bash to set the 872 \code{PSCONFIG_DIR} variable to this directory as well. 873 874 \tbd{set this up for better discovery} 875 876 \paragraph {Set the installation version} 877 878 The IPP is a large and complex software system. A major goal of the 879 IPP build system is to be user-friendly for those end users which do 880 not have root access on their machines. Using the IPP build tools, it 881 is possible to install the complete system as a non-priviledged user. 882 The build system also makes it possible to maintain multiple 883 simultaneous installations with different versions of the 884 software. This latter feature is particularly important for developers 885 who need to be able to make tests and comparisons of different 886 versions. 887 888 With \code{psconfig}, you may have multiple, parallel installations of 889 the IPP. These may be different versions of the software, or 890 installations for different computer architectures, or installations 891 with different compilation options. For example, you may want an 892 installation with tracing and debug information turned on and a second 893 with all optimizations turned on. With the psconfig build system, 894 each installation of the IPP software is placed in a directory 895 identified by an installation name and the computer architecture. The 896 installation name is up to the person who compiles the IPP software, 897 and is an arbtrary word or string. For example, you may choose the 898 install the optimized version under ipp-2.1-opt and the debug version 899 under ipp-2.1-debug. The psconfig system will create a directory in 900 \code{~/psconfig} (or where ever \code{PSCONDIR} is set) called 901 ipp-2.1-opt.linux (if building on a linux 32bit system), or something 902 equivalent. 903 904 Before running or compiling the IPP, it is necessary to use 905 \code{psconfig} to set the installation name: 906 % 907 \code{psconfig (name)} 908 % 909 This command sets aliases and environment variables for the current 910 shell to point at the named IPP installation, for the current 911 hardware. For example: 912 % 913 \code{psconfig default} 914 % 915 will set the \code{PATH} to include 916 \code{~/psconfig/default.linux/bin} on a 32-bit linux system, and the 917 other paths to point at the corresponding installation directories. 918 919 Users who wish to automatically have access to an IPP installation 920 should add the psconfig line to their \code{~/.cshrc} or 921 \code{~/.bashrc} files. 922 923 \subsubsection{Check External Dependencies} 924 925 The IPP build system is run from the directory 926 \code{../ipp-M.NN/psconfig}. Within this directory are the build 927 scripts and scripts to prove the build environment. Before building 928 the IPP suite, you should first check for the needed C libraries and 929 Perl scripts. Start by \code{cd}-ing into \code{ipp-M.NN/psconfig}. 930 931 \subsubsubsection{External C libraries} 932 933 The program \code{pschecklibs} in the \code{ipp-M.NN/psconfig} 934 directory will check for required system libraries and headers: 935 % 936 \code{pschecklibs} 937 % 938 It examines the system libraries, libraries defined by 939 \code{LIBRARY_PATH}, and the installation library defined by psconfig. 940 Any missing dependencies will be listed. Tarballs for these libraries 941 may be found on the Pan-STARRS web site at: 942 % 943 \code{http://pan-starrs.ifa.hawaii.edu/project/IPP/software/ext} 944 % 945 These should be installed so they will be available in the user's 946 path. This can be done with the \code{psconfig} tools by using 947 \code{psconfigure} to replace the standard \code{configure} command. 948 The \code{psconfigure} command applies the needed \code{--prefix} 949 options to place the libraries within the IPP installation tree. 950 There is also an equivalent for \code{autogen.sh}, \code{psautogen}, 951 if needed. 952 953 \subsubsubsection{External Perl Modules} 954 955 The program \code{pscheckperl} in the \code{ipp-M.NN/psconfig} 956 directory will check for required Perl modules, and can be used to 957 install them in the appropriate user location in the psconfig system. 958 The command defaults to the latest perl installation table in the 959 \code{tagsets} directory. If you have CVS access and choose to check 960 out an older IPP distribution, it is necessary to supply the 961 distribution name to \code{pscheckperl}. Otherwise, run it without arguments: 962 % 963 \code{pscheckperl} 964 % 965 This will test for the perl modules specified for the latest ipp 966 release. If any modules are missing, you should install the perl 967 module tarball (see above), or they can be download from the 968 Pan-STARRS web site: 969 % 970 \code{http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extperl} 971 972 The tarballs should be placed in a directory \code{extperl} parallel 973 to the ipp directory (two levels up from this directory). If the 974 tarballs are in the correct location, they can be built by supplying 975 the \code{-build} flag to \code{pscheckperl}: 976 977 \code{pscheckperl -build} 978 979 \subsubsection{Building IPP} 980 981 To build the full IPP tree using the psconfig system, run 982 \code{psbuild} in the \code{ipp-M.NN/psconfig} directory. By default, 983 \code{psbuild} will use the latest IPP distribution table, in the 984 directory \code{tagsets}, and build the IPP components according to 985 the rules in that distribution file. The distribution files specify 986 which versions (which CVS tags) of the different programs are to be 987 built, and in which order, for a given distribution of the IPP. If 988 you have access to the IPP CVS tree and check out an old IPP 989 distribution, it is possible to specify the file for that 990 distribution, and build the software as it appeared for that older 991 distribution. It is also possible to use the tools in this directory 992 to check out the older code and to build tarballs for the older 993 distributions. However, for the typical end user building the IPP 994 from a distributed tarball, it is only necessary to run \code{psbuild} 995 without additional arguments: 996 % 997 \code{psbuild ipp-1.2} 998 % 999 1000 There are a number of command-line options to \code{psbuild} which 1001 control how the software is built or which components of the IPP to 1002 build: 1003 \begin{verbatim} 1004 -version (version) : specify alternate psconfig installation version 1005 -clean : clean the source directories before building 1006 -rebuild : run 'autogen' (C code) 1007 -optimize : set flags for optimized code 1008 -only (module) : only build the specified module 1009 -start (module) : begin build at specified module 1010 -stop (module) : stop build after specified module 1011 \end{verbatim} 1012 1013 Summary of psconfig operations: 1014 \begin{verbatim} 1015 psdist -tag : tag CVS tree 1016 psdist -dist : build tarball from tagged tree 1017 psdist -dist -head : build tarball from head 1018 psbuild : build and install software in tree 1019 pschecklibs : check for needed external software 1020 pscheckperl : check for needed perl modules 1021 pscheckperl -build : build and install external modules 1022 \end{verbatim} 1023 1024 \subsection{jhbuild} 1025 1026 JH uses \code{jhbuild} even though the 'jh' in \code{jhbuild} doesn't 1027 really refer to him. 1028 1029 \subsubsubsection{What is it?} 1030 1031 According to the introduction on the \code{jhbuild} website: 1032 1033 \begin{quote} 1034 \code{jhbuild} is a program that can be used to pull a number of 1035 modules from CVS and build them in the correct order. Unlike some 1036 build scripts, \code{jhbuild} lets you specify what modules you want 1037 built and it will then go and build those modules plus dependencies. 1038 1039 Although \code{jhbuild} was originally developed to build 1040 \code{[WWW]Gnome}, it is now able to build a number of the modules in 1041 \code{freedesktop.org} CVS. Extending it to handle new modules is 1042 usually trivial (assuming the build infrastructure matches the other 1043 modules it handles). 1044 \end{quote} 1045 1046 In additional to retrieving source code from various SCM's (CVS, SVN, 1047 arch, etc.), jhbuild has the ability to download tarballs via HTTP or 1048 FTP. 1049 1050 \code{jhbuild} has been adopted as an official \code{freedesktop.org} 1051 project. You can find more information on the project's homepage 1052 (\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be 1053 filed in the Gnome Bugzilla (\code{http://bugzilla.gnome.org}). 1054 1055 \subsubsubsection{Where to get it} 1056 1057 It was necessary to slightly modify \code{jhbuild} for use with IPP 1058 software. Therefore, you must checkout the \code{jhbuild} module from 1059 the Pan-STARRS CVS tree. Please see the Pan-STARRS CVS Guide for help 1060 on setting up and using CVS. \code{jhbuild} will need to be able to 1061 find it's own source tree even after installation so you should choose 1062 a checkout path that can be permanent. Something along the lines of 1063 \code{$HOME/src} is recommended. 1064 1065 \begin{verbatim} 1066 cd 1067 mkdir -p src 1068 cd src 1069 cvs co jhbuild 1070 \end{verbatim} 1071 1072 After running CVS you should see something like this: 1073 1074 \begin{verbatim} 1075 $ cvs co jhbuild 1076 cvs checkout: Updating jhbuild 1077 U jhbuild/.cvsignore 1078 U jhbuild/COPYING 1079 U jhbuild/ChangeLog 1080 U jhbuild/HACKING 1081 U jhbuild/Makefile 1082 U jhbuild/README 1083 U jhbuild/install-check.c 1084 . 1085 . 1086 \end{verbatim} 1087 1088 \subsubsubsection{Installing jhbuild into your home directory} 1089 1090 \code{jhbuild} should be installed locally under your home 1091 directory. This will require that you modify the \code{PATH} 1092 environment variable so that you can run jhbuild after it has been 1093 installed. 1094 1095 \begin{verbatim} 1096 cd jhbuild 1097 make 1098 make install 1099 \end{verbatim} 1100 1101 Which should look something like this: 1102 1103 \begin{verbatim} 1104 $ make 1105 gcc -Wall -O2 -o install-check install-check.c 1106 Run "make install" to install. 1107 $ make install 1108 Creating /home/moanui/jhoblitt/bin/jhbuild 1109 Creating /home/moanui/jhoblitt/.gnome2/vfolders/applications/jhbuild.desktop 1110 install -m755 install-check /home/moanui/jhoblitt/bin/install-check 1111 install -m755 config.guess /home/moanui/jhoblitt/bin/config.guess 1112 \end{verbatim} 1113 1114 That will install the \code{jhbuild} executable under 1115 \code{$HOME/bin}. You are responsible for including this path in your 1116 \code{PATH} environment variable. It is highly recommended that you 1117 add this to your \code{.bashrc} or equivalent shell login script. 1118 1119 For the \code{bash} shell, place this line in your \code{.bashrc}: 1120 \begin{verbatim} 1121 export PATH=${HOME}/bin:${PATH} 1122 \end{verbatim} 1123 For the \code{tcsh} shell, place this line in your \code{.tschrc}: 1124 \begin{verbatim} 1125 setenv PATH ${HOME}/bin:${PATH} 1126 \end{verbatim} 1127 1128 \subsubsubsection{Configuring jhbuild} 1129 1130 \code{jhbuild} is configured via an rc file that lives at 1131 \code{${HOME}/.jhbuildrc}. Please note that this rc file is executed 1132 as Python code; be careful! 1133 1134 Example \code{.jhbuildrc}, suitable for cut and paste: 1135 1136 \begin{verbatim} 1137 # what profile to build? 1138 moduleset = 'http://pan-starrs.ifa.hawaii.edu/project/IPP/software/modulesets/ipp12.modules' 1139 1140 # modules to build by default 1141 modules = [ 'pslib', 'psmodules' ] 1142 1143 # where should working copies go? 1144 jhroot = os.environ['HOME'] + '/jhroot' 1145 1146 # where should tarballs be kept? 1147 tarballdir = jhroot + '/src' 1148 1149 # in what prefix should things be installed? (must be writable) 1150 target = os.popen('config.guess').read().rstrip() 1151 prefix = jhroot + '/' + target 1152 checkoutroot = prefix + '/build' 1153 1154 # extra arguments to pass to the autogen.sh script? 1155 autogenargs = '--enable-maintainer-mode --disable-static' 1156 1157 # use an alternative install program that preserves the 1158 # mtime on header files if they haven't changed. Speeds 1159 # up rebuilds. 1160 os.environ['INSTALL'] = os.environ['HOME'] + '/bin/install-check' 1161 1162 # don't try to use /usr/ucb/cc on Solaris 1163 import sys 1164 if sys.platform == 'sunos5': 1165 os.environ['CC'] = 'gcc' 1166 \end{verbatim} 1167 1168 \subsubsubsection{Running jhbuild} 1169 1170 \code{Jhbuild} can be executed as \code{jhbuild build 1171 [modulename]}. Just \code{jhbuild} will build the packages specified 1172 in the \code{modules} variable from your rc file. 1173 \begin{verbatim} 1174 jhbuild 1175 \end{verbatim} 1176 or 1177 \begin{verbatim} 1178 jhbuild build pslib 1179 \end{verbatim} 1180 1181 Run \code{jhbuild} list to get a list of the packages \code{jhbuild} 1182 knows how to build. 1183 1184 \begin{verbatim} 1185 $ jhbuild list 1186 cfitsio 1187 gsl 1188 fftw 1189 libxml2 1190 mysql 1191 pslib 1192 psmodules 1193 \end{verbatim} 1194 1195 \code{jhbuild} supports many other commands. Please see \code{jhbuild 1196 --help} for a complete list of options. 1197 1198 \begin{verbatim} 1199 $ jhbuild --help 1200 usage: jhbuild [ -f config ] command [ options ... ] 1201 Build a set of CVS modules (such as GNOME). 1202 1203 Global options: 1204 -f, --file=CONFIG use a non default configuration file 1205 -m, --moduleset=URI use a non default module set 1206 --no-interact do not prompt for input 1207 1208 Commands: 1209 gui build targets from a gui app 1210 update update from cvs 1211 updateone modules update a fixed set of modules 1212 build [ opts... ] [modules] update and compile (the default) 1213 buildone [ opts... ] modules build a single module 1214 tinderbox [ opts... ] build non-interactively with logging 1215 run program [ args... ] run a command in the build environment 1216 shell start a shell in the build environment 1217 sanitycheck check that required support tools exists 1218 bootstrap build required support tools 1219 list [ opts ... ] [modules] list what modules would be built 1220 dot [ modules ] output a dot file of dependencies suitable 1221 for processing with graphviz 1222 info modules... prints information about modules 1223 1224 Options valid for the build, buildone, tinderbox and update commands: 1225 -s, --skip=MODULES treat the given modules as up to date 1226 -t, --start-at=MODULE start building at the given module 1227 -D date_spec set a sticky date when checking out modules 1228 1229 Options valid for the build, buildone and tinderbox commands: 1230 -a, --autogen always run autogen.sh 1231 -c, --clean run make clean before make 1232 -n, --no-network skip cvs update 1233 1234 Options valid for the tinderbox command: 1235 -o, --output=DIR directory to save build logs in 1236 1237 Options valid for the list command: 1238 -r, --show-revision show which revision will be built 1239 \end{verbatim} 1240 1241 \subsubsubsection{Dependancies} 1242 1243 \code{jhbuild} has a fairly minimal set of dependencies --- far less 1244 than what may be required to actually compile and install any 1245 packages. However, if your system can meet the base requirements, 1246 \code{jhbuild} should be able to bootstrap your build environment. 1247 \begin{itemize} 1248 \item A working C compiler (eg. \code{gcc}) 1249 \item A working \code{libc} (eg. \code{glibc}) 1250 \item Perl 5 with the \code{XML::Parser} module (needed by 1251 \code{libtool}) 1252 \item Python 2.? 1253 \item Either \code{wget} or \code{curl} 1254 \item GNU \code{M4} 1.4 1255 \item \code{tar} 1256 \item \code{gzip} 1257 \item \code{bzip2} 1258 \end{itemize} 1259 1260 \subsubsubsection{Bootstrapping} 1261 1262 \code{jhbuild} has a limited ability to install some of the necessary 1263 tools for maintaining software that configure its build environment 1264 with the GNU autotools. 1265 1266 This step is probably required on OSX and Solaris. Your mileage will 1267 vary per Linux distribution but you can probably skip this step if 1268 your distribution is around RedHat 9 vintage or newer. 1269 1270 \begin{verbatim} 1271 jhbuild bootstrap 1272 \end{verbatim} 1273 1274 \code{jhbuild} will then will begin to build a series of packages. 1275 1276 \subsubsubsection{Using the jhbuild enviroment} 1277 1278 As you've already seen, \code{jhbuild} is capable of setting up an 1279 independent build environment under the (configurable) directory of 1280 your choice. In order to link non-\code{jhbuild} management software 1281 against this build environment a number of your shell's environment 1282 variable have to be modified. \code{jhbuild} is capable of doing this 1283 for you. The syntax for this is \code{jhbuild shell}, which as the 1284 syntax implies, spawns a new shell with the proper environment 1285 variables. 1286 1287 This example demonstrates \code{jhbuild} setting up the dynamic 1288 linkers default search path for you. 1289 1290 \begin{verbatim} 1291 $ echo $LD_LIBRARY_PATH 1292 1293 $ jhbuild shell 1294 $ echo $LD_LIBRARY_PATH 1295 /home/moanui/jhoblitt/jhroot/i686-pc-linux-gnu/lib 1296 \end{verbatim} 1297 1298 %$ --- Emacs needs this to balance out the dollar signs 1299 1300 A fair number of other variables are also adjusted for you. Enough so 1301 that most (all?) \code{autoconf} configured software will be able to 1302 find it's dependencies. 1303 1304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1305 1306 \subsection{Aliases} 1307 1308 PAP puts the following in his \code{~/.tcshrc}: 1309 \begin{verbatim} 1310 setenv SWDIR $HOME/local/`$HOME/bin/config.guess`/ 1311 if (! -d $SWDIR) mkdir --parents $SWDIR 1312 alias ./autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/' 1313 alias autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/' 1314 alias ./configure './configure --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/' 1315 alias configure './configure --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/' 1316 setenv PATH ${PATH}:$SWDIR/bin/ 1317 setenv LD_LIBRARY_PATH $SWDIR/lib/:$SWDIR/lib/mysql:$LD_LIBRARY_PATH 1318 setenv MANPATH $SWDIR/man:$MANPATH 1319 setenv PKG_CONFIG_PATH $SWDIR/lib/pkgconfig/:$PKG_CONFIG_PATH 1320 \end{verbatim} 1321 1322 %$ --- Emacs needs this to balance out the dollar signs 1323 1324 Here, \code{config.guess} is the common GNU script for guessing the 1325 build system triplet (e.g., \code{i686-pc-linux-gnu}). 1326 1327 There are a couple of notes: 1328 \begin{itemize} 1329 \item To compile a binary, simply do \code{./configure}, then 1330 \code{make && make install}. 1331 \item \code{Ohana} doesn't like this setup, so you need to build it 1332 with: \code{\./configure --prefix=$SWDIR} 1333 \item Perl modules can be installed: \code{./Build install 1334 --prefix=$SWDIR}. 1335 \end{itemize} 1336 1337 \subsection{Manual Perl Module Installation} 1338 1339 Here we describe setting up the Perl dependencies followed by the 1340 IPP components. 1341 1342 \subsubsection{Dependencies} 1343 \label{sec:installing-perl-dependencies} 1344 1345 If you have access to the \code{root} account, installation as 1346 \code{root} is much easier. If not, you will have to go through 1347 the more flaky installation as an unprivileged user. 1348 1349 \subsubsubsection{Installation as root} 1350 1351 Many of the Perl dependencies are available from the Comprehensive 1352 Perl Archive Network (CPAN) at www.cpan.org. If you have root access 1353 on your target machines, they can be very simply retrieved, built and 1354 installed (replacing \code{MODULE_NAME} for each module): 1355 1356 \begin{verbatim} 1357 > su - 1358 Password: 1359 > cpan 1360 [...] 1361 cpan> install MODULE_NAME 1362 [...] 1363 cpan> quit 1364 \end{verbatim} 1365 1366 Follow the prompts. It's usually safe to accept the default (simply 1367 hit enter) in response to most questions. 1368 1369 If you get into trouble, try: \code{force install MODULE_NAME}. 1370 1371 You can also try to use the \code{Bundle::PS} as described below if 1372 you're feeling adventurous. 1373 1374 \subsubsubsection{Installation as unprivileged user} 1375 1376 To install modules from CPAN with the \code{CPAN.pm} interface, you 1377 need to setup a CPAN configuration file in your home directory. Then 1378 \code{CPAN.pm} can walk you through setting up the most important 1379 configuration values. Unfortunately, there is some variation in the 1380 behavior of the various versions of \code{CPAN.pm} that have shipped 1381 with Perl. Some (most) of these variants will not correctly create a 1382 configuration files that allows a non-\code{root} user to install 1383 modules outside of "system" paths. In order to make sure that you get 1384 a "correct" CPAN configuration file you need to ``prime'' it with a 1385 few values. 1386 1387 First you need to create the directory in which the CPAN configuration file will live. 1388 \begin{verbatim} 1389 > mkdir -p .cpan/CPAN/ 1390 \end{verbatim} 1391 1392 Then we need to create a partial configuration file. Note that this example 1393 assumes that you want to install your perl modules under 1394 \code{$HOME/local/lib/perl5}. 1395 1396 \begin{verbatim} 1397 > echo "\$CPAN::Config = {" >> .cpan/CPAN/MyConfig.pm 1398 > echo " makepl_arg => q[PREFIX=$HOME/local/]," >> .cpan/CPAN/MyConfig.pm 1399 > echo " mbuildpl_arg => q[--install_base $HOME/local/]," >> .cpan/CPAN/MyConfig.pm 1400 > echo "};" >> .cpan/CPAN/MyConfig.pm 1401 > echo "1;" >> .cpan/CPAN/MyConfig.pm 1402 > echo "__END__" >> .cpan/CPAN/MyConfig.pm 1403 \end{verbatim} 1404 1405 %$ --- Emacs needs this to balance the previous dollar sign 1406 1407 Now you need to invoke \code{CPAN.pm} so it can walk you through 1408 configuring the rest of the required values. This is an example of 1409 one possible configuration with \code{CPAN.pm} version 1.8802. 1410 \textbf{Your version of CPAN.pm may present you with different 1411 prompts.} Use your common sense. If in doubt, it is generally safe 1412 to simply hit enter (and accept the default). 1413 1414 \begin{verbatim} 1415 > perl -MCPAN -e shell 1416 CPAN: File::HomeDir loaded ok 1417 Sorry, we have to rerun the configuration dialog for CPAN.pm due to 1418 the following indispensable but missing parameters: 1419 1420 build_cache, build_dir, cache_metadata, cpan_home, ftp_proxy, http_proxy, 1421 index_expire, inhibit_startup_message, keep_source_where, make_arg, 1422 make_install_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command, 1423 no_proxy, prerequisites_policy, scan_cache, urllist 1424 1425 1426 The following questions are intended to help you with the 1427 configuration. The CPAN module needs a directory of its own to cache 1428 important index files and maybe keep a temporary mirror of CPAN files. 1429 This may be a site-wide directory or a personal directory. 1430 1431 1432 1433 I see you already have a directory 1434 /home/moanui/jhoblitt/.cpan 1435 Shall we use it as the general CPAN build and cache directory? 1436 1437 CPAN build and cache directory? [/home/moanui/jhoblitt/.cpan] 1438 1439 1440 Unless you are accessing the CPAN via the filesystem directly CPAN.pm 1441 needs to keep the source files it downloads somewhere. Please supply a 1442 directory where the downloaded files are to be kept. [/home/moanui/jhoblitt/.cpan/sources] 1443 Directory where the build process takes place? [/home/moanui/jhoblitt/.cpan/build] 1444 1445 1446 How big should the disk cache be for keeping the build directories 1447 with all the intermediate files? 1448 1449 Cache size for build directory (in MB)? [100] 1450 1451 1452 The CPAN indexes are usually rebuilt once or twice per hour, but the 1453 typical CPAN mirror mirrors only once or twice per day. Depending on 1454 the quality of your mirror and your desire to be on the bleeding edge, 1455 you may want to set the following value to more or less than one day 1456 (which is the default). It determines after how many days CPAN.pm 1457 downloads new indexes. 1458 1459 Let the index expire after how many days? [1] 1460 1461 1462 By default, each time the CPAN module is started, cache scanning is 1463 performed to keep the cache size in sync. To prevent this, answer 1464 'never'. 1465 1466 Perform cache scanning (atstart or never)? [atstart] 1467 1468 1469 To considerably speed up the initial CPAN shell startup, it is 1470 possible to use Storable to create a cache of metadata. If Storable 1471 is not available, the normal index mechanism will be used. 1472 1473 Cache metadata (yes/no)? [yes] 1474 1475 1476 The CPAN module can detect when a module which you are trying to build 1477 depends on prerequisites. If this happens, it can build the 1478 prerequisites for you automatically ('follow'), ask you for 1479 confirmation ('ask'), or just ignore them ('ignore'). Please set your 1480 policy to one of the three values. 1481 1482 Policy on building prerequisites (follow, ask or ignore)? [ask] follow 1483 1484 1485 Every Makefile.PL is run by perl in a separate process. Likewise we 1486 run 'make' and 'make install' in separate processes. If you have 1487 any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to 1488 pass to the calls, please specify them here. 1489 1490 If you don't understand this question, just press ENTER. 1491 Parameters for the 'make' command? 1492 Typical frequently used setting: 1493 1494 -j3 # dual processor system 1495 1496 Your choice: [] 1497 Parameters for the 'make install' command? 1498 Typical frequently used setting: 1499 1500 UNINST=1 # to always uninstall potentially conflicting files 1501 1502 Your choice: [] UNINST=1 1503 1504 1505 The next questions deal with Module::Build support. 1506 1507 A Build.PL is run by perl in a separate process. Likewise we run 1508 './Build' and './Build install' in separate processes. If you have any 1509 parameters you want to pass to the calls, please specify them here. 1510 1511 Parameters for the './Build' command? 1512 Setting might be: 1513 1514 --extra_linker_flags -L/usr/foo/lib # non-standard library location 1515 1516 Your choice: [] 1517 Do you want to use a different command for './Build install'? 1518 Sudo users will probably prefer: 1519 1520 su root -c ./Build 1521 or 1522 sudo ./Build 1523 or 1524 /path1/to/sudo -u admin_account ./Build 1525 1526 or some such. Your choice: [./Build] 1527 Parameters for the './Build install' command? 1528 Typical frequently used setting: 1529 1530 --uninst 1 # uninstall conflicting files 1531 1532 Your choice: [] --uninst 1 1533 1534 1535 If you're accessing the net via proxies, you can specify them in the 1536 CPAN configuration or via environment variables. The variable in 1537 the $CPAN::Config takes precedence. 1538 1539 Your ftp_proxy? [] 1540 Your http_proxy? [] 1541 Your no_proxy? [] 1542 You have no /home/moanui/jhoblitt/.cpan/sources/MIRRORED.BY 1543 I'm trying to fetch one 1544 CPAN: LWP::UserAgent loaded ok 1545 Fetching with LWP: 1546 http://www.perl.org/CPAN/MIRRORED.BY 1547 1548 1549 Now we need to know where your favorite CPAN sites are located. Push 1550 a few sites onto the array (just in case the first on the array won't 1551 work). If you are mirroring CPAN to your local workstation, specify a 1552 file: URL. 1553 1554 First, pick a nearby continent and country by typing in the number(s) 1555 in front of the item(s) you want to select. You can pick several of 1556 each, separated by spaces. Then, you will be presented with a list of 1557 URLs of CPAN mirrors in the countries you selected, along with 1558 previously selected URLs. Select some of those URLs, or just keep the 1559 old list. Finally, you will be prompted for any extra URLs -- file:, 1560 ftp:, or http: -- that host a CPAN mirror. 1561 1562 (1) Africa 1563 (2) Asia 1564 (3) Central America 1565 (4) Europe 1566 (5) North America 1567 (6) Oceania 1568 (7) South America 1569 Select your continent (or several nearby continents) [] 5 1570 1571 (1) Bahamas 1572 (2) Canada 1573 (3) Mexico 1574 (4) United States 1575 Select your country (or several nearby countries) [] 4 1576 1577 (1) ftp://carroll.cac.psu.edu/pub/CPAN/ 1578 (2) ftp://cpan-du.viaverio.com/pub/CPAN/ 1579 (3) ftp://cpan-sj.viaverio.com/pub/CPAN/ 1580 (4) ftp://cpan.calvin.edu/pub/CPAN 1581 (5) ftp://cpan.cs.utah.edu/pub/CPAN/ 1582 (6) ftp://cpan.cse.msu.edu/ 1583 (7) ftp://cpan.erlbaum.net/CPAN/ 1584 (8) ftp://cpan.glines.org/pub/CPAN/ 1585 (9) ftp://cpan.hostrack.net/pub/CPAN 1586 (10) ftp://cpan.llarian.net/pub/CPAN/ 1587 (11) ftp://cpan.mirrors.redwire.net/pub/CPAN/ 1588 (12) ftp://cpan.mirrors.tds.net/pub/CPAN 1589 (13) ftp://cpan.netnitco.net/pub/mirrors/CPAN/ 1590 (14) ftp://cpan.pair.com/pub/CPAN/ 1591 (15) ftp://cpan.teleglobe.net/pub/CPAN 1592 (16) ftp://cpan.uchicago.edu/pub/CPAN/ 1593 40 more items, hit RETURN to show them 1594 Select as many URLs as you like (by number), 1595 put them on one line, separated by blanks, hyphenated ranges allowed 1596 e.g. '1 4 5' or '7 1-4 8' [] 14 11 12 1597 1598 Enter another URL or RETURN to quit: [] 1599 New set of picks: 1600 ftp://cpan.pair.com/pub/CPAN/ 1601 ftp://cpan.mirrors.redwire.net/pub/CPAN/ 1602 ftp://cpan.mirrors.tds.net/pub/CPAN 1603 1604 1605 Please remember to call 'o conf commit' to make the config permanent! 1606 1607 1608 cpan shell -- CPAN exploration and modules installation (v1.8802) 1609 ReadLine support enabled 1610 1611 cpan[1]> o conf commit 1612 commit: wrote '/home/moanui/jhoblitt/.cpan/CPAN/MyConfig.pm' 1613 \end{verbatim} 1614 1615 %$ --- Emacs needs this to balance the previous dollar sign 1616 1617 Now we need to install the module that installs the other modules. 1618 1619 \begin{verbatim} 1620 cpan> install Module::Build 1621 \end{verbatim} 1622 1623 Exit out of cpan: 1624 1625 \begin{verbatim} 1626 cpan> exit 1627 \end{verbatim} 1628 1629 In order to use of the installed modules, we need to setup an 1630 environment variable called \code{PERL5LIB} so that 'perl' can find 1631 them. To do this, we need to know where under 'perl5' our modules 1632 were actually installed. This will set variable with the version of 1633 Perl that you are using. The easiest way to do this is just just look 1634 in the root of the path where we did the install. 1635 1636 \begin{verbatim} 1637 > ls local/lib/perl5/ 1638 5.8.8 site_perl 1639 \end{verbatim} 1640 1641 That means we're using perl 5.8.8 and \code{PERL5LIB} needs to be 1642 setup as following: 1643 \begin{verbatim} 1644 export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.8 1645 \end{verbatim} 1646 1647 Now we should install the basic compliment of helper modules that 1648 \code{CPAN.pm} needs to function fully. Go back into CPAN (\code{perl 1649 -MCPAN -e shell}) and: 1650 1651 \begin{verbatim} 1652 cpan> install Bundle::CPAN 1653 \end{verbatim} 1654 1655 You can quit out of the CPAN shell at this point with the `exit` 1656 command or do the following few steps in another shell We're ready to 1657 install the full set Perl module dependencies for IPP software. In 1658 order to make this process a bit easier on the end user a "Bundle" 1659 module has been created. In order to use it you need to create a 1660 directory (if it doesn't already exist) called Bundle under your .cpan 1661 directory. 1662 1663 \begin{verbatim} 1664 > mkdir -p .cpan/Bundle 1665 \end{verbatim} 1666 1667 The file \code{PS.pm} should copied into this directory: 1668 1669 \begin{verbatim} 1670 cp /path/to/PS.pm .cpan/Bundle/ 1671 \end{verbatim} 1672 1673 Back in the CPAN shell, 'force' the install of the PS Bundle. The 1674 'force' keyword instructs the shell to ignore any tests failures. 1675 This is necessary as some of the modules 'DBD::mysql'/etc. require a 1676 properly working database setup in order for the tests to pass. You 1677 will most likely be prompted for input by several the modules. It is 1678 safe to answer with a carriage return to all questions. If it insists 1679 on a path to \code{httpd}, hit \code{CTRL-C} and it will go on to the 1680 next step. 1681 1682 \begin{verbatim} 1683 cpan> force install Bundle:PS 1684 \end{verbatim} 1685 1686 For further instructions on installing Perl modules from CPAN ''by 1687 hand', see: 1688 \begin{verbatim} 1689 http://www.cs.ucsc.edu/~you/notes/perl-module-install.html 1690 \end{verbatim} 767 1691 768 1692 After the dependencies (\S\ref{sec:dependencies}) have been satisfied, … … 790 1714 \item \code{config} 791 1715 \end{itemize} 792 793 \subsection{psconfig}794 795 \note{use the write-up in psconfig for this section}796 797 \begin{verbatim}798 * pscheckperl : search for and install, if needed, external Perl modules799 * pschecklibs : search for and install, if needed, external C libraries800 * psconfig : set up the UNIX shell environment801 * psbuild : build and install the software802 * psdist : build IPP distributions (requires CVS access)803 * tagsets : tables defining the C and Perl components to be built804 \end{verbatim}805 806 The IPP is a large and complex software system. A major goal of the807 IPP build system is to be user-friendly for those end users which do808 not have root access on their machines. Using the IPP build tools, it809 is possible to install the complete system as a non-priviledged user.810 The build system also makes it possible to maintain multiple811 simultaneous installations with different versions of the812 software. This latter feature is particularly important for developers813 who need to be able to make tests and comparisons of different814 versions.815 816 \subsubsubsection{UNIX environment}817 818 With the psconfig system, the complete collection of libraries and819 820 When building software821 822 \subsection{jhbuild}823 824 JH uses \code{jhbuild} even though the 'jh' in \code{jhbuild} doesn't825 really refer to him.826 827 \subsubsubsection{What is it?}828 829 According to the introduction on the \code{jhbuild} website:830 831 \begin{quote}832 \code{jhbuild} is a program that can be used to pull a number of833 modules from CVS and build them in the correct order. Unlike some834 build scripts, \code{jhbuild} lets you specify what modules you want835 built and it will then go and build those modules plus dependencies.836 837 Although \code{jhbuild} was originally developed to build838 \code{[WWW]Gnome}, it is now able to build a number of the modules in839 \code{freedesktop.org} CVS. Extending it to handle new modules is840 usually trivial (assuming the build infrastructure matches the other841 modules it handles).842 \end{quote}843 844 In additional to retrieving source code from various SCM's (CVS, SVN,845 arch, etc.), jhbuild has the ability to download tarballs via HTTP or846 FTP.847 848 \code{jhbuild} has been adopted as an official \code{freedesktop.org}849 project. You can find more information on the project's homepage850 (\code{http://www.freedesktop.org/Software/jhbuild}). Bugs can be851 filed in the Gnome Bugzilla (\code{http://bugzilla.gnome.org}).852 853 \subsubsubsection{Where to get it}854 855 It was necessary to slightly modify \code{jhbuild} for use with IPP856 software. Therefore, you must checkout the \code{jhbuild} module from857 the Pan-STARRS CVS tree. Please see the Pan-STARRS CVS Guide for help858 on setting up and using CVS. \code{jhbuild} will need to be able to859 find it's own source tree even after installation so you should choose860 a checkout path that can be permanent. Something along the lines of861 \code{$HOME/src} is recommended.862 863 \begin{verbatim}864 cd865 mkdir -p src866 cd src867 cvs co jhbuild868 \end{verbatim}869 870 After running CVS you should see something like this:871 872 \begin{verbatim}873 $ cvs co jhbuild874 cvs checkout: Updating jhbuild875 U jhbuild/.cvsignore876 U jhbuild/COPYING877 U jhbuild/ChangeLog878 U jhbuild/HACKING879 U jhbuild/Makefile880 U jhbuild/README881 U jhbuild/install-check.c882 .883 .884 \end{verbatim}885 886 \subsubsubsection{Installing jhbuild into your home directory}887 888 \code{jhbuild} should be installed locally under your home889 directory. This will require that you modify the \code{PATH}890 environment variable so that you can run jhbuild after it has been891 installed.892 893 \begin{verbatim}894 cd jhbuild895 make896 make install897 \end{verbatim}898 899 Which should look something like this:900 901 \begin{verbatim}902 $ make903 gcc -Wall -O2 -o install-check install-check.c904 Run "make install" to install.905 $ make install906 Creating /home/moanui/jhoblitt/bin/jhbuild907 Creating /home/moanui/jhoblitt/.gnome2/vfolders/applications/jhbuild.desktop908 install -m755 install-check /home/moanui/jhoblitt/bin/install-check909 install -m755 config.guess /home/moanui/jhoblitt/bin/config.guess910 \end{verbatim}911 912 That will install the \code{jhbuild} executable under913 \code{$HOME/bin}. You are responsible for including this path in your914 \code{PATH} environment variable. It is highly recommended that you915 add this to your \code{.bashrc} or equivalent shell login script.916 917 For the \code{bash} shell, place this line in your \code{.bashrc}:918 \begin{verbatim}919 export PATH=${HOME}/bin:${PATH}920 \end{verbatim}921 For the \code{tcsh} shell, place this line in your \code{.tschrc}:922 \begin{verbatim}923 setenv PATH ${HOME}/bin:${PATH}924 \end{verbatim}925 926 \subsubsubsection{Configuring jhbuild}927 928 \code{jhbuild} is configured via an rc file that lives at929 \code{${HOME}/.jhbuildrc}. Please note that this rc file is executed930 as Python code; be careful!931 932 Example \code{.jhbuildrc}, suitable for cut and paste:933 934 \begin{verbatim}935 # what profile to build?936 moduleset = 'http://pan-starrs.ifa.hawaii.edu/project/IPP/software/modulesets/ipp12.modules'937 938 # modules to build by default939 modules = [ 'pslib', 'psmodules' ]940 941 # where should working copies go?942 jhroot = os.environ['HOME'] + '/jhroot'943 944 # where should tarballs be kept?945 tarballdir = jhroot + '/src'946 947 # in what prefix should things be installed? (must be writable)948 target = os.popen('config.guess').read().rstrip()949 prefix = jhroot + '/' + target950 checkoutroot = prefix + '/build'951 952 # extra arguments to pass to the autogen.sh script?953 autogenargs = '--enable-maintainer-mode --disable-static'954 955 # use an alternative install program that preserves the956 # mtime on header files if they haven't changed. Speeds957 # up rebuilds.958 os.environ['INSTALL'] = os.environ['HOME'] + '/bin/install-check'959 960 # don't try to use /usr/ucb/cc on Solaris961 import sys962 if sys.platform == 'sunos5':963 os.environ['CC'] = 'gcc'964 \end{verbatim}965 966 \subsubsubsection{Running jhbuild}967 968 \code{Jhbuild} can be executed as \code{jhbuild build969 [modulename]}. Just \code{jhbuild} will build the packages specified970 in the \code{modules} variable from your rc file.971 \begin{verbatim}972 jhbuild973 \end{verbatim}974 or975 \begin{verbatim}976 jhbuild build pslib977 \end{verbatim}978 979 Run \code{jhbuild} list to get a list of the packages \code{jhbuild}980 knows how to build.981 982 \begin{verbatim}983 $ jhbuild list984 cfitsio985 gsl986 fftw987 libxml2988 mysql989 pslib990 psmodules991 \end{verbatim}992 993 \code{jhbuild} supports many other commands. Please see \code{jhbuild994 --help} for a complete list of options.995 996 \begin{verbatim}997 $ jhbuild --help998 usage: jhbuild [ -f config ] command [ options ... ]999 Build a set of CVS modules (such as GNOME).1000 1001 Global options:1002 -f, --file=CONFIG use a non default configuration file1003 -m, --moduleset=URI use a non default module set1004 --no-interact do not prompt for input1005 1006 Commands:1007 gui build targets from a gui app1008 update update from cvs1009 updateone modules update a fixed set of modules1010 build [ opts... ] [modules] update and compile (the default)1011 buildone [ opts... ] modules build a single module1012 tinderbox [ opts... ] build non-interactively with logging1013 run program [ args... ] run a command in the build environment1014 shell start a shell in the build environment1015 sanitycheck check that required support tools exists1016 bootstrap build required support tools1017 list [ opts ... ] [modules] list what modules would be built1018 dot [ modules ] output a dot file of dependencies suitable1019 for processing with graphviz1020 info modules... prints information about modules1021 1022 Options valid for the build, buildone, tinderbox and update commands:1023 -s, --skip=MODULES treat the given modules as up to date1024 -t, --start-at=MODULE start building at the given module1025 -D date_spec set a sticky date when checking out modules1026 1027 Options valid for the build, buildone and tinderbox commands:1028 -a, --autogen always run autogen.sh1029 -c, --clean run make clean before make1030 -n, --no-network skip cvs update1031 1032 Options valid for the tinderbox command:1033 -o, --output=DIR directory to save build logs in1034 1035 Options valid for the list command:1036 -r, --show-revision show which revision will be built1037 \end{verbatim}1038 1039 \subsubsubsection{Dependancies}1040 1041 \code{jhbuild} has a fairly minimal set of dependencies --- far less1042 than what may be required to actually compile and install any1043 packages. However, if your system can meet the base requirements,1044 \code{jhbuild} should be able to bootstrap your build environment.1045 \begin{itemize}1046 \item A working C compiler (eg. \code{gcc})1047 \item A working \code{libc} (eg. \code{glibc})1048 \item Perl 5 with the \code{XML::Parser} module (needed by1049 \code{libtool})1050 \item Python 2.?1051 \item Either \code{wget} or \code{curl}1052 \item GNU \code{M4} 1.41053 \item \code{tar}1054 \item \code{gzip}1055 \item \code{bzip2}1056 \end{itemize}1057 1058 \subsubsubsection{Bootstrapping}1059 1060 \code{jhbuild} has a limited ability to install some of the necessary1061 tools for maintaining software that configure its build environment1062 with the GNU autotools.1063 1064 This step is probably required on OSX and Solaris. Your mileage will1065 vary per Linux distribution but you can probably skip this step if1066 your distribution is around RedHat 9 vintage or newer.1067 1068 \begin{verbatim}1069 jhbuild bootstrap1070 \end{verbatim}1071 1072 \code{jhbuild} will then will begin to build a series of packages.1073 1074 \subsubsubsection{Using the jhbuild enviroment}1075 1076 As you've already seen, \code{jhbuild} is capable of setting up an1077 independent build environment under the (configurable) directory of1078 your choice. In order to link non-\code{jhbuild} management software1079 against this build environment a number of your shell's environment1080 variable have to be modified. \code{jhbuild} is capable of doing this1081 for you. The syntax for this is \code{jhbuild shell}, which as the1082 syntax implies, spawns a new shell with the proper environment1083 variables.1084 1085 This example demonstrates \code{jhbuild} setting up the dynamic1086 linkers default search path for you.1087 1088 \begin{verbatim}1089 $ echo $LD_LIBRARY_PATH1090 1091 $ jhbuild shell1092 $ echo $LD_LIBRARY_PATH1093 /home/moanui/jhoblitt/jhroot/i686-pc-linux-gnu/lib1094 \end{verbatim}1095 1096 %$ --- Emacs needs this to balance out the dollar signs1097 1098 A fair number of other variables are also adjusted for you. Enough so1099 that most (all?) \code{autoconf} configured software will be able to1100 find it's dependencies.1101 1102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1103 1104 \subsection{Aliases}1105 1106 PAP puts the following in his \code{~/.tcshrc}:1107 \begin{verbatim}1108 setenv SWDIR $HOME/local/`$HOME/bin/config.guess`/1109 if (! -d $SWDIR) mkdir --parents $SWDIR1110 alias ./autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'1111 alias autogen.sh './autogen.sh --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'1112 alias ./configure './configure --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'1113 alias configure './configure --prefix=$SWDIR CFLAGS="-I$SWDIR/include/ -g" LDFLAGS=-L$SWDIR/lib/'1114 setenv PATH ${PATH}:$SWDIR/bin/1115 setenv LD_LIBRARY_PATH $SWDIR/lib/:$SWDIR/lib/mysql:$LD_LIBRARY_PATH1116 setenv MANPATH $SWDIR/man:$MANPATH1117 setenv PKG_CONFIG_PATH $SWDIR/lib/pkgconfig/:$PKG_CONFIG_PATH1118 \end{verbatim}1119 1120 %$ --- Emacs needs this to balance out the dollar signs1121 1122 Here, \code{config.guess} is the common GNU script for guessing the1123 build system triplet (e.g., \code{i686-pc-linux-gnu}).1124 1125 There are a couple of notes:1126 \begin{itemize}1127 \item To compile a binary, simply do \code{./configure}, then1128 \code{make && make install}.1129 \item \code{Ohana} doesn't like this setup, so you need to build it1130 with: \code{\./configure --prefix=$SWDIR}1131 \item Perl modules can be installed: \code{./Build install1132 --prefix=$SWDIR}.1133 \end{itemize}1134 1135 \subsection{Manual Perl Module Installation}1136 1137 Here we describe setting up the Perl dependencies followed by the1138 IPP components.1139 1140 \subsubsection{Dependencies}1141 \label{sec:installing-perl-dependencies}1142 1143 If you have access to the \code{root} account, installation as1144 \code{root} is much easier. If not, you will have to go through1145 the more flaky installation as an unprivileged user.1146 1147 \subsubsubsection{Installation as root}1148 1149 Many of the Perl dependencies are available from the Comprehensive1150 Perl Archive Network (CPAN) at www.cpan.org. If you have root access1151 on your target machines, they can be very simply retrieved, built and1152 installed (replacing \code{MODULE_NAME} for each module):1153 1154 \begin{verbatim}1155 > su -1156 Password:1157 > cpan1158 [...]1159 cpan> install MODULE_NAME1160 [...]1161 cpan> quit1162 \end{verbatim}1163 1164 Follow the prompts. It's usually safe to accept the default (simply1165 hit enter) in response to most questions.1166 1167 If you get into trouble, try: \code{force install MODULE_NAME}.1168 1169 You can also try to use the \code{Bundle::PS} as described below if1170 you're feeling adventurous.1171 1172 \subsubsubsection{Installation as unprivileged user}1173 1174 To install modules from CPAN with the \code{CPAN.pm} interface, you1175 need to setup a CPAN configuration file in your home directory. Then1176 \code{CPAN.pm} can walk you through setting up the most important1177 configuration values. Unfortunately, there is some variation in the1178 behavior of the various versions of \code{CPAN.pm} that have shipped1179 with Perl. Some (most) of these variants will not correctly create a1180 configuration files that allows a non-\code{root} user to install1181 modules outside of "system" paths. In order to make sure that you get1182 a "correct" CPAN configuration file you need to ``prime'' it with a1183 few values.1184 1185 First you need to create the directory in which the CPAN configuration file will live.1186 \begin{verbatim}1187 > mkdir -p .cpan/CPAN/1188 \end{verbatim}1189 1190 Then we need to create a partial configuration file. Note that this example1191 assumes that you want to install your perl modules under1192 \code{$HOME/local/lib/perl5}.1193 1194 \begin{verbatim}1195 > echo "\$CPAN::Config = {" >> .cpan/CPAN/MyConfig.pm1196 > echo " makepl_arg => q[PREFIX=$HOME/local/]," >> .cpan/CPAN/MyConfig.pm1197 > echo " mbuildpl_arg => q[--install_base $HOME/local/]," >> .cpan/CPAN/MyConfig.pm1198 > echo "};" >> .cpan/CPAN/MyConfig.pm1199 > echo "1;" >> .cpan/CPAN/MyConfig.pm1200 > echo "__END__" >> .cpan/CPAN/MyConfig.pm1201 \end{verbatim}1202 1203 %$ --- Emacs needs this to balance the previous dollar sign1204 1205 Now you need to invoke \code{CPAN.pm} so it can walk you through1206 configuring the rest of the required values. This is an example of1207 one possible configuration with \code{CPAN.pm} version 1.8802.1208 \textbf{Your version of CPAN.pm may present you with different1209 prompts.} Use your common sense. If in doubt, it is generally safe1210 to simply hit enter (and accept the default).1211 1212 \begin{verbatim}1213 > perl -MCPAN -e shell1214 CPAN: File::HomeDir loaded ok1215 Sorry, we have to rerun the configuration dialog for CPAN.pm due to1216 the following indispensable but missing parameters:1217 1218 build_cache, build_dir, cache_metadata, cpan_home, ftp_proxy, http_proxy,1219 index_expire, inhibit_startup_message, keep_source_where, make_arg,1220 make_install_arg, mbuild_arg, mbuild_install_arg, mbuild_install_build_command,1221 no_proxy, prerequisites_policy, scan_cache, urllist1222 1223 1224 The following questions are intended to help you with the1225 configuration. The CPAN module needs a directory of its own to cache1226 important index files and maybe keep a temporary mirror of CPAN files.1227 This may be a site-wide directory or a personal directory.1228 1229 1230 1231 I see you already have a directory1232 /home/moanui/jhoblitt/.cpan1233 Shall we use it as the general CPAN build and cache directory?1234 1235 CPAN build and cache directory? [/home/moanui/jhoblitt/.cpan]1236 1237 1238 Unless you are accessing the CPAN via the filesystem directly CPAN.pm1239 needs to keep the source files it downloads somewhere. Please supply a1240 directory where the downloaded files are to be kept. [/home/moanui/jhoblitt/.cpan/sources]1241 Directory where the build process takes place? [/home/moanui/jhoblitt/.cpan/build]1242 1243 1244 How big should the disk cache be for keeping the build directories1245 with all the intermediate files?1246 1247 Cache size for build directory (in MB)? [100]1248 1249 1250 The CPAN indexes are usually rebuilt once or twice per hour, but the1251 typical CPAN mirror mirrors only once or twice per day. Depending on1252 the quality of your mirror and your desire to be on the bleeding edge,1253 you may want to set the following value to more or less than one day1254 (which is the default). It determines after how many days CPAN.pm1255 downloads new indexes.1256 1257 Let the index expire after how many days? [1]1258 1259 1260 By default, each time the CPAN module is started, cache scanning is1261 performed to keep the cache size in sync. To prevent this, answer1262 'never'.1263 1264 Perform cache scanning (atstart or never)? [atstart]1265 1266 1267 To considerably speed up the initial CPAN shell startup, it is1268 possible to use Storable to create a cache of metadata. If Storable1269 is not available, the normal index mechanism will be used.1270 1271 Cache metadata (yes/no)? [yes]1272 1273 1274 The CPAN module can detect when a module which you are trying to build1275 depends on prerequisites. If this happens, it can build the1276 prerequisites for you automatically ('follow'), ask you for1277 confirmation ('ask'), or just ignore them ('ignore'). Please set your1278 policy to one of the three values.1279 1280 Policy on building prerequisites (follow, ask or ignore)? [ask] follow1281 1282 1283 Every Makefile.PL is run by perl in a separate process. Likewise we1284 run 'make' and 'make install' in separate processes. If you have1285 any parameters (e.g. PREFIX, LIB, UNINST or the like) you want to1286 pass to the calls, please specify them here.1287 1288 If you don't understand this question, just press ENTER.1289 Parameters for the 'make' command?1290 Typical frequently used setting:1291 1292 -j3 # dual processor system1293 1294 Your choice: []1295 Parameters for the 'make install' command?1296 Typical frequently used setting:1297 1298 UNINST=1 # to always uninstall potentially conflicting files1299 1300 Your choice: [] UNINST=11301 1302 1303 The next questions deal with Module::Build support.1304 1305 A Build.PL is run by perl in a separate process. Likewise we run1306 './Build' and './Build install' in separate processes. If you have any1307 parameters you want to pass to the calls, please specify them here.1308 1309 Parameters for the './Build' command?1310 Setting might be:1311 1312 --extra_linker_flags -L/usr/foo/lib # non-standard library location1313 1314 Your choice: []1315 Do you want to use a different command for './Build install'?1316 Sudo users will probably prefer:1317 1318 su root -c ./Build1319 or1320 sudo ./Build1321 or1322 /path1/to/sudo -u admin_account ./Build1323 1324 or some such. Your choice: [./Build]1325 Parameters for the './Build install' command?1326 Typical frequently used setting:1327 1328 --uninst 1 # uninstall conflicting files1329 1330 Your choice: [] --uninst 11331 1332 1333 If you're accessing the net via proxies, you can specify them in the1334 CPAN configuration or via environment variables. The variable in1335 the $CPAN::Config takes precedence.1336 1337 Your ftp_proxy? []1338 Your http_proxy? []1339 Your no_proxy? []1340 You have no /home/moanui/jhoblitt/.cpan/sources/MIRRORED.BY1341 I'm trying to fetch one1342 CPAN: LWP::UserAgent loaded ok1343 Fetching with LWP:1344 http://www.perl.org/CPAN/MIRRORED.BY1345 1346 1347 Now we need to know where your favorite CPAN sites are located. Push1348 a few sites onto the array (just in case the first on the array won't1349 work). If you are mirroring CPAN to your local workstation, specify a1350 file: URL.1351 1352 First, pick a nearby continent and country by typing in the number(s)1353 in front of the item(s) you want to select. You can pick several of1354 each, separated by spaces. Then, you will be presented with a list of1355 URLs of CPAN mirrors in the countries you selected, along with1356 previously selected URLs. Select some of those URLs, or just keep the1357 old list. Finally, you will be prompted for any extra URLs -- file:,1358 ftp:, or http: -- that host a CPAN mirror.1359 1360 (1) Africa1361 (2) Asia1362 (3) Central America1363 (4) Europe1364 (5) North America1365 (6) Oceania1366 (7) South America1367 Select your continent (or several nearby continents) [] 51368 1369 (1) Bahamas1370 (2) Canada1371 (3) Mexico1372 (4) United States1373 Select your country (or several nearby countries) [] 41374 1375 (1) ftp://carroll.cac.psu.edu/pub/CPAN/1376 (2) ftp://cpan-du.viaverio.com/pub/CPAN/1377 (3) ftp://cpan-sj.viaverio.com/pub/CPAN/1378 (4) ftp://cpan.calvin.edu/pub/CPAN1379 (5) ftp://cpan.cs.utah.edu/pub/CPAN/1380 (6) ftp://cpan.cse.msu.edu/1381 (7) ftp://cpan.erlbaum.net/CPAN/1382 (8) ftp://cpan.glines.org/pub/CPAN/1383 (9) ftp://cpan.hostrack.net/pub/CPAN1384 (10) ftp://cpan.llarian.net/pub/CPAN/1385 (11) ftp://cpan.mirrors.redwire.net/pub/CPAN/1386 (12) ftp://cpan.mirrors.tds.net/pub/CPAN1387 (13) ftp://cpan.netnitco.net/pub/mirrors/CPAN/1388 (14) ftp://cpan.pair.com/pub/CPAN/1389 (15) ftp://cpan.teleglobe.net/pub/CPAN1390 (16) ftp://cpan.uchicago.edu/pub/CPAN/1391 40 more items, hit RETURN to show them1392 Select as many URLs as you like (by number),1393 put them on one line, separated by blanks, hyphenated ranges allowed1394 e.g. '1 4 5' or '7 1-4 8' [] 14 11 121395 1396 Enter another URL or RETURN to quit: []1397 New set of picks:1398 ftp://cpan.pair.com/pub/CPAN/1399 ftp://cpan.mirrors.redwire.net/pub/CPAN/1400 ftp://cpan.mirrors.tds.net/pub/CPAN1401 1402 1403 Please remember to call 'o conf commit' to make the config permanent!1404 1405 1406 cpan shell -- CPAN exploration and modules installation (v1.8802)1407 ReadLine support enabled1408 1409 cpan[1]> o conf commit1410 commit: wrote '/home/moanui/jhoblitt/.cpan/CPAN/MyConfig.pm'1411 \end{verbatim}1412 1413 %$ --- Emacs needs this to balance the previous dollar sign1414 1415 Now we need to install the module that installs the other modules.1416 1417 \begin{verbatim}1418 cpan> install Module::Build1419 \end{verbatim}1420 1421 Exit out of cpan:1422 1423 \begin{verbatim}1424 cpan> exit1425 \end{verbatim}1426 1427 In order to use of the installed modules, we need to setup an1428 environment variable called \code{PERL5LIB} so that 'perl' can find1429 them. To do this, we need to know where under 'perl5' our modules1430 were actually installed. This will set variable with the version of1431 Perl that you are using. The easiest way to do this is just just look1432 in the root of the path where we did the install.1433 1434 \begin{verbatim}1435 > ls local/lib/perl5/1436 5.8.8 site_perl1437 \end{verbatim}1438 1439 That means we're using perl 5.8.8 and \code{PERL5LIB} needs to be1440 setup as following:1441 \begin{verbatim}1442 export PERL5LIB=$HOME/local/lib/perl5/5.8.8:$HOME/local/lib/perl5/site_perl/5.8.81443 \end{verbatim}1444 1445 Now we should install the basic compliment of helper modules that1446 \code{CPAN.pm} needs to function fully. Go back into CPAN (\code{perl1447 -MCPAN -e shell}) and:1448 1449 \begin{verbatim}1450 cpan> install Bundle::CPAN1451 \end{verbatim}1452 1453 You can quit out of the CPAN shell at this point with the `exit`1454 command or do the following few steps in another shell We're ready to1455 install the full set Perl module dependencies for IPP software. In1456 order to make this process a bit easier on the end user a "Bundle"1457 module has been created. In order to use it you need to create a1458 directory (if it doesn't already exist) called Bundle under your .cpan1459 directory.1460 1461 \begin{verbatim}1462 > mkdir -p .cpan/Bundle1463 \end{verbatim}1464 1465 The file \code{PS.pm} should copied into this directory:1466 1467 \begin{verbatim}1468 cp /path/to/PS.pm .cpan/Bundle/1469 \end{verbatim}1470 1471 Back in the CPAN shell, 'force' the install of the PS Bundle. The1472 'force' keyword instructs the shell to ignore any tests failures.1473 This is necessary as some of the modules 'DBD::mysql'/etc. require a1474 properly working database setup in order for the tests to pass. You1475 will most likely be prompted for input by several the modules. It is1476 safe to answer with a carriage return to all questions. If it insists1477 on a path to \code{httpd}, hit \code{CTRL-C} and it will go on to the1478 next step.1479 1480 \begin{verbatim}1481 cpan> force install Bundle:PS1482 \end{verbatim}1483 1484 For further instructions on installing Perl modules from CPAN ''by1485 hand', see:1486 \begin{verbatim}1487 http://www.cs.ucsc.edu/~you/notes/perl-module-install.html1488 \end{verbatim}1489 1716 1490 1717 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note:
See TracChangeset
for help on using the changeset viewer.
