In order of decreasing importance:
I went through the list of required packages in /afs/rhic.bnl.gov/star/common/AAAREADME and figured out which ones were installed by default in an Intel OS X 10.4.8 client. Here's what I found:
I was able to find nearly all of the missing packages in the unstable branch for Fink (Intel machine). I wouldn't worry about the "unstable" moniker; as long as you don't do a blind update-all it's certainly possible to stick to a solid config, and there are several packages on the list that are only available in unstable (only because they haven't yet gotten the votes to move them over to stable). I've gone ahead and installed some of the missing packages in a fresh Fink installation and will serve it up over NFS at /Volumes/star1.lns.mit.edu/STAR/opt/star/osx48_i386_gcc401 (with a power_macintosh_gcc401 to match, although a more consistent $STAR_HOST_SYS would probably have been osx48_ppc_gcc401).
Here's a summary table of the packages installed in $OPTSTAR for the two OS X architectures at MIT. Note that many of these packages have additional dependencies, so the full list of installed packages on each system (attached at the bottom of the page) is actually much longer.
package | version |
Fortran compiler | gfortran 4.2 (i386), g77 3.4.3 (ppc) |
libpng | 1.2.12 |
mysql | 5.0.16-1002 (5.0.27 will break!) |
dejagnu | skipped |
texinfo | 4.8 |
findutils | 4.2.20 |
fileutils | 5.96 |
qt-x11 | 3.3.7 |
slang | 1.4.9 |
doxygen | 1.4.6 |
lynx | 2.8.5 |
ImageMagick | 6.2.8 |
nedit | 5.5 |
astyle | 1.15.3 (ppc only) |
unixodbc | 2.2.11 |
myodbc | not available (2.50.39, if we want it) |
libxml | 2.6.26 |
I also looked for required perlmods in Fink. I stuck with the default Perl 5.86, so the modules that say e.g. pm588 required I did not install. I found that some of the modules are already part of core. If the older ones hosted by STAR are still needed, let me know. Virtual package means that it came with the OS already:
perlmod | version |
Compress-Zlib | virtual package |
DateManip | 5.42a |
DBI | 1.53 |
DBD-mysql | 3.0008 |
Digest-MD5 | core module |
HTML-Parser | virtual package |
HTML-Tagset | 3.10 |
libnet | not available |
libwww-perl | 5.805 |
LWPng-alpha | not available |
MD5 | not available |
MIME-Base64 | 3.05 |
Proc-ProcessTable | 0.39-cvs20040222-sf77 |
Statistics-Descriptive | 2.6 |
Storable | core module |
Time-HiRes | core module |
URI | virtual package |
XML-NamespaceSupport | 1.08 |
XML-SAX | 0.14 |
XML-Simple | 2.16 |
There were some additional perlmods that install_perlmods listed as "Linux only" but Fink offered to install:
perlmod | version |
GD | 2.30 |
perlindex | not available |
Pod-Escapes | 1.04 |
Pod-Simple | 3.04 |
Tk | 804.026 |
Tk-HistEntry | not available |
Tk-Pod | not available |
Questions:
The default makePythia6.macosx won't work out of the box for 10.4, since it requires g77. Here's what I did to get the libraries built for Pythia 5:
$ gfortran -c jetset74.f $ gfortran -c pythia5707.f $ echo 'void MAIN__() {}' > main.c $ gcc -c main.c $ gcc -dynamiclib -flat_namespace -single_module -undefined dynamic_lookup -install_name $OPTSTAR/lib/libPythia.dylib -o libPythia.dylib *.o $ sudo cp libPythia.dylib $OPTSTAR/lib/.
and for Pythia 6: $ export MACOSX_DEPLOYMENT_TARGET=10.4 $ gfortran -c pythia6319.f In file pythia6319.f:50551 IF (AAMAX.EQ.0D0) PAUSE 'SINGULAR MATRIX IN PYLDCM' 1 Warning: Obsolete: PAUSE statement at (1) $ gfortran -fno-second-underscore -c tpythia6_called_from_cc.F $ echo 'void MAIN__() {}' > main.c $ gcc -c main.c $ gcc -c pythia6_common_address.c $ gcc -dynamiclib -flat_namespace -single_module -undefined dynamic_lookup -install_name $OPTSTAR/lib/libPythia6.dylib -o libPythia6.dylib main.o tpythia6_called_from_cc.o pythia6*.o $ ln -s libPythia6.dylib libPythia6.so $ sudo cp libPythia6.* $OPTSTAR/lib/.
All the CERNLIB libraries are static and the binaries depend only on system libraries, so the whole installation should be portable. For PowerPC I had a CERNLIB 2005 build left over from a different Fink installation, so I just copied those binaries and libraries to the new location and downloaded the headers from CERN. Fink doesn't support CERNLIB on Intel Macs, so for this build I used Robert Hatcher's excellent shell script:
http://home.fnal.gov/~rhatcher/macosx/readme.html
Hatcher's binaries link against the gfortran dylib, so I made sure to build them with gfortran from $OPTSTAR.
CERNLIB 2005 doesn't include libshift.a, but STAR really wants to link against it. Here's a hack from Robert Hatcher to build your own cat > fakeshift.c < eof int rshift_(int* in, int* ishft) { return *in >> *ishft; } int ishft_(int* in, int* ishft) { if (*ishft == 0) return *in; if (*ishft > 0) return *in << *ishft; else return *in >> *ishft; } EOF gcc -O -fPIC -c fakeshift.c fi g77 -fPIC -c getarg_stub.f ar cr libshift.a fakeshift.o eof
Following the instructions at http://www.star.bnl.gov/STAR/comp/root/building_root.html was basically fine. Here was my configure command for rootdeb:
./configure macosx --build=debug --enable-qt --enable-table --enable-pythia6 --enable-pythia --with-pythia-libdir=$OPTSTAR/lib --with-pythia6-libdir=$OPTSTAR/lib --with-qt-incdir=$OPTSTAR/include/qt
which resulted in the final list Enabled support for asimage, astiff, builtin_afterimage, builtin_freetype, builtin_pcre, builtin_zlib, cern, cintex, exceptions, krb5, ldap, mathcore, mysql, odbc, opengl, pch, pythia, pythia6, python, qt, qtgsi, reflex, shared, ssl, table, thread, winrtdebug, xml, xrootd.
I did run into a few snags:
I'm working with a checked out copy of the STAR software and modifying codes when necessary if the fix is obvious. So far I've got the following cons working: cons %QtRoot %StEventDisplayMaker %pams %St_dst_Maker %St_geom_Maker
St_dst_Maker tries to subtract an int and a struct! Pams is a crazy mess of VAX-style Fortran STRUCTURES, but we really need it in order to run starsim. I haven't delved too deeply into the QtRoot-related stuff; I'm sure Valeri can help when the time comes. Hopefully we can get these things fixed without too much delay.
Power PC notes
Problems requiring changes to codes:
Intel notes
Basic problem here is (im)maturity of gfortran. Current Fink unstable version 4.2.0-20060617 still does not include some instrinsic symbols (lshift, lstat) that we expect to be there. Newer versions do have these symbols, and as soon as Fink updates I'll give it another go. I may try installing gcc 4.3 from source in the meantime, but it's not a high priority. Note that Intel machines should be able to run the Power PC build in translated mode with some hacking of the paths (force $STAR_HOST_SYS = osx48_power_macintosh_gcc401).