We are having some difficulties in building the CERN library (2005) on our Sun Solaris 8 machines. Below are the details of the instalation process and our trouble shooting approach. Please advice.
Version Details of the solaris Machine where the installation was unsuccessful:
sun4u, SunOS 5.8, sparc, SUNW,Sun-Blade-1000
gmake version: GNU Make version 3.76.1
f77: /opt/comp/SUNWspro/bin/f90 -f77 -ftrap=%none -V
f90: Forte Developer 7 Fortran 95 7.0 2002/03/09
cc: Forte Developer 7 C 5.4 2002/03/09
Steps taken at different phases in our attempt to compile the cernlib
source files on Solaris 8:
- All tar-zipped files were downloaded to “/home/asesh/CERN-LIB/”
- The required installation script was kept in the same directory.
- Other required executables (gmake, imake, makedepend) along with the shell-scripts (bdsinst, mkdirhier) were added in the path.
- Then the installation executable was executed (in fact all the commands of the shell script “http://cernlib.web.cern.ch/cernlib/install/start_cern” were fired one by one)
Tried to install the package as it was, it used SunProC using the flag -Xs for strict ANSI C mode and at compile time faced some problem in the header file “in.h”, so the installation stopped.
Error in “in.h” was corrected in accodance to ANSI C, and installation was done again. But it came to halt with another error in the compilation of the fortran file, $CVSCOSRC/packlib/zebra/rz/rzcopy.F.
(It was using f77 from SunPro as /opt/comp/SUNWspro/bin/f90 -f77 -ftrap=%none)
Tried using the g77 (GNU fortran compiler) by softlinking f77 to g77.
Also flag related changes were made in “config/sun.cf”. From “-xpp=cpp -KPIC” to “-fno-automatic -fno-second-underscore”.
It couldn’t compile the file $CVSCOSRC/packlib/kernlib/kerngen/tcgen/sungs/ffsize.F.
Another change was made in “config/sun.cf”.
#define CernlibSystem -DCERNLIB_SUN -DCERNLIB_SOLARIS -DCERNLIB_UNIX
was changed to
#define CernlibSystem -DCERNLIB_SOLARIS -DCERNLIB_UNIX
The installation stopped with another copiletime error in $CVSCOSRC/pawlib/comis/deccc/csallo.c
Then tried to install, with C compiler defined as “gcc”, by appropriately modifying the file “config/site.def”, as mentioned in “sun.cf”. The modification was adding " #define HasGcc2 YES " in “config/site.def”.
The installer used gcc but used the flag “-Xs” which was not recognized by gcc.
Now in no way could the configuration files be changed so as to remove the flag “-Xs”.