Installing Fink Cernlib And G77 For Mac

Of course, you need to install X11 beforehand.

  1. Installing Fink Cernlib And G77 For Macbook Pro
  2. Installing Fink Cernlib And G77 For Mac Osx

Preparation: lapack

There is an impressive number of applications you can install via fink. Fink was designed carefully as to not disturb or modify the system. It can be uninstalled with a single command 'sudo rm -r /sw' You definitely want f77, imagemagick, ghostscript for X, ispell, xdvi, and gimp if you want to edit graphics or xv to preview them. The purpose of this fork is to bring up support for building CERNLIB on modern Linux systems with modern GNU compiler toolchain. This setup has been tested on Ubuntu 12.04, gfortran 4.6.3. Dependencies sudo apt-get install xutils-dev libmotif-dev libxt-dev libxft-dev 32-bit build. Run build32 choosing which version to build - 2005 or 2006.

  1. FinkCommander is a graphical user interface for the Fink software packaging system for Mac OS X. It provides an intuitive front-end to the Fink command-line tools for downloading and installing Unix software.
  2. Because of the free-cost and high quality of the gnu copmpilers, a significant amount of software has been developed for and compiled with the g77 compiler. A tar file of the final realease of g77 compiled for OS X exists at High Performance Computing for Mac OS X. Download g77-intel-bin.tar.gz (Intel Mac only) or g77-bin.tar.gz (PowerPC only).

Notice that as of CERNLIB v.2001, lapack routines have been removed from mathlib. You thus need to install the lapack and blas libraries:
# rpm -Uvh lapack-3.0-12c.ppc.rpm
# rpm -Uvh blas-3.0-12c.ppc.rpm

My experiences in installing IPOPT on Mac OS X by Peter Carbonetto Dept. Of Computer Science. A lot of people are upset that the GNU Fortran compiler g77 was not included with the Apple Developer Tools because installing it ourselves causes many extra headaches. But we'll have to make do. Another route is to install g77 via Fink.

In addition if you want to use paw++, you need OpenMotif libraries:
# rpm -Uvh OpenMotif-2.2.2-1a.ppc.rpm
# rpm -Uvh OpenMotif-devel-2.2.2-1a.ppc.rpm
If you just want to use precompiled binary packages, go directly to Installation subsection.

Installing

CERNLIB-2003 Building Procedure

Compilation Conditions Installing Fink Cernlib And G77 For Mac
MacOS X Release 10.3
gcc-with-g77-1495-2b
Libcompat-14.1-2c
lapack-3.0-12c
blas-3.0-12c
OpenMotif-2.2.2-1a
InstallingNotice that as of CERNLIB v.2001, lapack routines have been removed from mathlib. One thus need to install the lapack and blas libraries as indicated above.

[0] Preparation

Installing fink cernlib and g77 for macbook pro

# cd /
# rm cern
# ln -s /Users/cernlib cern
# cd /cern
# for i in `ls <somewhere>/src_*.tar.gz`; do tar -zxvf $i; done

# cp <somewhere>/Inaccessible 2003/src
# ln -s 2003 new
# ln -s 2003 pro
# mkdir -p 2003/work
# chown fujiik:jlc 2003/work
# chown fujiik:jlc 2003
# cd 2003/src
# patch -p1 -s < <somewhere>/cernlib-2003-macosx.patch
# patch -p1 -s < <somewhere>/cernlib-2003-macosx.10.3.patch
# patch -p1 -s < <somewhere>/cernlib-2003-macosx.O0.patch

# exit

where the last patch is to compile everything with -O0 (no optimization) for safety, though the situation with the tests described below was unaffected even without it.
Notice that the first patch has also been updated because of the following problems:

  1. The dlsym function in the system default libdl.dylib now looks for a symbol in the given dylib after putting a leading underscore to the symbol. This is the standard behavior, but different from that of the old dlcompat package for 10.2.The previous patch to pawlib/comis/code/csaddr.F became thus obsolete.
  2. The test programs for mclibs/lepto63 (demo.F, demo2.F) had to be patched to declare the lepto63 block data (LEPTOD) to be EXTERNAL. Otherwise, the block data would remain uninitialized and the program get in an infinite loop.

