Garfield on MacOS X

Preparation

Install gfortran and cernlib following the instructions given in the GFORTRAN page and the CERNLIB page, if you haven't. In addition you need to install patchy to build Garfield. Install it as follows, after you installed CERNLIB.

$ su
# apt-get update

# apt-get install patchy-symlinks
# apt-get clean

If you just want to use precompiled binary packages, go directly to Installation subsection.

Garfield-9 Building Procedure

Compilation Conditions
 MacOS X Release 10.6.6
 gcc-4.5.1-4osx10.6
 Libcompat-14.1-10.6hepx12b
 cernlib-2006-10.6hepx1d
 patchy-4.15-10.6hepx1a

Garfield-9 source files are made into a SRPM package, which can be expanded, examined, and rebuilt as needed to rebuild a binary RPM package.
You can get and expand the SRPM by typing

$ su
# apt-get update
# exit
$ cd ~/rpm/SRPMS/

$ apt-get source garfield
$
rpm -i garfield-9.25-10.6hepx1e.src.rpm

The SPEC file (garfield.spec) will be put into ~/rpm/SPECS and the source tarball and patches will be put into ~/rpm/SOURCES. Take a look at the SPEC file to see how to build garfield manually.
In order to rebild the binary package, do

$ cd ~/rpm/SPECS
$ rpmbuild -ba garfield.spec >& garfield.log &
$ tail -f garfield.log

..........
^C

which will prouduce a binary RPM package in ~/rpm/RPMS/i386/.

Installation of Binary Packages

Garfield

# apt-get update
# apt-get install garfield
# apt-get clean

By default garfield-9 will be installed under /cern. Add /cern/pro/bin to your PATH in order to use garfield-9.


Back to Keisuke Fujii's HEP on X Page
keisuke.fujii@kek.jp March 08, 2010