JLC Computing on MacOS X
Preparation
# cp /usr/local/lib/gcc-lib/ppc/2.95.2/g2c.h /usr/local/include
# ln -s g2c.h /usr/local/include/f2c.h
$ export CVS_RSH=ssh
$ export CVSROOT=jlclogin:/proj/soft/CVSMASTER
$ export CERN_ROOT=/cern/pro
$ export ROOTSYS=/opt/root/pro
$ export LCLIBROOT=/proj/soft/lclib/pro
$ export JSFROOT=/proj/soft/jsf/pro
$ export LD_LIBRARY_PATH=$ROOTSYS/lib:$JSFROOT/lib:
$ export PATH=$PATH:$ROOTSYS/bin:$LCLIBROOT/bin:$JSFROOT/bin
LCLIB
$ cd /proj/soft/lclib
$ cvs checkout lclib
$ mv lclib 2000-1
$ ln -s 2000-1 pro
$ cd pro
$ vi config/lclib.tmpl
.... added ifdef section for MacOSX
$ vi gen/Makefile
....
SHELL = /bin/bash # zsh didn't work
....
$ vi util/Makefile
....
SHELL = /bin/bash # zsh didn't work
....
$ vi util/tbschk/termlib.c
....
#ifdef __DARWIN__
#include "ncurses/curses.h"
#else
#include "curses.h"
#endif
$ vi util/lcful/src/prblk1.F
---> presta and prrsta added to force ld to link these
commons, otherwise they became undefined upon linking of JSF
$ make
JSF
First get current JSF source files via CVS:
$ cd /proj/soft/jsf
$ cvs checkout jsf
$ mv jsf 1-16
$ ln -s 1-16 pro
$ cd pro
At this point, I had to make some modifications which include:
- conf/makejsf.tmpl : MacOSX configs
SOEXT ---> so even for MacOSX (for bundle)
DllSuf ---> $(SOEXT)
DylibSuf ---> so, sl, or dylib (for shared libs)
DYLDFLAGS ---> for shared libs
= -dylib
-r -nostartfiles (for MacOSX)
SOFLAGS ---> for dynamically loadable modules (for bundle)
= -bundle
-undefined suppress (for MacOSX)
- conf/makespec : remove \n
- src/Imakefile
DllSuf ---> DylibSuf
SOFLAGS ---> DYLDFLAGS
- src/JSFGenerator.cxx
Always create fParticles in ctor
- src/JSFHelicalTrack.h
Remove static keyword from local vector objects defined
in inline member functions: otherwise, the compiler abends with "Can't
emit relocs" errors:-(
- src/JSFHelicalTrack.cxx
Added "static" to local globals
- src/JSFReadGenerator.{h,cxx}, JSFSIMDST.{h,cxx}
vector-new is incompatible with big local arrays:-(
---> Had to separate array definitions and and vector-new by
preparing private interface methods: otherwise I internal compiler error,
saying something is out of range.
This must be a compiler bug!
- src/JSFFULLGenerator.h
fSpring --> //! or LinkDef.h as a temporary remedy
ROOT V3 like Streamer does not work.
- src/jsfmain.cxx
Invoke explicitly
G__cpp_setupG__Pythia() and pydata_()
in order to force linker to bind them into JSF: otherwise some important
pythia common blocks are left uninitialized.
- src/JSFFULLGenerator.h
- example/guiexam1/JSFEventDisplay.cxx
In order to avoid random seg-faults, use
fCanvas->Clear("d"); instead of fCanvas->Clear();
After the modification, just do
$ make install
PHYSSIM
First get current PHYSSIM source files via CVS:
$ cd /proj/soft/physsim
$ cvs checkout physsim
$ mv physsim 2000a
$ ln -s 2000a pro
$ cd pro
At this point, I had to make some modifications which include:
- Makefile ---> SHELL = /bin/bash (sh = zsh doesn't work)
- config/kflib.tmpl : MacOSX configs
Moved definition of ANALLIB and HELASV204 from individual
Imakefiles:
SOFLAGS : added install_name
ROOTLIBS += -lEGPythia -lEG
InstallSharedLibrary rule
- Anlib/src/ANLPairCombiner.h
Added const key words to Compare to override virtual:
Int_t Compare(const TObject *) const
- Anlib/examples/jsf/ww/4jet/WW4JAnalysis.cxx
Found a bug:
sol->Delete() should be removed, since its contents
being W candidates will be deleted in dtor of ANLPairCombiner.
Use SetOwner() for tracks and solutions.
Cut stats mulfunctioned if no events left:
"END" missing in the cut table titles.
- Individual generators in higgs, susy, top, twoph, and wz subdirectories
:
Imakefile ---> Remove ANALLIB definitions
Added HELASV204 definitions
UserAnalysis.C if any : (ww, tt, and xcxc) :
---> Use SetOwner() for solutions and tracks and remove tracks.Delete(),
etc.
---> Use new for ANLPairCombiner objects in local for loop scope: otherwise,
dtor is called even when the loop is skipped:-(
---> This is probably a scope problem with CINT.
$ make
CDC/BABY
# vi /proj/soft/jsf/pro/conf/makejsf.tmpl
......
# ifndef InstallSharedLibrary
# define InstallSharedLibrary(libname,rev,dest)
@@\
install:: Concat(lib,libname.so.rev)
@@\
MakeDir($(DESTDIR)dest)
@@\
$(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev)
$(DESTDIR)dest @@\
@T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed
's/\.[^\.]*$$//'`;\
set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev)
$$T @@\
@if $(SOSYMLINK); then (set -x; \
$(RM) Concat($(DESTDIR)dest/lib,libname.so); \
@@\
$(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so));
fi
# endif
$ cd baby
$ vi Makefile
....
SHELL = /bin/bash
....
$ vi src/Makefile
....
SHELL = /bin/bash
....
$ cd src
$ make
Back to Keisuke Fujii's HEP on X Page
fujiik@jlcuxf.kek.jp March 18, 2001