Re: Problems linking under RedHat Linux 5.1

David F. Nitz (dfnitz@umich.edu)
Tue, 16 Jun 1998 21:39:04 -0400 (Eastern Daylight Time)


On Tue, 16 Jun 1998 18:59:37 +0200 Rene Brun <Rene.Brun@cern.ch> wrote:

> Hi David,
> I suppose that you have imported the egcs version of Root.
> See the $ROOTSYS/test/Makefile for the compile options.
> You should compile your code with the options
> -fno-rtti -fno-exceptions
>
> Rene Brun
>

I previously had tried the Linux 5.0 - ecgs version of root 2.00/8.
(see below). After receiving Rene's response, I installed the Linux
5.0 - egcs version of root 2.00/8. Now I have the following problem
when running "rootcint". It complains that it can't find libg++.so.2.8.
That version of the library does not exist on my system, and I've not
been able to find a version on the Web. There is a pointer on the egcs
web page, but the link is broken. Suggestions?

>
>
> David F. Nitz wrote:
> >
> > I've just started to try to port some of my root programs from Windows95
> > to Linux. I took the makefile in the "test" subdirectory of the root
> > (2.00/8) release and modified it for my program. This same program has
> > been successfully compiled, linked, and run under Windows95. When I try
> > to build it under Linux I get the following error message:
> >
> > [dfnitz@auger3 trigger_sim]$ make
> > g++ -g fast_trg_bkg.o AUGERFastTrg.o AUGERFastTrgCint.o \
> > -L/usr/local/cern/root/lib -lNew -lBase -lCint -lClib -lCont -lFunc -lGraf
> > -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet -lPostscript -lProof
> > -lTree -lUnix -lZip -lg++ -lm -ldl -rdynamic -o fast_trg_bkg
> > AUGERFastTrgCint.o: In function `AUGERFastTrg type_info function':
> > AUGERFastTrgCint.o(.text+0x1e6c): undefined reference to `TObject
> > type_info function'
> > AUGERFastTrgCint.o(.text+0x1e72): undefined reference to `TObject
> > type_info node'
> > collect2: ld returned 1 exit status
> > make: *** [fast_trg_bkg] Error 1
> > [dfnitz@auger3 trigger_sim]$
> >
> > This is my Makefile:
> > ----------------------------------------------------------------------
> > ObjSuf = o
> > SrcSuf = cxx
> > ExeSuf =
> > DllSuf = so
> > OutPutOpt = -o
> >
> > ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib -lCont -lFunc \
> > -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \
> > -lPostscript -lProof -lTree -lUnix -lZip
> > ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d
> >
> > # Linux
> > CXX = g++
> > CXXFLAGS = -O -Wall -fPIC -I$(ROOTSYS)/include
> > LD = g++
> > LDFLAGS = -g
> > SOFLAGS = -Wl,-soname,libEvent.so -shared
> > LIBS = $(ROOTLIBS) -lg++ -lm -ldl -rdynamic
> > GLIBS = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/X11R6/lib \
> > -lXpm -lX11 -lg++ -lm -ldl -rdynamic
> >
> > #------------------------------------------------------------------------------
> >
> > all: fast_trg_bkg
> >
> > ###
> > AUGERFastTrgCint.cxx: AUGERFastTrg.h
> > @echo "Generating dictionary ..."
> > @rootcint -f AUGERFastTrgCint.cxx -c AUGERFastTrg.h
> >
> > fast_trg_bkg: fast_trg_bkg.o AUGERFastTrg.o AUGERFastTrgCint.o
> > $(LD) $(LDFLAGS) fast_trg_bkg.o AUGERFastTrg.o AUGERFastTrgCint.o \
> > $(LIBS) $(OutPutOpt) fast_trg_bkg
> > @echo "fast_trg_bkg done"
> >
> > clean:
> > rm AUGERFastTrgCint.cxx *.o fast_trg_bkg
> >
> > .SUFFIXES: .$(SrcSuf)
> > .$(SrcSuf).$(ObjSuf):
> > $(CXX) $(CXXFLAGS) -c $<
> >
> > ---------------------------------------------------------------------------
> >
> > Any suggestions?
> >
> > David F. Nitz
> > Physics Department, University of Michigan
> > dfnitz@umich.edu
> >
> >

----------------------
David F. Nitz (dfnitz@umich.edu)
Physics Department, University of Michigan
Tel: (734) 763-9696 Fax: (734) 936-6529