CERNLIB, Dis45, and TDR on MacOS X

Of course, you need to install X11 (XFree86 or Xtools) beforehand.

Preparation: libdl (dlopen, ...) by Christoph Pfisterer

MacOS X does not support SysV style dynamic loading facility like dlopen, etc., though the source package of cctools contains a wrapper for SysV compatibility. Christoph Pfisterer improved it to allow runtime setting of library search path via LD_LIBRARY_PATH.

# rpm -ivh dlcompat-20010123-2a.ppc.rpm

CERNLIB-2000

Compilation Conditions
 MacOS X Release 10.0.01
 make-3.78.1-1b
 gcc-with-932.1-1a
 Libcompat-14.1-2a
 dlcompat-20010123-2a
Notice that building of CERNLIB requires an older version of make, since make-3.79 does not allow null string in strip directive.

[0] Preparation

# cd /
# rm cern
# ln -s /home/cernlib cern
# cd /cern
# for i in `ls <somewhere>/src_*.tar.gz`; do tar -zxvf $i; done
# ln -s 2000 new
# ln -s 2000 pro
# mkdir -p 2000/work
# chown fujiik:jlc 2000/work
# chown fujiik:jlc 2000
# cd src
# patch -p1 -s < <somewhere>/cernlib-2000-macosx.patch

[1] Build

$ cd /cern/2000/work
$ mkdir logs
$ export CVSCOSRC=/cern/2000/src
$ cp $CVSCOSRC/scripts/cernlib ../bin
$ CVSCOSRC/config/imake_boot
$ make tree HAVE_MOTIF='YES' >& ../logs/tree.log &
$ tail -f ../logs/tree.log
^C
$ cd packlib/kuip/programs/kuipc
$ make
$ make install.bin
$ cd /cern/2000/work$ make HAVE_MOTIF='YES' >& ../logs/make.log &
$ tail -f ../logs/make.log$ 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
$ su
# rpm -ivh <somewhere>/patchy-*.ppc.rpm
# exit
$ cd patchy
$ PATH=.:$PATH make install.bin HAVE_MOTIF='YES' >& ../../logs/patchy.bin.log &
$ tail -f ../../logs/patchy.bin.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!
        but remember you remove lepto63 from testlibdir.
$ 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 2000/tgz
# tar -zcvf 2000/tgz/cernlib-2000-bin.tar.gz 2000/bin
# tar -zcvf 2000/tgz/cernlib-2000-lib.tar.gz 2000/lib
# tar -zcvf 2000/tgz/cernlib-2000-include.tar.gz 2000/include
# tar -zcvf 2000/tgz/cernlib-2000-share.tar.gz 2000/share
 

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

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

Dis45

# rpm -ivh <somewhere>/readline-4.1-8b.ppc.rpm
# rpm -ivh <somewhere>/ncurses-5.0-10b.ppc.rpm
# rpm -ivh <somewhere>/dis45-1.36-3b.ppc.rpm

Topdrawer

# rpm -ivh <somewhere>/tdr-1.7-2a.ppc.rpm


Back to Keisuke Fujii's HEP on X Page
fujiik@jlcuxf.kek.jp March 18, 2001