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.5
 gcc-4.3.0-10.5hepx1a
 Libcompat-14.1-10.5hepx1a
 cernlib-2006-10.5hepx1a
 patchy-4.15-10.5hepx1a

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.11-10.5hepx1a.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/ or in ~/rpm/RPMS/ppc/, depending on the processor architecture of your machine.

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 26, 2008