Re: Q: Compiling ROOT with KAI C++, how?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Jul 14 1998 - 21:55:33 MEST


Hi Patrick,

   with KAI 3.3c for Linux ROOT compiles and works without problem.

Below the Makefile.linuxkcc and the new Makelib.

Cheers, Fons.

PS: let me know if the makefile works since my trial license
    for KCC has expired.


Patrick Schemitz wrote:
> 
> Hello Rooters,
> 
> I've got some questions regarding compilation of ROOT.
> 
> How do I compile ROOT 2.0beta9 with KAI C++ under Linux?
> There are Makefiles for GCC 2.7.2.3 and egcs, but not for KAI.
> 
> I heard about problems with ROOT and KAI 3.2. How severe are
> these problems?
> 
> Cheers, patrick
> 
> PS: My aim is to combine ROOT with CDF code. This worked fine
> with GCC 2.7.2.3 plus Fermi patches, but newer CDF code doesn't
> compile with GCC, and linking C++ libraries build by GCC and KAI
> doesn't work. Apparently they use different signatures for
> constructors and destructors.
> 
> --
> Patrick Schemitz, schemitz@ekp.physik.uni-karlsruhe.de
> University of Karlsruhe (TH), Germany
> Faculty for Physics, EKP, Ka'CDF Tracking Group

========================================= Makefile.linuxkcc
# Makefile of ROOT for Linux with glibc and KCC compiler

# When changing OPT to -O you can also change +K0 to +K1

PLATFORM      = linux

CXX           = KCC
CC            = gcc
CXXFLAGS      = --signed_chars -D_EXTERN_INLINE=inline --display_error_number \
                --diag_suppress 191 -fPIC -I$(OPENGL)/include -DR__GLIBC +K0
CFLAGS        = -Wall -fPIC -DR__GLIBC
CINTCXXFLAGS  = --signed_chars -D_EXTERN_INLINE=inline --display_error_number \
                --diag_suppress 191 -fPIC -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \
                -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO +K0
CINTCFLAGS    = -Wall -fPIC -DG__REGEXP -DG__UNIX -DG__SHAREDLIB \
                -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO
OPT           = -g
NOOPT         =
LD            = KCC
LDFLAGS       = $(OPT)
SOFLAGS       =
SOEXT         = so
SYSLIBS       = -lg++ -lm -ldl
SYSXLIBS      = -L/usr/X11R6/lib -lX11 -lg++ -lm -ldl
XLIBS         = $(ROOTSYS)/lib/libXpm.a -L/usr/X11R6/lib -lX11 -lg++
CILIBS        = -lm -ltermcap -lbsd -ldl -lg++


##### MACROS and TARGETS #####

include Make-macros


##### DEPENDENCIES #####

include Make-depend

=============================================== Makelib
#! /bin/sh

# Script to generate a shared library.
# Called by $ROOTSYS/src/Make-macros, the makefile backend.

PLATFORM=$1
LD=$2
LDFLAGS=$3
SOFLAGS=$4
SONAME=$5
LIB=$6
OBJS=$7

rm -f $LIB

if [ $PLATFORM = aix ]; then
   echo this is aix
elif [ $PLATFORM = alpha ]; then
   echo this is alpha
elif [ $PLATFORM = hpux ]; then
   echo $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS
   $LD $SOFLAGS $LDFLAGS -o $LIB $OBJS
elif [ $LD = KCC ]; then
   echo $LD $LDFLAGS -o $LIB $OBJS
   $LD $LDFLAGS -o $LIB $OBJS
else
   echo $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS
   $LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS
fi

chmod 555 $LIB

echo "$LIB done"

exit 0



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:35 MET