Instructions for Installing the OSG Client on Mac OS/X

From GlueXWiki
Revision as of 09:39, 31 December 2012 by Jonesrt (Talk | contribs) (Installation of pacman)

Jump to: navigation, search

This page gives guidance to Mac OS/X users on how to install and configure the grid tools and libraries, and integrate them for running GlueX offline software. The reader is assumed to have sysadmin privileges on the target Mac OS/X machine, and to be familiar with standard command-line package installation procedures for Darwin platforms. The installation proceeds in several distinct stages.

Installation of the Xcode developer suite

The Xcode software development suite includes copies of the gnu c/c++ compilers and associated libraries that have been tweaked by Apple for the Darwin platform. If you have done any software development on your Mac, you probably have already installed this. If not, there is abundant help out there on the web for how to download and install it. It is downloaded from the Apple Appstore, but costs nothing. You are required to sign up as an Apple Developer before you can download the package. You might wonder why you have to install this bundle if (see below) in a few minutes you are going to install a more complete compiler suite that includes the gfortran compiler and libraries. Part of the answer lies in the fact that by becoming an "Apple Developer" you respect Apple licensing restrictions in the use of these compilers. Presumably that also covers you for any other versions of the compilers and libraries that you download and install later.

Installation of the apt package installer

You are probably familiar with the well-known open source software distribution and installation tool called Fink. However the Fink repository does not include the OSG Client stack, nor anything else that you need to run GlueX software. Instead, there are two other package installers that are recommended here: apt and pacman. Users familiar with common Linux distributions will recognize apt/dpkg as the Debian equivalent of Redhat's yum/rpm. HEP researcher Taizo Kobayashi has created an equivalent to apt for Mac OSX called OSXWS (Mac OS/X WorkShop) and his colleague Keisuke Fujii maintains an up-to-date OSXWS repository for common HEP/NP software and tools. You can browse his apt package tree to see all of the releases of OS/X that his repository covers. All software installed by the apt tool goes into the /usr/osxws tree, so no software already installed on your system will be overwritten. To install OSXWS on your system, please select the package corresponding to your OS release from the list below.

Once installed, the apt tool will automatically recognize which OS/X release you are running and fetch its downloads from the appropriate branch of the dpkg tree. You might notice that binary distributions of cernlib, geant4, etc. are available for immediate installation using apt-get. You are free to install any of these that you might find useful, but this is not necessary. The GlueX grid tools will download, build, and install specific revisions of these libraries that are known to work with GlueX offline software. All that is needed in this step is the apt tool itself.

Update of the gcc/gfortran/g++ compiler bundle

From Keisuke Fujii's web site:

gcc-4.X that comes with Apple's standard DevTools does not include "gfortran", the GNU fortran 95 compiler. Although its source tree does include one, building gfortran from Apple's source tree requires some patching to satisfy undefined references caused by Apple's modifications that broke Language independence. Moreover, the gfortran source files are not up-to-date and require a lot of patching to be usable: I had been using the patched versions for some time but recently switched to a more recent version gcc-4.Y. In order to make gcc-4.Y coexist with Apple's gcc-4.X, I decided to configure gcc-4.Y to be installed under /usr/osxws together with other "MacOSX WorkShop" packages.

In the previous step you installed the OSXWS apt tool on your system. Now you can use it to install a version of the gcc compiler suite that includes a version of gfortran that works on Mac OS/X. This is necessary in order to build applications from a mixture of c/c++ and fortran sources. From a terminal window, enter the following commands.

$ su
# apt-get update
# apt-get imake openMotif-devel Libcompat
# apt-get install gcc 
# apt-get clean
# exit

If you open a new shell, you should see the new compilers appearing first in your path. For more information about a few idiosyncrasies of the gfortran compiler on the Mac, see REMARKS.

Installation of pacman

The packages installed so far have prepared your system to build and run GlueX offline software on your local machine in an environment identical to what is present when it runs on the grid. This will be essential when you are testing your application before submitting it to run on the grid, or when you are trying to understand what went wrong with a grid job. What remains is to install the applications that you will use to access grid resources. At the present time, the best way to install the OSG grid client is using the pacman package manager.

Installation of the VDT 2.0 OSG Client package