So after too many Christmas parties I have managed to compile the
2.20/05 version from yesterday...
Here are all the steps I took to compile and install ROOT using
egcs-2.91.60 19981201 (egcs-1.1.1 release) on a Sparc-Station20
under SunOS 5.5.1 (i.e. the CMSWGS at CERN)
1. Create the root ROOT directory i.e. where you want to install everything
2. Download file root_v2.20.source.tar and unpack in this directory
this contains directories src/, cint/, test/ and tutorials/
3. Download file root_v2.20.SunOS.5.4.tar and upack in same directory
this contains directory root
4. mv src root/
5. Setup environment variables
cd root
setenv ROOTSYS $PWD
setenv PATH $(PATH):$ROOTSYS/bin
setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$ROOTSYS/lib
Make sure that no entries in the paths exist from previous
ROOT installations.
6. Change makefile
cd src
ln -s Makefile.solaris Makefile
now edit and change to use the following lines
# Makefile of ROOT for Solaris with egcs
PLATFORM = solaris
CXX = g++
CC = gcc
CXXFLAGS = -fPIC -fno-rtti -fno-exceptions -I/usr/openwin/include
CFLAGS = -fPIC -I/usr/openwin/include
CINTCXXFLAGS = -fPIC -DG__REGEXP1 -DG__UNIX -DG__OSFDLL \
-DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO
CINTCFLAGS = -fPIC -DG__REGEXP1 -DG__UNIX -DG__OSFDLL \
-DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO
OPT = -g
NOOPT =
LD = $(CXX)
LDFLAGS = $(OPT)
SOFLAGS = -shared
SOEXT = so
SYSLIBS = -lm -ldl
SYSXLIBS = -L/usr/openwin/lib -lX11 -lm -lgen -ldl -lsocket
XLIBS = $(ROOTSYS)/lib/libXpm.a -L/usr/openwin/lib -lX11 -lsunmath
CILIBS = -lm -ltermcap -ldl -L/usr/ccs/lib -lgen
##### MACROS and TARGETS #####
include Make-macros
##### DEPENDENCIES #####
include Make-depend
# end of Makefile
I am not sure whether the -fno-rtti and -fno-exceptions options are
completely neccessary... but they were used in the Linux-egcs makefile
which I used as a template.
7. The following files need changing in directory $ROOTSYS/src
UNIX_UnixSystem.cxx
ROOTX_rootx.cxx
In file UNIX_UnixSystem.cxx go to line 398
and change the lines
#if defined(R__SOLARIS) && !defined(R__I386) && !defined(__SunOS_5_6)
sigact.sa_handler = (void (*)())SIG_IGN;
To the following:
#if defined(R__SOLARIS) && !defined(R__I386) && !defined(__SunOS_5_6)
sigact.sa_handler = (void (*)(int))SIG_IGN;
Do the same for the lines around 1777 also.
Change:
#if defined(R__SOLARIS) && !defined(R__I386) && !defined(__SunOS_5_6)
sigact.sa_handler = (void (*)())sighandler;
To:
#if defined(R__SOLARIS) && !defined(R__I386) && !defined(__SunOS_5_6)
sigact.sa_handler = (void (*)(int))sighandler;
The process is similar for ROOTX_rootx.cxx...
>From line 269:
Change:
#if defined(__sun) && !defined(__i386) && !defined(__SunOS_5_6)
ignore.sa_handler = (void (*)())SIG_IGN;
To:
#if defined(__sun) && !defined(__i386) && !defined(__SunOS_5_6)
ignore.sa_handler = (void (*)(int))SIG_IGN;
>From line 281:
Change:
#if defined(__sun) && !defined(__i386) && !defined(__SunOS_5_6)
handle.sa_handler = (void (*)())SigUsr1;
To:
#if defined(__sun) && !defined(__i386) && !defined(__SunOS_5_6)
handle.sa_handler = (void (*)(int))SigUsr1;
7.5 If you want the TTF stuff.... download this now and unpack it in the $ROOTSYS directory
8. Make sure you are in the $ROOTSYS/src directory and do
gmake clean
9. followed by
gmake
10. Go and have a cup of tea...
Maybe it would be nicer to modify the source files UNIX_UnixSystem.cxx and
ROOTX_rootx.cxx to somehow pick up automatically the SunOS version?
One might assume that __SunOS_5_5 might be defined automatically somewhere
but this does not appear to be the case on the installation I am using
on the CMSWGS at CERN... I guess you could just put something in the
makefile?
NB I have not yet tried to compile the utilities h2root g2root etc
Cheers,
Jon.
=====================================================
Jonathan Hays
Studio 103 CERN - HC/EP
36 Rue De L'Athenee E27900
1206 Geneve 1211 Geneve 23
Suisse Suisse
+41 22 7671546
=====================================================