Installing Fink Cernlib And G77 For Macbook Pro

Project igi 3 game cracked. [1] Build

$ cd /cern/2003/
$ chown fujiik lib

$ ln -s /usr/local/lib/liblapack.a lib/liblapack3.a

$ ln -s /usr/local/lib/libblas.a lib/.

$ cd work

$ export CVSCOSRC=/cern/2003/src
$ mkdir ./bin

$ cp $CVSCOSRC/scripts/cernlib ./bin/
$ $CVSCOSRC/config/imake_boot
$ mkdir ./logs

$ make tree HAVE_MOTIF='YES' >& ./logs/tree.log &
$ tail -f ./logs/tree.log
^C
$ pushd packlib/kuip/programs/kuipc
$ make
$ make install.bin
$ popd
$ make HAVE_MOTIF='YES' >& ./logs/make.log &

$ tail -f ./logs/make.log
^C
$ cd packlib

$ make install.bin HAVE_MOTIF='YES' >& ././logs/packlib.bin.log &
$ tail -f ././logs/packlib.bin.log
$ cd ./pawlib

$ make install.bin HAVE_MOTIF='YES' >& ././logs/pawlib.bin.log &
$ tail -f ././logs/pawlib.bin.log
$ cd ./graflib

$ make install.bin HAVE_MOTIF='YES' >& ././logs/graflib.bin.log &
$ tail -f ././logs/graflib.bin.log
$ cd ./scripts

$ make install.bin HAVE_MOTIF='YES' >& ././logs/scripts.bin.log &
$ tail -f ././logs/scripts.bin.log
$ cd .
$ make install.include CERN_INCLUDEDIR=/cern/new/include
>& ./logs/install.include.log &
$ tail -f ./logs/install.include.log

[2] Tests

$ cd packlib
$ make test >& ././logs/packlib.test.log &
$ tail -f ././logs/packlib.test.log
ALL TESTS PASSED
$ cd ./mathlib
$ make test >& ././logs/mathlib.test.log &
$ tail -f ././logs/mathlib.test.log
ALL TESTS but C327 PASSED
$ cd ./graflib/higz/examples
$ make higzex
$ ./higzex
OK!
$ cd ././././src/pawlib/paw/demo
$ paw all.kumac
..
go
..
OK!
$ cd ././././work/mclibs
$ make test >& ././logs/mclibs.test.log &
$ tail -f ././logs/mclibs.test.log
ALL TESTS PASSED
$ cd ./phtools

$ make test >& ././logs/phtools.test.log &
$ tail -f ././logs/phtools.test.log
ALL TESTS PASSED
$ cd ./geant321

$ make test >& ././logs/geant321.test.log &
$ tail -f ././logs/geant321.test.log
ALL TESTS PASSED

[3] Aftermath

# cd /home/cernlib
# chown -R root:wheel *
# mkdir 2003/tgz
# tar -zcvf 2003/tgz/cernlib-2003-bin.tar.gz 2003/bin
# tar -zcvf 2003/tgz/cernlib-2003-lib.tar.gz 2003/lib
# tar -zcvf 2003/tgz/cernlib-2003-include.tar.gz 2003/include

Installation of Binary Packages

CERNLIB

Installing Fink Cernlib And G77 For Mac Osx

To install, just expand the tarballs in whatever directory you want, for instance:

# ls <somewhere>
cernlib-2003-bin.tar.gz
cernlib-2003-include.tar.gz
cernlib-2003-lib.tar.gz
# mkdir /cern
# for i in <somewhere>/*; do tar -zxpvf $i -C /cern; done
# ln -s 2003 /cern/pro

Dis45

# rpm -Uvh <somewhere>/dis45-1.36-3d.ppc.rpm

Topdrawer

# rpm -Uvh <somewhere>/tdr-1.7-2c.ppc.rpm
Installing Fink Cernlib And G77 For Mac or
# rpm -Uvh <somewhere>/topdraw-1.4d-1d.ppc.rpm
Back to Keisuke Fujii's HEP on X Page keisuke.fujii@kek.jp January13, 2004